【解決】掛載img文件時mount: you must specify the filesystem type

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章