mount:文件系统类型错误、选项错误、/dev/sda1 上的超级块错误、缺少代码页或帮助程序或其他错误

mount:文件系统类型错误、选项错误、/dev/sda1 上的超级块错误、缺少代码页或帮助程序或其他错误

我尝试挂载添加到 Azure VM 的磁盘,但失败并显示错误消息:

mount: /mydirectory: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error.

我所做的如下:我创建了一个磁盘并将其附加到 Azure VM。然后我运行命令sudo fdisk -l,它给了我这个输出:

Disk /dev/sda: 300 GiB, 322122547200 bytes, 629145600 sectors
Disk model: Virtual Disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

sudo fdisk /dev/sda然后,我通过以下步骤调用了命令

Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0xeacbff1b.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-629145599, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-629145599, default 629145599):

Created a new partition 1 of type 'Linux' and of size 300 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

调用后fdisk我尝试安装它 ( sudo mount /dev/sda1 /mydirectory) 但失败并显示上述错误消息:

mount:  wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error.

我怎么解决这个问题?

答案1

假设这是一个新的,空白的磁盘,需要在分区上创建文件系统才能挂载;例如,

sudo mkfs.ext4 /dev/sda1

将在分区上使用默认选项创建 ext4 文件系统。

不要在已经有数据的磁盘/分区上执行此操作!

相关内容