/dev/mapper/ubuntu--vg-root 不存在,尝试了所有常见的修复方法

/dev/mapper/ubuntu--vg-root 不存在,尝试了所有常见的修复方法

抱歉,截图不过能反映出我的问题。

开机截图

Ubuntu 19.10 加密 LVM2 设置

我已遵循我能找到的所有指南。

检查 rootdelay、/proc/modules 是否存在,是否按照此处所述执行了 cryptsetup luksOpen 等 -更新 initramfs删除了我所有的 nvidia 驱动程序。删除了专门用于存储数据的驱动器上损坏的 lvm raid0 设置。

结果没什么区别,依然无法开机。

lsblk 输出

NAME                    MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0                     7:0    0   1.9G  1 loop  
loop1                     7:1    0  89.1M  1 loop  
loop2                     7:2    0  54.5M  1 loop  
loop3                     7:3    0 149.9M  1 loop  
loop4                     7:4    0   4.2M  1 loop  
loop5                     7:5    0  14.8M  1 loop  
loop6                     7:6    0   956K  1 loop  
loop7                     7:7    0  44.2M  1 loop  
sda                       8:0    0  55.9G  0 disk  
sdb                       8:16   0  55.9G  0 disk  
sdc                       8:32   0 223.6G  0 disk  
├─sdc1                    8:33   0   512M  0 part  /boot/efi
├─sdc2                    8:34   0   732M  0 part  /boot
└─sdc3                    8:35   0 222.4G  0 part  
  └─sdc3_crypt          253:0    0 222.3G  0 crypt 
    ├─ubuntu--vg-root   253:1    0 221.4G  0 lvm   /
    └─ubuntu--vg-swap_1 253:2    0   976M  0 lvm   
sdd                       8:48   0   1.8T  0 disk  
├─sdd1                    8:49   0 245.9G  0 part  
└─sdd2                    8:50   0 808.4G  0 part  
sde                       8:64   0  59.6G  0 disk  
sdf                       8:80   1   7.5G  0 disk  
├─sdf1                    8:81   1   2.3G  0 part  
├─sdf2                    8:82   1   3.9M  0 part  
└─sdf3                    8:83   1   5.2G  0 part  
sr0                      11:0    1  1024M  0 rom   
nvme0n1                 259:0    0 238.5G  0 disk  
└─nvme0n1p1             259:1    0 238.5G  0 part  

fdisk -l 的相关部分

Disk /dev/mapper/sdc3_crypt: 222.3 GiB, 238734540800 bytes, 466278400 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 /dev/mapper/ubuntu--vg-root: 221.4 GiB, 237674430464 bytes, 464207872 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 /dev/mapper/ubuntu--vg-swap_1: 976 MiB, 1023410176 bytes, 1998848 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

我的 boot-repair 修复工具 pastebin 失败了,http://pastebin.ubuntu.com/p/4WvZMF9ryt

root@ubuntu:/# lvdisplay /dev/ubuntu-vg
WARNING: Failed to connect to lvmetad. Falling back to device scanning.
--- Logical volume ---
LV Path                /dev/ubuntu-vg/root
LV Name                root
VG Name                ubuntu-vg
LV UUID                IG4WUN-mo8H-a00I-mSIp-CRXW-GscM-FtRJtI
LV Write Access        read/write
LV Creation host, time ubuntu, 2019-06-16 12:14:27 +0100
LV Status              available
# open                 1
LV Size                221.35 GiB
Current LE             56666
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           253:1

--- Logical volume ---
LV Path                /dev/ubuntu-vg/swap_1
LV Name                swap_1
VG Name                ubuntu-vg
LV UUID                wMySoO-ylhz-0s9d-W5o9-lkc2-4O5B-hKwXB2
LV Write Access        read/write
LV Creation host, time ubuntu, 2019-06-16 12:14:28 +0100
LV Status              available
# open                 0
LV Size                976.00 MiB
Current LE             244
Segments               1
Allocation             inherit
Read ahead sectors     auto
- currently set to     256
Block device           253:2

/etc/crypttab 的内容

sdc3_crypt UUID=11bc3fcd-1ac1-4b4c-a49d-56986510d151 none luks,discard

/etc/fstab 的内容

/dev/mapper/ubuntu--vg-root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sdc2 during installation
UUID=d62c1e94-2455-4b9d-80ff-eb6197d718d5 /boot           ext4    defaults        0       2

# /boot/efi was on /dev/sdc1 during installation
UUID=485D-94E1  /boot/efi       vfat    umask=0077      0       1
/dev/mapper/ubuntu--vg-swap_1 none            swap    sw              0       0
UUID=7bb37d0e-00df-4580-be16-623fc5b0a86b   /media/home    ext4          defaults       0       2
/dev/disk/by-uuid/52f75980-12b1-44b7-b6d5-bd70ea3bd4cd /mnt/52f75980-12b1-44b7-b6d5-bd70ea3bd4cd auto nosuid,nodev$
/dev/disk/by-uuid/7538bb0e-c514-4b1e-a451-5a6b3fad49f4 /mnt/7538bb0e-c514-4b1e-a451-5a6b3fad49f4 auto nosuid,nodev$
/dev/disk/by-uuid/eb58ba0d-8dd6-418e-b8d3-8b7757f2d17e /mnt/eb58ba0d-8dd6-418e-b8d3-8b7757f2d17e auto nosuid,nodev$
/dev/disk/by-uuid/fecc8e85-2668-4593-be7d-314b4964e964 
/mnt/fecc8e85-2668-4593-be7d-314b4964e964 auto nosuid,nodev$

下一步该怎么解决这个问题?

更新 1:

在将 crypttab 文件更改为此之后,我再次尝试了上面链接的“更新 initramfs”文章中的步骤

sdc3_crypt /dev/sdc3 none luks,discard

同时更改 /etc/cryptsetup-initramfs/conf-hook 中的 CRYPTSETUP=y

然后在最后一步得到这个'update-initramfs -c -k all'

cryptsetup: ERROR: Couldn't fnd sysfs directory for 253:1

Google 搜索返回了 7 个帖子,但没有一个能解释错误的原因。但删除了 CRYPTSETUP=y 并重试。这完成了该过程,但重启时出现同样的错误

相关内容