我有一个文件系统的映像,我想挂载它。不幸的是,我不知道它里面是什么文件系统。我将向您展示我到目前为止所做的工作。
root@vagrant-ubuntu-trusty-64:/vagrant# file some.img
some.img: x86 boot sector
好吧,这是某种图像。接下来我尝试用fdisk
root@vagrant-ubuntu-trusty-64:/vagrant# fdisk -l some.img
Disk some.img: 1986 MB, 1986228224 bytes
255 heads, 63 sectors/track, 241 cylinders, total 3879352 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: 0x00000000
This doesn't look like a partition table
Probably you selected the wrong device.
Device Boot Start End Blocks Id System
some.img1 0 498925567 249462784 0 Empty
some.img2 830668801 830668859 29+ 0 Empty
some.img3 90433 3430048064 1714978816 0 Empty
some.img4 ? 0 0 0 0 Empty
但我在这里卡住了。系统是Empty
,不管那是什么意思。
我尝试将其安装为ext2
、ext3
或最大的分区(some.img3),ext4
并vfat
计算如下偏移量:
root@vagrant-ubuntu-trusty-64:/vagrant# mount -o ro,loop,offset=46301696 -t ext3 some.img /mnt/
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
我尝试使用kpartx
仔细查看,但我不太熟悉kpartx
。以下是输出:
root@vagrant-ubuntu-trusty-64:/vagrant# kpartx some.img
loop0p1 : 0 498925568 /dev/loop0 0
loop0p2 : 0 59 /dev/loop0 830668801
loop0p3 : 0 3429957632 /dev/loop0 90433
loop deleted : /dev/loop0
看起来它甚至不想创建循环设备?这就是我被困住的地方……再次:我正在尝试安装您可以在中看到的大块fdisk
。任何帮助都将不胜感激!
谢谢!