Why is my Grub + LUKS configuration breaking all the time again?

Yes I executed the lsblk command in the chroot.
Now that my system is booting normally again, it shows the UUIDs as well:

lsblk -f                                                                                                                   ✔ 

NAME                                          FSTYPE      FSVER LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1                                                                                                                        
├─nvme0n1p1                                   vfat        FAT32 BOOT       2A3C-FC50                             479,6M     6% /boot/efi
├─nvme0n1p2                                   ext4        1.0   linux boot 6542643d-e55f-448e-9edf-7974b392716a  766,4M    14% /boot
├─nvme0n1p3                                   crypto_LUKS 1                e30b42ae-6a14-4c68-a4ba-6cca0d90f151                
│ └─luks-e30b42ae-6a14-4c68-a4ba-6cca0d90f151 ext4        1.0              e42042bf-f4bf-4c84-8dc9-8f4cc745b18a  306,1G    47% /
├─nvme0n1p4                                                                                                                    
├─nvme0n1p5                                   ntfs                         7EF64129F640E2CF                                    
└─nvme0n1p6                                   ntfs                         A8648CA7648C7A38

Do you still think, that the UUIDs in the grub config are incorrect?
If yes, I am very open for suggestions. I would like to get it done right this time.

Edit: If I undestand the grub configuration correctly, cryptdevice=UUID=e30b42ae-6a14-4c68-a4ba-6cca0d90f151:luks-e30b42ae-6a14-4c68-a4ba-6cca0d90f151 maps the device with the UUID “e30b42…” to the device-mapper name “luks-e30b42…” (just as I did with the “mydata” device manually).
root=/dev/mapper/luks-e30b42ae-6a14-4c68-a4ba-6cca0d90f151 then tells initrd (?) the location of the mapped root partition, right?

I just said it look strange to me … I need to think and perhaps do some testing to

I never bothered with that.
Further up I posted my /etc/mkinitcpio.conf
With that I do only see the Plymouth boot animation after I input the password - so basically just like what you describe.

Perhaps the keyword “encrypt” needs to shift one position (or a few?) to the left - or something needs to change in
/etc/default/grub.
I don’t know - I never spent time on it.

On the contrary:
I tend to keep things as simple as possible - in some installations I have removed the encrypt keyword from that file, the splash keyword from the grub config and deinstalled plymouth.

I don’t get why people use the luks-uuid format for mapped devices (though perhaps it’s the installer), it’s incredibly long and unreadable for no reason.

This is much better:

cryptdevice=UUID=e30b42ae-6a14-4c68-a4ba-6cca0d90f151:root root=/dev/mapper/root

You can label the partition so you can keep track easily.

https://wiki.archlinux.org/title/Dm-crypt/Encrypting_an_entire_system#Configuring_the_boot_loader

I agree but it is how the installer do it - unfortunately.

I use labelling - cryptsystem for the luks part and system for unencrypted part.

3 Likes

Good point, I also changed the labels now to make them more readable.
Unfortunately, that’s just how the installer set it up for me and since I didn’t understand how the whole system works until today, I never changed it.

1 Like

Right, I have missed that.
Now that I added the Plymouth hook, the password UI screen appears again and I like it that way.
Otherwise, it always looks a bit too hacky when I boot the PC, at least for my taste :sweat_smile:

Thanks a lot to all of you for your great help (as always :slight_smile: )

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.