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