Score:0

Add Second Existing LUKS Encrypted Ubuntu Install To Grub (OS on Separate Physical Drive)

bn flag

Summary

I need to have two GRUB options to choose which LUKS encrypted Ubuntu is started, the install on my first drive, or the install on my second drive.

Details

I have two existing, all ready, installed, LUKS encrypted Ubuntu installs on two separate drives in the system.

How do I add a second option to GRUB to boot to the second OS?

I must use these two separately installed OS, I cannot use any other method to run the two different setups.

I believe that both have unencrypted boot partitions, I can double check this later.


More Information

Grub

OS Prober

AFAIK OS Prober can't find installs on encrypted drives. However, I did mount the second OS drive, unencrypted, and it appeared to find it.

It just isn't listed as an option.

OS Lists

I've read mention of listings of the installed OS' somewhere in the grub setup, but literally can't find a single mention of where. My StartPage-fu isn't what it was. sadface

Other Searches

All the searches and results that I have found are addressing different concerns, or seemingly obfuscated to the realms of feeling gatekept. I know that they maybe don't intend that.

BIOS Selection

I cannot stress enough how much this doesn't require attention to be fixed so that it can be the choosing method. It it not the question, and I must not be choosing my OS from BIOS. If that is the question that you wish to answer, I beg of you please don't answer it here. Similarly if you wish to recommend other methods of operating the second install.

However, when I choose the second drive to boot to, it still boots to the first primary. I assume that this is because it looks at the boot partition on the first drive regardless. Either way, I do not wish to choose the boot from BIOS, it must be from grub.

oldfred avatar
cn flag
Are both installs in UEFI (or old BIOS)? Do you have an ESP on second drive with boot files for second drive? I prefer an ESP on every drive, if just for backup as Ubuntu default installs only to first drive. If both UEFI, and have second ESP, you can use a grub configfile entry. Or if booting from unencrypted install to encrypted, you have to install the LVM & crypt2 drivers & mount before running os-prober. GRUB(v2.06) allows to boot Linux from a LUKS-encrypted /boot partition (even one inside a LVM) with the GRUB_ENABLE_CRYPTODISK=y key and the appropriate LUKS or LUKS2 modules loaded.
influentialeliot avatar
bn flag
Thanks for the response, @oldfred. Both drives have a grub partition, but I believe the second install (installed first, as I'd tried it the other way around already) somehow is looking at the grub partition in the first drive for whatever reason. They are both showing in UEFI (sorry I didn't make that clearer) but when I select the second one it just loads the first. Both have an unencrypted boot partition on their respective drive, and a LUKS encripted rest of the thing (with a flappy bit inbetween).
oldfred avatar
cn flag
There is not a grub partition. You have either an ESP - efi system partition for UEFI boot or a bios_grub partition for very old BIOS boot. Ubuntu's Ubiquity installer always installs boot files to ESP on first drive if UEFI. Newer Ubuntu has Subiquity installer which lets you choose drive. Please copy & paste the pastebin link to the BootInfo summary report ( do not post report), do not run the auto fix till reviewed. Use often updated ppa version over somewhat older ISO with your USB installer or any working install. https://help.ubuntu.com/community/Boot-Repair
influentialeliot avatar
bn flag
Let's assume, then, that I have an ESP, then on both drives.
oldfred avatar
cn flag
I cannot assume. This shows all the details of your installs. If encrypted mount & decrypt before running report, so everything is included. Please copy & paste the pastebin link to the BootInfo summary report ( do not post report), do not run the auto fix till reviewed. Use often updated ppa version over somewhat older ISO with your USB installer or any working install. https://help.ubuntu.com/community/Boot-Repair
influentialeliot avatar
bn flag
I don't say this nastily, but I'll wait for someone that can think outside of their own pre-set boundaries, but thank you so much for engaging with me, Fred. If that's no-one, that's OK, too ... I have no entitlement here. :-)
oldfred avatar
cn flag
If you prefer to do it yourself, review this bug. It applies to Ubuntu installs using Ubiquity. https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379 Some flavors and newest Ubuntu use a different installer.
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.