加密启动下降到shell,如何一致地设置LVM crypttab? '警报! {逻辑卷路径}不存在'

加密启动下降到shell,如何一致地设置LVM crypttab? '警报! {逻辑卷路径}不存在'

我使用 Luks 加密了整个硬盘驱动器,并将该sda驱动器创建为物理卷。在该卷下,我vg00使用 3 个逻辑卷创建一个卷组

lv00_rootlv01_homelv02_swap 这是我的逻辑卷,包含在vg00物理卷上的卷组中/dev/sda

xubuntu@xubuntu:~$ sudo lvdisplay /dev/vg00
  --- Logical volume ---
  LV Path                /dev/vg00/lv00_root
  LV Name                lv00_root
  VG Name                vg00
  LV UUID                9bzRlY-LWT3-YBV5-yK9U-s3yT-n8MR-B5HjAP
  LV Write Access        read/write
  LV Creation host, time xubuntu, 2015-08-28 05:11:15 +0000
  LV Status              available
  # open                 1
  LV Size                12.00 GiB
  Current LE             3072
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:1

  --- Logical volume ---
  LV Path                /dev/vg00/lv01_home
  LV Name                lv01_home
  VG Name                vg00
  LV UUID                B9Ykg2-65Aq-fOS2-1T9I-msfW-OlLf-yMDJT5
  LV Write Access        read/write
  LV Creation host, time xubuntu, 2015-08-28 05:11:29 +0000
  LV Status              available
  # open                 1
  LV Size                15.00 GiB
  Current LE             3840
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:2

  --- Logical volume ---
  LV Path                /dev/vg00/lv02_swap
  LV Name                lv02_swap
  VG Name                vg00
  LV UUID                HHiMFa-D9fi-RH6B-ITN6-olQW-Fx0A-FSSzsY
  LV Write Access        read/write
  LV Creation host, time xubuntu, 2015-08-28 05:11:41 +0000
  LV Status              available
  # open                 0
  LV Size                2.00 GiB
  Current LE             512
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:3

我的fstab如下(注意我已经尝试将 /dev/sda UUID 作为条目,现在评论):

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
#UUID=d6055580-65af-4ef0-aba5-dfcecaa0c82f none luks defaults 0 1
/dev/mapper/vg00-lv00_root /               ext4    errors=remount-ro 0       1
# /boot was on /dev/sdb1 during installation
UUID=05b8b1aa-4067-4938-ad02-72c3d7fb7331 /boot           ext2    defaults     $
/dev/mapper/vg00-lv01_home /home           ext4    defaults        0       2
/dev/mapper/vg00-lv02_swap none            swap    sw              0       0

/etc/crypttab的如下:

roothd UUID=d6055580-65af-4ef0-aba5-dfcecaa0c82f none luks

在引导加载程序解锁屏幕上,我想输入一个现有的驱动器密码并解锁包含所有逻辑卷的/dev/sda卷组。vg00

我确实在对或update-initramfs -u进行任何更改后运行fstabcrypttab

当我启动时,在 grub 屏幕之后,我将进入 Ubuntu shell ALERT! /dev/mapper/vg00-lv00_root does not exist

我怀疑这是 grub 的问题,因为 grub.cfg 将其 linuxinitramfs生成的映像设置为 的路径/dev/mapper/vg00-lv00_root。显然我需要先解密/dev/sda父物理卷,然后 grub 才能访问它。

仅供参考我大致遵循教程

任何帮助表示赞赏

相关内容