如何mount dd出来的文件?
时间:2009-07-29 来源:neilengineer
用fdisk来看每个分区的起始逻辑扇区号,扇区号乘以512就是所要的偏移值offset,
mount时用:mount xx.img -o loop,offset=offset xx/ 如: #fdisk -l -u -C 1 hda.img Disk hda: 0 MB, 0 bytes
255 heads, 63 sectors/track, 1 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System
hda1 2048 13672447 6835200 27 Unknown
Partition 1 does not end on cylinder boundary.
hda2 * 13672448 117208191 51767872 7 HPFS/NTFS
Partition 2 has different physical/logical endings:
phys=(1023, 254, 63) logical=(7295, 222, 31)
可以看出有2个主分区,偏移分别是
hda1=2048*512=1048576
hda2=13672448*512=7000293376 因此mount命令分别是:
mount -o loop,offset=1048576 hda.img /mnt/hda1
mount -o loop,offset=7000293376 hda.img /mnt/hda2
mount时用:mount xx.img -o loop,offset=offset xx/ 如: #fdisk -l -u -C 1 hda.img Disk hda: 0 MB, 0 bytes
255 heads, 63 sectors/track, 1 cylinders, total 0 sectors
Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System
hda1 2048 13672447 6835200 27 Unknown
Partition 1 does not end on cylinder boundary.
hda2 * 13672448 117208191 51767872 7 HPFS/NTFS
Partition 2 has different physical/logical endings:
phys=(1023, 254, 63) logical=(7295, 222, 31)
可以看出有2个主分区,偏移分别是
hda1=2048*512=1048576
hda2=13672448*512=7000293376 因此mount命令分别是:
mount -o loop,offset=1048576 hda.img /mnt/hda1
mount -o loop,offset=7000293376 hda.img /mnt/hda2
/*
*By Neil Chiao (neilchiao at gmail.com)
*转载请注明出处:neilengineer.cublog.cn
*本文内容来自网络
*欢迎到“新星湾(www.xinxingwan.com)”指导
*/
相关阅读 更多 +