Score:0

How to install Ubuntu on a encrypted LUKS partition without a separate UNencryted /boot?

cn flag

Ubuntus horrible installer is a pain point for years for me. And the one that ships with Kubuntu 21.10 got even worse.

There is no reason for the outdated installation structure with a separate unencrypted /boot at all. Grub is able to decrypt LUKS1 disks for many years, yet Ubuntus installer is still stuck in the past. There is also no reason for this utterly stupid annoying LVM setup and a swap partition nobody with 16 GB or more ram even needs. You need one as big as your ram for hybernate I think BUT in my test install Ubuntu created a 900mb swap on my 16 GB ram machine, so what is the point of this? Swap files are not slower for many years as well. And they are simpler, more flexible. Ubuntu always used ext4 so really no point for a swap partition at all, just outdated. Even Btrfs swap files are not supported in Linux. And the funny thing is I noticed a /swapfile in fstab after my custom install attempts, so it seems the installer is actually silently creating a swap file if you not opt the that retarded default setup.

And if that is not enough, the default encrypted setup does not offer an option for leaving disk space empty and demands to occupy my entire disk.

What I want is:

efi
/     LUKS-ext4 ubuntu
free space for maybe another distro
an unencrypted partition I need for VirtualBox stuff that does not work in an encrypted disk
/home LUKS-btrfs

I have 3 or more attempts behind me trying to follow this guide and adjusting it to my needs. I do not want a BTRFS Ubuntu system with rollbacks and Timeshift ... but I like to use Snapper for my /home actually. Other than that, I followed this guide, but I always ended up with en empty Grub screen without a boot menu. I am not sure why.

I saw this 5 year old question and answer and noticed some similarities. But I am looking for an actual up-to-date TESTED guide with (K)ubuntu 21.04 or 21.10. It's incredibly annoying to search for this as 100s of outdated guides come up and most to not to exactly what I want that should be pretty simple.

Open SUSE and I guess other distros as well have a sane installer that simply creates a SINGLE partition that Grub unlocks and everything /boot inside. One difference between the guides I found is that one is copying boot files over and the other it not and manually installing Grub (that does not work for me apparently)

I have seen Ubuntu is working on a new installer. Some hints about some improvements when it comes to guided installation with options to leave free disk space or something like that. But I do not hold my breath, they will actually make a proper installer. I know for a fact that my case is far from an edge case, yet It's very hard to find an up-to-date working guide.

redanimalwar avatar
cn flag
Just noticed this: "Every time you install a new kernel, you should run the custom `grub-mkconfig` command. - Every time you update grub, you should run the custom `grub-install`command." maybe it can be automated. But it seems Ubuntu is just not fit for this setup, even if you get it working. Maybe I just give in to the stupid /boot partition.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.