2

I followed the instructions here - Install Ubuntu 20.04 desktop with RAID 1 and LVM on machine with UEFI BIOS but used the Ubuntu Server Installer to configure the partition layout and added an extra step of creating encrypted partition managed by LVM,

After the installation and a reboot it just drops me to a grub prompt.

The install ends up with the layout below, before choosing reboot:

    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
...

I then entered a chroot into /target and installed mdadm, cryptsetup as well as lvm2 and ran update-initramfs -u -k all,

Checking the status of md0 I see that it is running and intact.

/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

The output of blkid with the parts pretaining to the boot disks,

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

The the contents of /etc/crypttab

dm_crypt-0 UUID=58f96d67-465c-400f-bb07-145330231c9f none luks
dm_crypt-1 UUID=0d2970ec-903a-4692-87d7-f23557837e0e none luks

and the contents of /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```

Everything appears to be correctly configured as far as I can tell but I still end up on the grub prompt after a second reboot....

What hasn't been configured correctly, or did I encounter a bug?

Bob R
  • 203
  • 3
  • 7

0 Answers0