linux下挂载img文件
[root@db ~]# fdisk -ul gUSB3650MB-Install-6.0.109b-IPStor-7.50-7708-OEL6U3.imgYou must set cylinders.You can do this from the extra functions menu.Disk gUSB3650MB-Install-6.0.109b-IPStor-7.50
·
[root@db ~]# fdisk -ul gUSB3650MB-Install-6.0.109b-IPStor-7.50-7708-OEL6U3.img
You must set cylinders.
You can do this from the extra functions menu.
Disk gUSB3650MB-Install-6.0.109b-IPStor-7.50-7708-OEL6U3.img: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders, total 0 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
Disk identifier: 0x000f3127
Device Boot Start End Blocks Id System
gUSB3650MB-Install-6.0.109b-IPStor-7.50-7708-OEL6U3.img1 * 63 7454159 3727048+ 83 Linux
发现linux的文件系统是从第63块开始的,所以挂载的时候要从这个地方开始挂载。
所以我们需要从512*63出开始挂载,512*63=32256
mount -o loop,offset=32256 gUSB3650MB-Install-6.0.109b-IPStor-7.50-7708-OEL6U3.img /mnt/
[root@db ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 50G 18G 29G 39% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
/dev/sda1 190M 89M 88M 51% /boot
tmpfs 4.0G 0 4.0G 0% /data
/root/gUSB3650MB-Install-6.0.109b-IPStor-7.50-7708-OEL6U3.img
3.5G 2.1G 1.3G 63% /mnt
更多推荐
已为社区贡献2条内容
所有评论(0)