linux下挂载img文件

[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


 

 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值