分类: LINUX
2009-04-20 19:00:27
sudo losetup -f
/dev/loop0
sudo losetup /dev/loop0 archlinux-2008.06-core-i686.img
sudo fdisk -lu /dev/loop0
Disk /dev/loop0: 322 MB, 322469376 bytes
53 heads, 12 sectors/track, 990 cylinders, total 629823 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/loop0p1 * 63 629822 314880 83 Linux
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 1, 1) logical=(0, 5, 4)
Partition 1 has different physical/logical endings:
phys=(39, 52, 12) logical=(990, 15, 3)
63*512=32256
sudo losetup -o 32256 /dev/loop1 archlinux-2008.06-core-i686.img
sudo mount -o loop /dev/loop1 /mnt/
ls /mnt/
addons archlive.sqfs boot lost+found
sudo fdisk -lu archlinux-2008.06-core-i686.img
You must set cylinders.
You can do this from the extra functions menu.
Disk archlinux-2008.06-core-i686.img: 0 MB, 0 bytes
53 heads, 12 sectors/track, 0 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
archlinux-2008.06-core-i686.img1 * 63 629822 314880 83 Linux
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(0, 1, 1) logical=(0, 5, 4)
Partition 1 has different physical/logical endings:
phys=(39, 52, 12) logical=(990, 15, 3)
sudo mount -o loop,offset=32256 archlinux-2008.06-core-i686.img /mnt/
ls /mnt/
addons archlive.sqfs boot lost+found