我正在尝试安装使用创建的自定义 USB 驱动器映像fdisk
。以下是我创建映像的方式:
- 创建了一个与用作模型的旧 USB 驱动器映像大小完全相同的文件:(
dd if=/dev/zero of=image.img count=30712320
大小:15724707840 B
,15.7 GB
) - 创建分区表:在
fdisk
:o
- 创建了分区:在
fdisk
:n
,,,,,p
1
enter
enter
- 将分区类型切换为
W95 FAT 32 (LBA)
:在fdisk
:t
,c
- 将启动标志设置为 on: 在
fdisk
:中a
,1
- 将对图像的更改写入:在
fdisk
:w
输出fdisk -l image.img
:
Disk image.img: 15.7 GB, 15724707840 bytes
193 heads, 9 sectors/track, 17681 cylinders, total 30712320 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: 0xc8fac3e1
Device Boot Start End Blocks Id System
image.img1 * 2048 30712319 15355136 c W95 FAT32 (LBA)
一切似乎都正常,但问题是我无法安装图像:
1)sudo mount image.img /media/image
:
mount: you must specify the filesystem type
2)sudo mount -t vfat image.img /media/image
:
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
3)sudo mount -o offset=1048576 image.img /media/image
(1048576
=起始扇区号*扇区大小):
mount: you must specify the filesystem type
4)sudo mount -t vfat -o offset=1048576 image.img /media/image
(1048576
=起始扇区号*扇区大小):
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
为什么会发生这种情况?