Article 6DJDQ When booting Slackware with encrypted /boot and LVM, it doesnt detects /dev/sda3 (that contains the system) to decrypt (REPOST)

When booting Slackware with encrypted /boot and LVM, it doesnt detects /dev/sda3 (that contains the system) to decrypt (REPOST)

by
I7sReact
from LinuxQuestions.org on (#6DJDQ)
So, im doing a minimal install of Slackware 15.0 amd64, with encrypted /boot and LVM partitions. Im installing the system in a External USB HDD, so im gonna use GRUB instead of ELILO because is better to boot in other machines. When finished the installation and its tinkering, i reboot, and loads the GRUB unlocking phase, were has no problems, but when booting the system and loading the kernel, it says that didnt found /dev/sda3 (the partition that contains the LVM with / and /home). So im gonna write my steps here:

1- Partitioning

Code:/dev/sda (1TB, GPT)

/dev/sda1 -> /boot/efi (512MiB, vFAT)

/dev/sda2 (1024MiB, LUKS1)
|_slackware_boot -> /boot (1022MiB, EXT4)

/dev/sda3 (300GiB, LUKS2 with argon2id)
|_slackware_sys
|_system (300GiB, Volume Group)
|_root -> / (70GiB, EXT4)
|_home -> /home (230GiB, EXT4)2- Installation of the system

After partitioning, i start the Slackware installer and go through till the end with nothing extra, the only thing i dont do is installing a DE, configuring a xinitrc configuration or install LILO or ELILO (since im going to use GRUB). After finishing the install, i exit and go to the shell and chroot to /mnt (where the system is installed).

3- Editing the /etc/default/grub

I add:

Code:GRUB_ENABLE_CRYPTODISK=yAnd in the kernel paramaters line of GRUB, i add:

Code:cryptdevice=UUID=<UUID of /dev/sda3>:slackware_sys root=/dev/system/root4- Editing /etc/crypttab

Code:slackware_boot UUID=<UUID of /dev/sda2> none luks
slackware_sys UUID=<UUID of /dev/sda3> none luks(Its set to none because i dont know how to setup a keyfile correctly)

5- Editing /etc/fstab

I change /dev/sda1, /dev/mapper/slackware_boot, /dev/system/root and /dev/system/home to its UUIDs counterparts

6- Rebuild the initrd

Using the mkinitrd tool, i use the following flags:

Code:mkinitrd -c -k 5.15.19 -m usb-storage:ehci-hcd:usbhid:jbd2:ext4 -f ext4 -r /dev/system/root -C /dev/sda3 -L -l br-abnt27- Installing GRUB

Code:grub-install --target=x86_64-efi --efi-directory=/boot/efi --removable --recheck
grub-mkconfig -o /boot/grub/grub.cfg8- Finishing the installation and rebooting

So after finishing, i exit chroot and reboot the machine. It has a boot entry and i can boot to GRUB of the Slackware install, appearing the prompt to unlock it, i can unlock it with no hassel. But after that, when booting the system and loading the kernel, it says that didnt find /dev/sda3 to decrypt it, so launching me to some type of emergency mode

This is a repost because of bug that happened to my anterior one
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments