|
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:
- Units: sectors of 1 * 512 = 512 bytes
- Sector size (logical/physical): 512 bytes / 512 bytes
- I/O size (minimum/optimal): 512 bytes / 512 bytes
- Disklabel type: dos
- Disk identifier: 0x305b6b5e
- Device Boot Start End Sectors Size Id Type
- ../../OrangePI-PC_Ubuntu_Vivid_Mate.img1 40960 172031 131072 64M b W95 FAT
- ../../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
|
|