我按照这里的说明进行操作 -在具有 UEFI BIOS 的机器上安装具有 RAID 1 和 LVM 的 Ubuntu 20.04 桌面但使用 Ubuntu 服务器安装程序来配置分区布局,并增加了创建由 LVM 管理的加密分区的额外步骤,
安装并重新启动后,它只会将我带到 grub 提示符。
在选择重新启动之前,安装最终将呈现以下布局:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
...
|-sda1 8:1 0 1G 0 part /target/boot/efi
`-sda2 8:2 0 23.9G 0 part
`-md0 9:0 0 23.9G 0 raid1
`-md0p1 259:1 0 23.9G 0 part
`-dm_crypt-0 253:0 0 23.9G 0 crypt
`-vg0-lv--0 253:1 0 23.9G 0 lvm /target
sdb 8:16 0 50G 0 disk
`-md1 9:1 0 50G 0 raid1
`-dm_crypt-1 253:2 0 50G 0 crypt
sdc 8:32 0 50G 0 disk
`-md1 9:1 0 50G 0 raid1
`-dm_crypt-1 253:2 0 50G 0 crypt
sdd 8:48 0 25G 0 disk
|-sdd1 8:49 0 1G 0 part
`-sdd2 8:50 0 23.9G 0 part
`-md0 9:0 0 23.9G 0 raid1
`-md0p1 259:1 0 23.9G 0 part
`-dm_crypt-0 253:0 0 23.9G 0 crypt
`-vg0-lv--0 253:1 0 23.9G 0 lvm /target
...
然后我进入 chroot 到 /target 并安装了 mdadm、cryptsetup 以及 lvm2,然后运行update-initramfs -u -k all
,
检查 md0 的状态,我发现它正在运行并且完好无损。
/dev/md0:
Version : 1.2
Creation Time : Fri Dec 15 23:53:14 2023
Raid Level : raid1
Array Size : 25094144 (23.93 GiB 25.70 GB)
Used Dev Size : 25094144 (23.93 GiB 25.70 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Mon Dec 18 19:46:37 2023
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Consistency Policy : resync
Name : ubuntu-server:0
UUID : b233dc76:68e9667a:90caf67d:248a5d57
Events : 457
Number Major Minor RaidDevice State
0 8 50 0 active sync /dev/sdd2
1 8 18 1 active sync /dev/sdb2
blkid 的输出与启动磁盘相关的部分,
/dev/sda1: UUID="6E2B-4461" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="a78ee060-80ff-48b5-8f28-968ba4a058d8"
/dev/sda2: UUID="b233dc76-68e9-667a-90ca-f67d248a5d57" UUID_SUB="0c2ddd98-fd1f-4dc7-9101-13966ce90210" LABEL="ubuntu-server:0" TYPE="linux_raid_member" PARTUUID="26ffcb1e-e49c-4920-9d4d-c6699422a25e"
/dev/sdd1: UUID="6E53-B051" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="566d3ac6-5c0b-4235-979d-2034e7a9b31e"
/dev/sdd2: UUID="b233dc76-68e9-667a-90ca-f67d248a5d57" UUID_SUB="e5a0cf7c-306e-9ca1-4669-5c72558ae229" LABEL="ubuntu-server:0" TYPE="linux_raid_member" PARTUUID="5fc3721e-2f79-43b7-bb41-d1aad99acd53"
/dev/md0p1: UUID="58f96d67-465c-400f-bb07-145330231c9f" TYPE="crypto_LUKS" PARTUUID="daedffe6-6c65-45b9-a0d0-dd48559c49d2"
/dev/mapper/dm_crypt-0: UUID="TJqD5z-843X-5r0D-QSzv-9mZG-Z3Ns-LtkdTb" TYPE="LVM2_member"
/dev/mapper/vg0-lv--0: UUID="2a0a9c3d-c9b7-4bf3-94df-cf59ea51bcac" BLOCK_SIZE="4096" TYPE="ext4"
的内容/etc/crypttab
dm_crypt-0 UUID=58f96d67-465c-400f-bb07-145330231c9f none luks
dm_crypt-1 UUID=0d2970ec-903a-4692-87d7-f23557837e0e none luks
以及内容/etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/vg0/lv-0 during curtin installation
/dev/disk/by-id/dm-uuid-LVM-N1205C9Cu7efVNdldEmtXnybJIAatiWaasaZc5e7x8qbTMn3MpiPZwSgvIY9TjT5 / ext4 defaults 0 1
# /boot/efi was on /dev/sda1 during curtin installation
/dev/disk/by-uuid/6E2B-4461 /boot/efi vfat defaults 0 1
/swap.img none swap sw 0 0```
据我所知,一切似乎都配置正确,但第二次重启后仍然进入 grub 提示符……
什么配置不正确,或者我遇到了错误?