General problem
I have (seemingly) successfully set up my system with LVM on one hard drive containing Ubuntu and Kubuntu, all encrypted with LUKS (based on the guide from https://help.ubuntu.com/community/Full_Disk_Encryption_Howto_2019), and another hard drive containing a Windows 10 installation. But it doesn't work as it should.
System Overview:
- sda
| - sda1 Windows Recovery
| - sda2 EFI System
| - sda3 Windows
- sdb
|- sdb1 /boot (encrypted LUKS1)
|- sdb2 BIOS
|- sdb3 EFI-SP
|- sdb5 LVM (encrypted LUKS2)
|- vg_linux_ubuntu_root
|- vg_linux_ubuntu_swap
|- vg_linux_kubuntu_root
|- vg_linux_kubuntu_swap
|- vg_linux_linux_shared
PC-Specs: Intel i9-9900k, 64GB RAM, Nvidia GTX 1080Ti, Mainboard Asus Maximus Hero XI
Installation Background
- For a long time I had Windows 10 and Ubuntu running in parallel without any problem. After some upgrades of Ubuntu, some things got messed up and I also wanted to get rid of some stuff I did when I was new to Ubuntu. Furthermore, I wanted to encrypt my data.
- So I reinstalled Ubuntu based on this guide by Ubuntu to achieve full disk encryption. This worked fine.
- I noticed that I couldn't boot into Windows via grub, but decided to fix that later.
- So I installed Kubuntu alongside the Ubuntu installation including all the necessary steps so it runs on the encrypted LVM. This works as well. (Notice: Based on several forums and documentations, multiple distros can use the same /boot partition, so that is what I did (without formatting it first of course)).
- I now see Ubuntu, Kubuntu, and Windows in the grub menu. Booting into the newly installed Kubuntu works perfectly.
Problem 1 (P1_ubu)
Booting into Ubuntu doesn't work anymore.
When selecting Ubuntu in the grub start menu, Kubuntu starts.
Steps I took:
- After checking out the configuration I noticed, that the boot root location was set to Kubuntu. I changed it to the Ubuntu volume. It now seems to select the right volume but has some other problems.
- Next I thought resetting grub might help. So I used the boot-repair-live tool to do that. There I decrypted the LVM and selected Ubuntu as my main system. Everything went through and the grub menu got recreated. Booting into Kubuntu still works, booting into Ubuntu results in landing in the emergency mode console. Via this, I end up in a root shell of my Ubuntu system, so it shouldn't be a problem regarding the encryption.
Running
depmod
and fsck
on the volumes didn't change anything.
Exiting this shell results in a Failed to start default target: Transaction for graphical.target/start is destructive
and gets stuck (as other threads suggested, running fsck on the volumes doesn't change anything).
(One thing to notice is that when trying to boot into Ubuntu the Kubuntu splash screen shows up)
- Selecting an older kernel version to start ubuntu from. This then results in an
initramfs
terminal with no keyboard support (so I can't type in anything).
Edit (2021-09-15):
I noticed that in the /boot folder under EFI only one folder is there. Namely ubuntu
. It seems as, as Kubuntu is a version of Ubuntu, overwrote the files of the ubuntu install as internally they have the same name. Now the question is if I can somehow recreate those original files (I have no backup of those) and rename the ubuntu
folder (used by Kubuntu) to kubuntu
.
Edit (2021-09-17):
I finally managed to get both distributions running side by side. It turned out that Kubunut already installed newer kernel versions than Ubuntu had. I was able to install the latest updates on Ubuntu which then solved the boot issue. As the last step, I just had to change the grub config in order to correctly boot Kubuntu and Ubuntu via the grub menu.
I'm not sure if this breaks again when I update the kernel in one distribution, but I also don't really know if there is a viable other solution. I was looking into having one (encrypted) boot partition by Ubuntu and installing all other distributions with their own /boot folder directly inside the LVM volume. This way I'd expect the Ubuntu Grub to chainload all the other distros, but I'm not sure if this is going to work. Information regarding that use case is a bit scarce.
Problem 2 (P2_win) - Priority 2
I can boot into Windows when booting directly from the drive that contains Windows (via BIOS startup menu). But booting via grub results in an error message and a return to the grub boot menu.
Has anyone dealt with something similar before or has someone an idea how to fix that?