The officially official Devuan Forum!

You are not logged in.

#1 2022-06-29 12:30:00

kyuss
Member
Registered: 2022-06-28
Posts: 21  

Encrypted installation + dual boot

First, hello im new here, so hello first of all and devuan is a great systemd free fork of debian.

Ive recently installed devuan 4 on my drive and wanted to know if its possible to have an encrypted dual boot scenario as follows?

devuan 4 boot partition = /dev/sda1 (ext2)
devuan 4 root partition = /dev/sda2 (encrypted luks ext4)
other linux = /dev/sda3 (encrypted luks ext4)

Want i want if possible is to add a partition and install anther linux like say voidlinux and have it encrypted as well.

scheme layout would be like so,

devuan = /dev/sda1 - /dev/sda2
voidlinux = /dev/sda3

both /dev/sda2  and /dev/sda3 would be using just plain dm-crypt.

Can this be achieved via the grub boot loader or do i need to use some other method?

I know how to setup a plain dm-crypt archlinux installation so i have some knowledge, but cant find any info if this is possible what im asking here?

May the fork be with you!

Last edited by kyuss (2022-06-29 12:30:11)

Offline

#2 2022-06-29 17:47:53

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,409  

Re: Encrypted installation + dual boot

I think the easiest way to do it is to make a fourth partition to use as a separate /boot for the second linux. Then decide which linux will rule grub and only let that one do grub-install (or do it last from that one.)

Whichever one rules grub, you will have to create a boot entry manually for the other one, because os-prober won't find encrypted root filesystems. Put your entries in /etc/grub.d/40_custom and run update-grub to generate the boot menu.

I think it's possible to let the two systems share a boot partition, but there may be some tricks involved to avoid problems if/when grub packages are updated. It's also possible to have the /boot directory inside the encrypted root partition if /etc/default/grub has a line with GRUB_ENABLE_CRYPTODISK=y.

Edit: Here are a couple of old discussions that might be helpful:
https://forums.debian.net/viewtopic.php?p=352368
https://forums.debian.net/viewtopic.php?f=16&t=115362

Offline

#3 2022-06-29 20:16:22

rolfie
Member
Registered: 2017-11-25
Posts: 1,047  

Re: Encrypted installation + dual boot

Got Arch, Beowulf and Chimaera working independently from each other, all encrypted. Boundary conditions: modern X570 MB configured to UEFI only, NVME gpt partitioned. Arch w/o separate /boot, Beowulf and Chimaera with separate individual /boot partitions. Per default Chimaera is booted, if I want Beowulf or Arch I need to use the F8 key on my MB to select the OS to be started.

Offline

#4 2022-06-30 11:50:30

kyuss
Member
Registered: 2022-06-28
Posts: 21  

Re: Encrypted installation + dual boot

Appreciate the info, thanks fsmithred and rolfie. I will give your idea a try fsmithred on a spare disk i have.

Rolfie i only have an old bios boot machine so uefi is a no go for me, thanks anyway.

Offline

Board footer