please choosego to mobile | Continue to access the PC version
View: 4494|Reply: 1

browsing .img files

[Copy link]

2

threads

29

posts

91

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
91
Published in 2015-10-21 04:45:58 | Show all floors |Read mode
Edited by venividivici at 2015-10-21 14:50

If you want to get a few files from an image (like uImage and script.bin)
you don´t need to dd the image to an sdcard
simply run:

sudo fdisk -lu ./OrangePI-PC_Ubuntu_Vivid_Mate.img     (in order to see the partions inside)
In this example:
  1. Units: sectors of 1 * 512 = 512 bytes
  2. Sector size (logical/physical): 512 bytes / 512 bytes
  3. I/O size (minimum/optimal): 512 bytes / 512 bytes
  4. Disklabel type: dos
  5. Disk identifier: 0x305b6b5e

  6. Device                                   Boot  Start     End Sectors  Size Id Type
  7. ../../OrangePI-PC_Ubuntu_Vivid_Mate.img1       40960  172031  131072   64M  b W95 FAT
  8. ../../OrangePI-PC_Ubuntu_Vivid_Mate.img2      172032 4790272 4618241  2.2G 83 Linux
Copy code
for boot: 40960*512 = 20971520
sudo mount -t auto -o loop,offset=20971520 ./OrangePI-PC_Ubuntu_Vivid_Mate.img /mnt/boot

for root: 172032*512 = 88080384
sudo mount -t auto -o loop,offset=88080384 ./OrangePI-PC_Ubuntu_Vivid_Mate.img /mnt/root

If you modify the filesystem do not forget to do
sudo umount /mnt/boot
or
sudo umount /mnt/root



Published in 2015-10-21 19:53:53 | Show all floors
Orange PI PC
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list