无法安装 ext4 SSD:`JBD:未找到有效的日志超级块`

无法安装 ext4 SSD:`JBD:未找到有效的日志超级块`

我遇到了一点问题。我的笔记本电脑上运行着 Ubuntu 10.04 LTS,大约两年前,我用 32 GB 的 SSD 替换了老旧的 HDD。今天我尝试启动我的电脑,但无法启动。

所以我把 SSD 放入外部硬盘架并启动 Live CD Ubuntu 10.10 以尝试从 SSD 恢复数据。SSD 出现在下拉菜单中但无法安装。

日志:

ubuntu@ubuntu:~$ dmesg | tail
[ 2125.445659] sd 8:0:0:0: [sda] 62533296 512-byte logical blocks: (32.0 GB/29.8 GiB)
[ 2125.446983] sd 8:0:0:0: [sda] Write Protect is off
[ 2125.446988] sd 8:0:0:0: [sda] Mode Sense: 17 00 00 08
[ 2125.446992] sd 8:0:0:0: [sda] Assuming drive cache: write through
[ 2125.449084] sd 8:0:0:0: [sda] Assuming drive cache: write through
[ 2125.449098]  sda: sda1 sda2 < sda5 >
[ 2125.454285] sd 8:0:0:0: [sda] Assuming drive cache: write through
[ 2125.454293] sd 8:0:0:0: [sda] Attached SCSI disk
[ 2125.777836] JBD: no valid journal superblock found
[ 2125.777840] EXT4-fs (sda1): error loading journal

是否有办法修复此问题以便我可以恢复数据?

答案1

只需执行:

mke2fs -t ext4 -O ^has_journal /dev/sdX

(在你的情况下 sdX 是sda1)重新创建 ext4 分区日志已启用。或者重新格式化分区:

mke2fs -F -L "PartitionLabel" -t ext4 -O ^has_journal /dev/sdX

答案2

你试过fsck在上面跑步吗?

从实时启动中,尝试如下操作:

fsck.ext4 -Dcfy -C 0 /dev/sdX#

这将:

-D - Optimize directories
-c - Check for bad sectors
-f - Force a check
-y - Assumes 'yes' to all questions
-C 0 - Prints info to stdout

您只需要确保(我相信无需安装)在 X(SSD)和每个分区(仅执行 EXT4 分区)上运行它。

这应该可以解决系统已知的问题,如果您不介意的话请报告,如果我找到其他选项我可以更新。


还发现一个讨论“超级块”的链接,虽然我对此不熟悉,但可能值得检查,但它使用了类似的命令:

sudo fsck.ext4 -v /dev/sdX

坏的超级块的输出应如下所示:

fsck /dev/sda5
fsck 1.41.4 (27-Jan-2009)
e2fsck 1.41.4 (27-Jan-2009)
fsck.ext4: **Group descriptors look bad**... trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/sda5

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/sdX

它应该告诉你超级块备份是stored on blocks: # # #

最后恢复备份(如果存在):

sudo e2fsck -b block_number /dev/sdX

再说一次,我还没有尝试过,也无法评价它的有效性——希望其他人可以对此方法有更多的了解。 来源

相关内容