码迷,mamicode.com
首页 > 其他好文 > 详细

【解决】挂载img文件时mount: you must specify the filesystem type

时间:2016-11-19 13:32:07      阅读:246      评论:0      收藏:0      [点我收藏+]

标签:different   rom   byte   gem   beginning   img   lock   function   head   

gem5 full systerm时,经常需要在文件系统中,添加文件。但是mount过程经常遇到错误:mount: you must specify the filesystem type

以下是正常挂载流程:

1. # sudo fdisk -lu BigDataBench-gem5.img

You must set cylinders.
You can do this from the extra functions menu.


Disk BigDataBench-gem5.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: 0x0005536d


                Device Boot      Start         End      Blocks   Id  System
BigDataBench-gem5.img1              32     9751454     4875711+  83  Linux
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(0, 1, 1) logical=(0, 0, 33)


从上面能看出起始扇区位置32*512


2. sudo mount -t auto -o loop,offset=$((32*512)) BigDataBench-gem5.img tempdir

不要忘记加-t auto

【解决】挂载img文件时mount: you must specify the filesystem type

标签:different   rom   byte   gem   beginning   img   lock   function   head   

原文地址:http://blog.csdn.net/qianlong4526888/article/details/53229136

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!