我有一台运行 Ubuntu Server 11.10 的机器。有两个内置 SATA 驱动器,我之前已经将它们都安装并可访问。这台机器最近被移动过,重新启动后,第二个驱动器没有安装。我最初尝试安装它:
sudo mount /dev/sdb /mnt/norm
导致以下错误信息:
mount: you must specify the filesystem type
所以我用了:
sudo parted -l
确定文件系统类型并给出以下输出:
Model: ATA Hitachi HDS72101 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 996GB 996GB primary ext4 boot
2 996GB 1000GB 4024MB extended
5 996GB 1000GB 4024MB logical linux-swap(v1)
Model: ATA WDC WD10EADS-00L (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 1000GB 1000GB ext4
因此我将其添加到 mount 命令中:
sudo mount -t ext4 /dev/sdb /mnt/norm
这导致了以下错误:
mount: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error. In some cases useful info is found in syslog - try dmesg | tail or so
dmesg | tail 显示以下消息:
EXT4-fs (sdb): VFS: Can't find ext4 filesystem
有人可以建议我下一步怎么做吗?
答案1
答案2
如您所见,我们需要排除的第一件事是坏的超级块,因此让我们开始文件系统检查:
sudo fsck.ext4 -v /dev/sdb
如果它是一个坏的超级块,您将收到类似以下内容的消息:
Bad magic number in super-block while trying to open /dev/sdbX
The superblock could not be read or does not describe a correct ext4 filesystem
If the device is valid and it really contains an ext4 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device>
因此,找到超级块备份:
sudo mke2fs -n /dev/sdb
在输出的底部,您将看到备份超级块的列表。您可以使用以下命令恢复它:
sudo e2fsck -b block_number /dev/sdb
其中 block_number 是列出的备份之一。如果第一个备份不成功,请尝试其他几个备份。