You are not logged in.
I am trying to setup arch, linux mint and gentoo on my hard drive. I want all of them to be encrypted. They problem arises when I am trying to boot from them since in order to boot arch from encrypted partition you have to edit grub config. I don't know how to do that for multiple encrypted linux. I can use another bootloader if anyone know better alternate that supports booting from multiple encrypted paritions.
Last edited by r8hb98 (2023-11-07 00:27:58)
Offline
i havent used grub with multi-boot for a long time but will try and help best i can.
this is the part you want: https://wiki.archlinux.org/title/Dm-cry … oot_loader
you only really need the 'cryptdevice' part cause grub handles the 'root' when you run 'grub-mkconfig', so just put the 'cryptdevice' string in your '/etc/default/grub' under 'GRUB_CMDLINE_LINUX_DEFAULT'
remember the uuid is for the luks container NOT the root parition inside, the 'root' part is then the '/dev/mapper/whatever'.
if your still stuck please provide these outputs using code tags, and make sure all your partitions are unlocked if they are in seperate luks containers:
lsblk -f
also indicate which partitions are what, like "root for arch", "root for mint" etc if its not obvious in the lsblk output.
also this for each system:
cat /etc/default/grub
and lastly the grub.cfg for the grub thats being used to boot from:
cat /boot/grub/grub.cfg
Offline
I want to install 3 different operating system on the single drive so for that I will have 3 root partitions and boot partitions. I am thinking that you meant that I need only 'cryptdevice=UUID=xyz'. This will not work since uuid is not same for all the paritions.
Anyway here is the uuid
Mint luks = be19dd62-ac41-414a-8939-a3e7a5ba70a2
/dev/mapper/mint-root = dd90c7e4-bec5-4d82-8ac7-b5839e28c67b
Arch luks = 5d7d0ebe-c796-454c-8369-df89f728dfea
/dev/mapper/arch-root = ea23b516-88c8-464e-9fe1-aa45ecb634ab
gentoo luks = dd7811c6-f0f6-43d0-b022-8ca0f5e2bc69
/dev/mapper/gentoo-root = 11c69e39-a00e-411d-a865-95da15005fea
Offline
you need to configure 3 seperate grubs, edit '/etc/default/grub' on each system like i said and generate a grub.cfg, then on the master grub which is the one you will be using to boot from you need to make sure 'os-prober' is installed and configured to work: https://wiki.archlinux.org/title/GRUB#D … ng_systems , which should do all the hard work for you.
obviously you can type all this up manually but you said thats not what you wanted to do.
also make sure your all your systems have their mkinitcpio.conf configured for luks too: https://wiki.archlinux.org/title/Dm-cry … mkinitcpio
EDIT: here is an example grub snippet of the os-prober section of grub.cfg, i just plugged in an external drive with arch on it and ran grub-mkconfig with os-prober enabled, obviously this install is not encrypted but you get the idea.
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Arch Linux (on /dev/sdb4)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-c96c2c43-a837-48b3-9dfc-************' {
insmod part_gpt
insmod ext2
set root='hd1,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt4 --hint-efi=hd1,gpt4 --hint-baremetal=ahci1,gpt4 c96c2c43-a837-48b3-9dfc-************
else
search --no-floppy --fs-uuid --set=root c96c2c43-a837-48b3-9dfc-************
fi
linux /boot/vmlinuz-linux root=UUID=c96c2c43-a837-48b3-9dfc-************ rw loglevel=3 quiet audit=0
initrd /boot/initramfs-linux.img
}
Last edited by jonno2002 (2023-11-08 18:48:35)
Offline