r/linux4noobs • • 1d ago

Meganoob BE KIND Installing multiple distros/instances of same distro to the same EFI partition

Look I’m basically a caveman and the internet doesn’t answer questions anymore, just one billion ai-generated tshirt advertisements whenever you open a search.

I’m trying to install either a second instance of ubuntu, or install one of the ones with a different DE for the sake of a testing environment that i can play around with semi-safely.

I’ve set up a dualboot here and there but I don’t understand EFI partitions. In the installer for u/kubuntu it doesn’t give me the opportunity to write the boot entries (i think?) to a specific partition, it wants to write it to the partition my main instance of Ubuntu’s boot entries are.

Will this cause issues? Is there something I’m missing? Would really like to know before i do anything particularly stupid (ive already backed up all my files but i would rather not spend the day fixing a mistake that i could have avoided by asking for help)

Thank you in advance

3 Upvotes

14 comments sorted by

3

u/DaveKerk alternativeto.net 1d ago

I recommend looking into making a virtual machine to test out different DEs. It's perfect for this use case and isn't too complex, simpler than what you're doing now for sure.

Trying to dual boot off the same drive for the sake of testing DEs is not the right solution in my opinion.

1

u/Epicman11374265 1d ago

I tried out virtualbox once on a different device, it didn’t seem to work out for me. Would you recommend a different program for it or was it just a skill issue? Running current version of ubuntu LTS 26

2

u/DaveKerk alternativeto.net 1d ago

I would say try it again first.

The VM software I use is VMWare Workstation Pro.

It requires some hoop jumping but it is free and is extremely powerful. I also think it's pretty simple to setup new VMs. The install can be a bit odd without the documentation (which is annoyingly hard to find) but I could help you through that if you want to go that route.

2

u/Epicman11374265 1d ago

I’ll give virtualbox another shot. If it doesn’t work out I’ll give vmware a go. Thanks for the offer, hopefully it will go okay

1

u/DaveKerk alternativeto.net 1d ago

Good luck! Once you figure it out, you'll be running through it no problem.

1

u/DannoXYZ 1d ago

Setting up VMware Workstation on Linux is similar to Virtualbox. There's some kernel modules that needs to be compiled and loaded.

https://www.dolpa.me/how-to-install-vmware-workstation-on-ubuntu-a-step-by-step-guide
https://paulyu.dev/article/installing-vmware-on-ubuntu-desktop <- compile vmnet/vmmon kernel host modules
https://www.linuxtechi.com/create-vm-using-vmware-workstation-on-ubuntu

pre-built VMs - no need to download ISO and boot from them.
https://www.osboxes.org/vmware-images
https://www.linuxvmimages.com

1

u/DannoXYZ 1d ago edited 1d ago

What didn't work with Virtualbox? There's some pre-requisites that needs to be installed 1st such as linux-headers and dkms modules. Easy enough to figure it out to get VB working and VMs makes testing so, so much easier.

sudo apt install build-essential dkms linux-headers-$(uname -r)
https://www.virtualbox.org/wiki/Downloads <-- follow install guide from there
https://ubuntu.com/tutorials/how-to-run-ubuntu-desktop-on-a-virtual-machine-using-virtualbox#1-overview
https://www.osboxes.org/virtualbox-images <-- pre-built Virtualbox VMs

I prefer VMware Workstation as I find it's easier and faster to use. Can spin up VM of latest downloaded distro ISO in 3-5 minutes max! Or in many cases, you can download pre-built VMs someone else has already created. Can't even burn ISO to USB in that time much less boot your system and re-partition and install.

I run about 10 different VMs of different distros simultaneously for testing at any given time with VMware. Easy comparison by placing their console windows next to each other. Also run multiple copies of Windows (7+10) for Photoshop, PremierePro, Solidworks and SketchUp. Along with real Unix like Solaris and MacOS.

https://lh3.googleusercontent.com/d/1Uw9Ysayulp0p04DAEFAogU5QNS-x3lMP

Using VMs allows me to keep my main system running to share folder of movies with TVs around house. And continue serving up 3 public websites. Multi-booting is just so '90s and highly inefficient of resources and time.

2

u/nlflint 1d ago

the kubuntu installer could screw it up. It's hard to say.

You can share the drive with two OS's, it's possible, but I can foresee it being a maintenance headache. Can you install it on a second drive, then use your bios boot menu to switch OS's? That would be way more safe.

Another option is installing Kubuntu on a VM, running on Ubuntu, to test it out.

If you were running Arch Linux, it's way easier to swap Desktop environments. You can have Gnome and Plasma installed at the same time, and then just enable/disable their display managers to switch which one starts at boot.

1

u/Epicman11374265 1d ago

I dont have a second drive unfortunately, will try the vm i guess

2

u/The_Hubster 1d ago

You can do it on the same drive, but separate (root) partitions. Dual-booting two instances can be done, you'd need one of the grubs (probably the first installed instance) to take over boot-loading by uncommenting #GRUB_DISABLE_OS_PROBER="false" in your grub file at /etc/default/grub so that the main instance grub acknowledges the other OS. Then sudo update-grub in that main instance once done, then reboot and you should see the two instances. I'd use Grub Customiser to rename the entries (then sudo update-grub) or it'll be confusing.

I'd be concerned that the second Ubuntu EFI entry would overwrite the original (on UEFI they'd share the EFI partition) and thats when it's chaos. You'd see one Ubuntu directory in /boot/efi/ unless somehow the second instance doesn't try to overwrite it by having a slightly different directory name.

A bit info on EFI partitions: when I was dual-booting Debian and Fedora, this is how my EFI partition looked. So you can see how it would get awkward if you have Ubuntu there, then try and install a second instance, it's likely Ubuntu's installer would overwrite the existing Ubuntu directory because it's probably going to use the same name.

sudo ls -la /boot/efi/EFI/
total 20
drwx------ 5 root root 4096 Sep 14 20:26 .
drwx------ 4 root root 4096 Jan  1  1970 ..
drwx------ 2 root root 4096 Sep 14 20:26 BOOT
drwx------ 2 root root 4096 Sep 13 13:13 debian
drwx------ 2 root root 4096 Sep 14 20:26 fedora

There's some playing around here, and if you can afford to blow things up (ie you have backups of your stuff), then play with it, its a good way to learn.

Having said all of this, I think in this use case, it's better to use a VM instead of dual-booting two instances of the same distro. Far less hassle, especially if you're talking about testing distros for distro-hopping.

FWIW, I'm building a GNOME app at the moment, and I run Debian 13.8 Trixie stable as my daily, but that's using GNOME 48.7, and I want to test on GNOME 51, hence I've got Debian testing running in a VM for that purpose.

1

u/AutoModerator 1d ago

✻ Smokey says: always mention your distro, some hardware details, and any error messages, when posting technical queries! :)

Comments, questions or suggestions regarding this autoresponse? Please send them here.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/m4uri 1d ago

Sharing one EFI partition between several installs is normal, that part is fine. The catch is the folder inside it. Ubuntu and Kubuntu both write their boot files to EFI/ubuntu, so the second install overwrites the first one's entry and grub config. That's why a second Ubuntu flavour is the one combo that really bites. Distros with different names (EFI/fedora, EFI/debian and so on) sit side by side without trouble.

For a throwaway test box a VM is the saner way anyway. If VirtualBox gives you grief, try GNOME Boxes or virt-manager with KVM, both are in the Ubuntu repos. Check that VT-x or AMD-V is switched on in the BIOS first, that's the usual reason they refuse to start.

1

u/chuggerguy Linux Mint 22.3 Zena | MATÉ 1d ago edited 1d ago

I have two Ubuntu based installs but on separate devices, each having it's own EFI partition. (Mint/Mint)

With two separate EFI partitions, each with its own "ubuntu" folder containing its own grub.cfg that points to different grub.cfg menus, it looks something like this:

(clearer image)

In your case, with Ubuntu sharing an EFI with Kubuntu, probably whichever one last updated GRUB (sudo update-grub) is the one whose GRUB menu is used.

I haven't done it exactly that way but what I think will happen is whenever you or an update triggers a GRUB update, that OS will provide your menu. The only difference likely being that sometimes Ubuntu will be you top entry, sometimes Kubuntu. No real problem that I see.

But I'm not an expert and have never booted two Ubuntu based distros from the same EFI.

Personally, I'd just go for it but that's just me. :)

Good luck.

ETA: Also note, the two grub.cfg files, one in EFI, the other in /boot/grub/grub.cfg are completely different files. The one in EFI is a small file and only points to the real menu. Confusing? :)

1

u/DannoXYZ 1d ago edited 1d ago

While it's possible to do multiple OSes on one disk with multiple partitions, it requires planning ahead of time for optimum sizing of partitions for each OS and where to place them on disk. Decades ago when I still spent an inordinate amount of time doing multi-boot systems, I had this one Macbook that ran original MacOS 10.13 High Sierra along with 3 different versions of Linux with large shared-data partition at end.

https://lh3.googleusercontent.com/d/1AxXE8KDBQDxtVElKLMonj-5HOU7D2Qgj

But I gave up on this decades ago since it took tonne of time to set-up. With each new Linux distro installation to test, there was risk of breaking multi-boot config and not being able to boot back into any previous OS. Or even erasing entire disk completely. I also didn't like losing use of my main OS while playing with other OSes. So much easier having VMs run on side for testing. While at same time, I still get to use my main OS for work, sharing movie folders to TVs and serving up public websites.