openSuse 42.3(KDE)以 root 身份登录
LUKS 加密的 /home 分区(/sda4 是主分区,没有 LVM)虽然已解锁,但在启动时无法访问。显然存在坏块。
fsck.ext4 -nf /dev/sda4
e2fsck 1.42.11 (09-Jul-2014)
Warning! /dev/sda4 is in use.
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/sda4
然后
unmount /dev/sda4
umount: /dev/sda4: not mounted
唉
sudo mke2fs -n /dev/sda4
mke2fs 1.42.11 (09-Jul-2014)
/dev/sda4 contains a crypto_LUKS file system
Proceed anyway? (y,n) y
/dev/sda4 is apparently in use by the system; will not make a filesystem here!
下一步
fdisk -l
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A-LONG/NUMBER
Device Start End Sectors Size Type
/dev/sda1 2048 2099199 2097152 1G BIOS boot
/dev/sda2 2099200 18909183 16809984 8G Microsoft basic data
/dev/sda3 18909184 169904117 150994934 72G Microsoft basic data
/dev/sda4 169904128 1953523711 1783619584 850.5G Microsoft basic data
Disk /dev/mapper/A-HDID-part4: 850.5 GiB, 913211129856 bytes, 1783615488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
下次尝试
umount /dev/mapper/A-HDID-part4:
umount: /dev/mapper/A-HDID-part4: not mounted
fsck 再次抱怨它正在使用中。因此,任何关于如何从这里继续的建议,我的意思是让 fsck.ext4 运行或如何潜在数据丢失不是问题,存在完整备份。(是的,这是 ext4,即使 fdisk 返回了 Microsoft 基本数据)
除了浏览器和控制台之外,没有其他程序在运行,df -h 也没有显示任何内容。如何让 fsck 开始运行。