Install of 26.04 Desktop without bootloader

Ubuntu Version:
26.04 LTS

Problem Description:
I’m trying to install 26.04 without Grub and mount the ESP to /efi.

Relevant System Information:
I already have an ESP with rEFInd and I want to mount that ESP to /efi for better segmentation.

What I’ve Tried:
I’ve tried to change the mount point of the ESP from /boot/efi to /efi in the installer but there’s an error with the installer when I try to do this.

I have no clue on how not to install Grub since ubiquity --no-bootloader appears to not be doable anymore.

My Questions:

  • Can I install 26.04 without Grub or should I do a normal install then remove it from the ESP?
  • Can I mount the ESP to /efi from the installer or should I let it mount the partition to /boot/efi and edit the fstab when the install is complete?

Thank you for your help :folded_hands:

The installer ubiquity was last the default desktop installer for Ubuntu 22.10, with later Desktop installs being made by ubuntu-desktop-installer, so ubiquity hasn’t existed for some time (though a legacy ISO with it existed up to Ubuntu 23.10 Desktop).

Your hardware will dictate what bootloader is required, but 26.04 will install without an ESP (uEFI System Partition) though by default it does try and create/use one. I’ve done it with calamares (used by some flavors) and ubuntu-desktop-installer (used by Ubuntu Desktop & most flavors), but that was on old legacy (pre-EFI) hardware which didn’t need an ESP to boot (ie. the installer wrote the bootloader (grub stage 0) to MBR or master boot record).

The manual partitioning options allow you to specify what location is used for ESP (ie. /boot/efi) as that is the directory the system expects ESP to use.

You’re free to put /efi anywhere you like I expect (I’ve never QA tested creating it, but I wouldn’t expect that to be a problem); but it’ll just be a directory; as ESP is expected to be mounted to /boot/efi. You do have some control over where /boot/efi goes, but it must be compatible with your firmware settings for the machine to boot.

I have installed 26.04 on a system ignoring a prior ESP (as well as installing without one too covered earlier) by just telling the installer to do what I want, but its machine firmware that controls the initial boot process. Multiple ESP partitions on a drive are undefined and shouldn’t exist by standard as I understand it, thus booting results will be machine specific (ie. determined by machine firmware coding)

That is my understanding anyway; and I’ve not tried to install 26.04 without GRUB; I can’t see why you’d want to, I’d just let it install how it wants, then change the system post-install to be the way I want it.

FYI: My ignoring an existing ESP was because it was a [small] Microsoft Windows 11 ESP which I felt was too small (for 3 OSes), so just created another which is now used instead; allowing me to revert it if I ever want to. Not using the ESP was because calamares will default to not creating one IF legacy or non-EFI boot is detected on boot; so I’ve performed multiple QA test installs using Ubuntu Desktop/Xubuntu etc alongside the initial calamares installed system to ensure it’s still worked; all releases up to and including Ubuntu 26.04.

2 Likes

Hello, thank you for your answser!

So, here is the manual partitioning screen.

Look at what’s happening when I try to change the mount point:

Have you ever experienced that?

I don’t need Grub. Why would I want to install it, then thinker with the system to remove it afterwards?

I’m not sure why you’re talking about multiple ESPs? On my system, I already have an ESP and don’t want to create another one, that’s the thing. My bootloader will load the kernel from /boot automatically (/root being on the root partition).

Can I install 26.04 without Grub or should I do a normal install then remove it from the ESP?

The answer to that question must be: The Ubuntu installer will always insist on installing the Grub boot loader.

Can I mount the ESP to /efi from the installer or should I let it mount the partition to /boot/efi and edit the fstab when the install is complete?

The answer to that question must also be no.

The installer is programmed to install some Grub boot files in the ESP and then some other Grub boot files in /boot/grub. The installer is not programmed to allow the user to choose to mount the ESP to /efi. It defaults to /boot/efi because it is creating folders at both /boot/grub and /boot/efi and putting files in them.

I am sure that you have worked this out for yourself. The installer is not letting you do what you want. It cannot go outside its program.

4 Likes

Most systems do not like multiple ESPs, but you can have multiple FAT32 and move esp,boot flags back & forth. Once installed grub does not use esp,boot flags, but the mount fo esp in fstab to know which partition is ESP.

Or create a temporary ESP, install the grub you do not want into it and then delete it. You will have to update fstab to remove mount of invalid ESP.

You probably have to remove the UEFI entry with efibootmgr as grub will create a new or overwrite the “ubuntu” entry in UEFI using the partUUID/GUID of the ESP used for install. If using another Ubuntu for grub, you have to first boot into install you want and to a grub-install to reset UEFI entry,

Perhaps because the installer only considers an install successful when it left you with a bootable system for which it needs to install grub (which is the only supported boot method in Ubuntu on x86 nowadays), it is simply not designed to do a “partial install”…

You could perhaps grab a cloud image, dd it to the target device, boot it and install the Ubuntu desktop task with tasksel there… or use debootstrap to set up the system.

2 Likes

That’s probably because the directory /efi doesn’t exist and is thus an invalid mount point. You’d need to manually create it in the target filesystem, first. At least that’s what I reckon to be the immediate cause of that error.

BTW, if you absolutely must have the ESP in /efi, there’s always mount --bind /boot/efi /efi. But, personally, I don’t see the point; ./efi is related to booting the machine, no matter the boot loader, so why insist on having it in /. It’s not exactly compliant with best practices / standards.

1 Like

I agree that /efi may not be the best. Actually, I should probably mount the ESP to /boot.

Mounting the ESP to /boot/efi is an old and not recommended pattern:

That’s what the UAPI authors think, which is still up for debate, I guess. I don’t much like their usurpation of FHS.

They could have chosen to do /boot/{loader,efi} just as well. I don’t like new directories in / very much. You were talking about segmentation, weren’t you? :wink:

1 Like

This is a good behavior when you want to install the OS on a blank system.

I may be wrong on this, but I believe there are lighter competitors to grub these days. The UEFI is capable of loading the kernel on its own, or systemd-boot seems like a light option.

The manual partitioning on the installer is advertised as “advanced” but I feel like you end up with the same system as if you chose “Install alongside XXX”.

You are right, in that there is systemd-boot, for instance. In fact, I have pointed out multiple times that GRUB is pretty much redundant, given how UEFI/ESP boot works. But Unbuntu, at least for the time being, only supports GRUB.

Maybe grab a coffee and have a read of this thread:

1 Like

I think you have the answer to your original questions but it should be noted that in the past, some Linux systems gave users the option to NOT install a bootloader, to install to the MBR of the drive or to install to the PBR. This seemed fairly common with Grub legacy. Some current systems such as Slackware and a few others give options, Ubuntu does not. Seems a bit odd to me as multibooting seems to be much more common but that is a decision made by the developers.

The link below is the installer page for the Devuan OS which explicitly shows those options for a legacy install if you scroll down the page a bit. When you install a linux OS, it will create a separate folder on the EFI partition for its EFI boot files so these files do not overwrite or interfere with others. There are exceptions to this and Devuan is one example as it creates a directory there named ‘debian’ which would have overwritten the previous contents of a Debian installation if it existed. This also happens with Ubuntu derivatives as many of them use the name ‘ubuntu’ in the EFI directory.

https://www.devuan.org/os/documentation/install-guides/beowulf/live-gui

Which EFI boot files?

rEFInd for example can load the kernel from /boot. You don’t need to move it to the ESP.

Well, it does offer options, just not every single one of them. You can still install on legacy BIOS machines and do that MBR/PBR dance, IIRC.

GRUB2 is a historical mistake, because it’s essentially morphed into a mini-OS, shell and all. And it’s security track record is pretty dismal, given that they have to re-implement parts of the Linux kernel for most of the fancy stuff. In the thread I linked above, there’s a reference to the very GRUB2 maintainer proposing to do away with it.

1 Like

@iamthomasremy

Now you are being selective in the evidence you present. Your first link is dated 25th July 2016.

And from your second link you ignore this statement:

all installed OSes use the same place for boot loader menu entries.

1 Like

So, in 2016 mounting the ESP to /boot/efi was already not recommended (if we trust the UAPI Group).

I never argued about that point tho. I do believe that the best option is to use UKIs (which need to be stored in the ESP).

To add one note to @oldfred’s comment: debootstrap gives you all the rope you want; no need to use the Ubuntu installer if you have such special needs.

1 Like

I’ll probably end up using it since there’s no easy way using the installer.

I just don’t understand why there is not a simple checkbox or something in the installer to skip the bootloader part (like in the Debian installer). I feel like it’s a pretty basic thing to do if you have at least another OS already installed on the system.

That’s what I figured, given that you’d have to undo everything you don’t like about what the installer does.

The Desktop installer is meant for users who might never have used a computer before, so it only offers what’s actually supported. Ubuntu without GRUB2 is not an officially supported option, and even the GRUB setup options are limited, e.g. you can’t have GRUB without a separate unencrypted /boot in case of Full Disk Encryption (FDE); see aforementioned thread for details on that – before you say it’s insecure, do read it to the end.
Also, GRUB is pretty much the way of doing dual boot on Linux, so I don’t know what your point about “other OS” is about.

Advanced users are free to do pretty much anything they like with their Ubuntu installation, starting with how they install it (debootstrap, mini.iso). But they are pretty much on their own for support.

Yes I’ve experienced system program problem detected, and my first reaction is did I verify the media check completed?? ie. what I write about in an answer on this support question as whilst bad downloads are extremely rare I still checksum the ISO anyway, but I have found 3-5% of ISO writes to thumb-drives are imperfect (even if its only 1 bit per 1.5 million) as flash media is made to price.

4 Likes