Re: LUKS2 and GRUB
Reply #2 –
I would like to see grub installed first and then configure it. My goal is to keep the grub file on the ESP partition and encrypt everything else. This is how I do it:
/dev/vda1 ESP 10M
/dev/vda2 LUKS 100%
cryptsetup luksFormat /dev/vda2
cryptsetup luksOpen /dev/vda2 lvm
pvcreate /dev/mapper/lvm
vgcreate main /dev/mapper/lvm
lvcreate -L 20G main -n root
lvcreate -l 100%FREE main -n home
mkfs.vfat -F32 /dev/vda1
mkfs.ext4 /dev/mapper/main-root
mkfs.ext4 /dev/mapper/main-home
mount /dev/mapper/main-root /mnt
mkdir -p /mnt/{boot/efi,home}
mount /dev/vda1 /boot/efi
mount /dev/mapper/main-home /mnt/home
The next step is to install and configure artix.
Now I install grub-improved-luks2-git by pre-installing paru.
paru -S grub-improved-luks2-git --noconfirm
And the grub installation command
grub-install --target=x86_64-efi /dev/vda --recheck
or
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
or
grub-install --target=x86_64-efi --efi-directory=/boot/ --bootloader-id=GRUB
The next thing I can do is to
grub-mkconfig -o /boot/grub/grub.cfg
Now after rebooting I don't see grub that was installed before, but this
https://i.ibb.co/Z8SB5M7/grub.png