先列出指定磁盤映像文件(DS918_7.2-64570.img)的分區(qū)信息
root@huangy:/home/huangy/QunHui# fdisk -l DS918_7.2-64570.img
Disk DS918_7.2-64570.img: 1 GiB, 1073741824 bytes, 2097152 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: 0x16af7bb3
Device Boot Start End Sectors Size Id Type
DS918_7.2-64570.img1 * 2048 104447 102400 50M 83 Linux
DS918_7.2-64570.img2 104448 206847 102400 50M 83 Linux
DS918_7.2-64570.img3 206848 2097151 1890304 923M 83 Linux
若要掛載Device DS918_7.2-64570.img1
則需要計(jì)算出偏移量 start * Units,即 2048 * 512
mount -o loop,offset=1048576 /home/huangy/QunHui/DS918_7.2-64570.img /mnt/