Contents
[~]> fdisk -l kobo.img Disk kobo.img: 1.9 GiB, 1977614336 bytes, 3862528 sectors 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: 0xcee4c14b Device Boot Start End Sectors Size Id Type kobo.img1 19456 543744 524289 256M 83 Linux kobo.img2 543745 1068033 524289 256M 83 Linux kobo.img3 1068034 3862527 2794494 1.3G b W95 FAT32
[~]> losetup -f /dev/loop0
[~]> echo 1068034*512 | bc 546833408
[~]> sudo losetup `losetup -f` -o $( echo 1068034*512 | bc ) kobo.img
sudo mount /dev/loop0 /media/
[~]> echo "(1068033-543745)*512" | bc 268435456
[~]> echo 543745*512 | bc 278397440
# losetup `losetup -f ` --offset 278397440 --sizelimit 268435456 kobo.img # mount /dev/loop0 /media/ # ls /media/ bin dev etc fs.md5sum lib libexec linuxrc lost+found mnt proc root sbin sys tmp upgrade usr var
sudo umount /media sudo losetup -d /dev/loop0