You are not logged in.

#1 2021-11-15 20:46:39

Registered: 2021-11-15
Posts: 1

Can not get encryption working with systemd-boot

I have a system without encryption and was able to get a vm without encryption running. I am attempting to use encryption this time.
I have smooth sailing up to the point where i reboot. Upon reboot im always left with a dead system. Either I am unable to find \linuz-linux-zen or unable to find /dev/mapper/MainSystem.

I plan to continue to tinker with my system so I made it as a install script. You can find the install script here ( I was also thrown into the emergency shell using grub.

I tried doing the install without the encrypted home partion and I still get this error.

Here is my end goal.
Have two encrypted systems and 1 encrypted home that is shared bewteen systems. (Sys1 either arch or artix) (sys2 gentoo with CLI only)
The home is BTRFS and contains several partions for research, school, teaching etc.

Right how I am stuck at doint ecrpytion on the first root.
I have been trouble shooting this install for 2 days now, and I would love some help. I do not know what the problem is...

EDIT:: I run first, thenm run in the arch-chroot enviroment.

Last edited by TahaAbbasi-Hashemi (2021-11-15 20:50:43)


#2 2021-11-18 05:47:37

Registered: 2021-07-16
Posts: 43

Re: Can not get encryption working with systemd-boot

Well … looks wrong. It says:

echo -e "MODULES=()\nBINARIES=(btrfs)\nFILES=()\nHOOKS=(base udev autodetect modconf block encrypt filesystems keyboard fsck)\n" > /etc/mkinitcpio.conf

I don't use systemd, but these are hooks for non-systemd boot. For systemd you're supposed to use sd-encrypt not encrypt … mkinitcpio

The error about vmlinuz is probably from …

UUID3=$(blkid -s UUID -o value "$driveP"3)
echo -e "title ArchLinux\n linux /vmlinuz-linux-zen\ninitrd /initramfs-linux-zen.img\n options cryptdevice=UUID="$UUID3":mainSystem:allow-discards root=/dev/mapper/mainSystem rw loglevel=3" > /boot/loader/entries/arch.conf
echo -e "default arch.conf\ntimeout 5\nconsole-mode max\neditor no" >> /boot/loader/loader.conf

Hard to say at a glance what's wrong with how it's formatted. But rather than debugging that, it might be easier to just edit the default file manually. This guy is generating the whole file from scratch, maybe he made a typo somewhere.


Board footer

Powered by FluxBB