解决挂载img文件时mount: you must specify the filesystem type
Posted 乾龙_Heron
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决挂载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
以上是关于解决挂载img文件时mount: you must specify the filesystem type的主要内容,如果未能解决你的问题,请参考以下文章
在linux系统 挂载光盘:mount时提示: you must specify the filesystem type
mount /dev/sr0 /media/cdrom you must specify the filesystem type
buildroot编译文件系统,出现mount: you must be root. can't open /dev/console: Permission denied这种错误。