2

I have just installed a new ubuntu on my system which lives alongside another linux distro. My original linux distro uses grub to boot. However now when I boot my laptop it boots into a new grub which originates from the new ubuntu install which doesn't contain entries for my original distroy. If I remove the UEFI entry for ubuntu my machine boots into my original grub which contains a new entry which boots in the new grub.

However the real problem starts then. If I boot into that ubuntu it somehow "restores" the UEFI entry which means on the next boot it again boots into the ubuntu grub.

I have no clue how to fix this. Ideally I just want to have a single grub. But how can I delete the newly installed ubuntu grub and add a correct entry that boots into the new ubuntu?

  • Is other install also Ubuntu or Ubuntu based so not unique entry in UEFI boot menu? Or if unique you can set boot order with efibootmgr or from within UEFI. What brand, model system? askubuntu.com/questions/485261/… See #5 askubuntu.com/questions/1001426/… – oldfred Nov 7 at 3:57
  • Maybe this reading helps you understand what goes on (including firmware's "boot manager"): rodsbooks.com/efi-bootloaders -- try installing os-prober package and running grub-install, that combo might find and configure the other distro too. At least that's what I learned on ALT. – Michael Shigorin Nov 7 at 11:24
1

As rastafile points out there is little cooperation between distributions. Getting to a point that they can work together is harder than it sounds. Where a lot of distributions offer signed versions designed to work with TPMs it's next to impossible to come up with a commercial arrangement allowing one distribution to just drop changes into another's configuration.

However... I would be surprised you've seen any instance of EFI being automatically updated outside of a full install. Package updates will normally trigger update-grub to change the contents of /boot/grub (the grub menu). Updates do not normally trigger grub-install which writes to /boot/efi/EFI/ubuntu.

It's possible that you only removed the BIOS entry for UEFI and not the files. UEFI BIOS entries are a little more tricky and there are things that will notice the files on your EFI partition and automatically re-instate the BIOS entry. Some older (poorly implemented) BIOSs just re-scan the EFI partition every time you boot looking for new entries.

Also note that some distributions will really fight because they have forked from Ubuntu and not bothered to change the location of their EFI files. Specifically I know that Linux Mint uses EFI/ubuntu where really they should have switched to EFI/mint long ago.

If you are seeing problems, just uninstall Ubuntu's Grub:

  • Completely remove grub from Ubuntu. You don't need grub installed in both distributions, if your other distribution is successfully creating grub menu entries for Ubuntu.

    # Find grub packages with 
    dpkg --list | grep grub
    # Remove these packages replacing "..." for the package names.
    sudo apt-get autoremove ...
    
  • As you previously removed the EFI entry in the BIOS then you may also want to remove EFI files from the file system.

    # DO NOT DO THIS IF you are using Linux Mint or Kali
    sudo rm -rf /boot/grub/efi/EFI/ubuntu
    
-1

A clue I have: the new ubuntu seems to make sure it's grub gets booted next time. This would be via efivars - "efibootmgr" - systemd.

See systemd.io/BOOT_LOADER_SPECIFICATION

So you'd just have to turn that off.

As I say, just a hint, and if the solutios is to mask some systemd service with a link to /dev/null I don't know if I should laugh or cry. (Nothing personal of course. I am talking to systemd. I just read "there is little cooperation between multiple distributions...getting everybody to commit to a single boot configuration format that is based on drop-in files,")

man systemd-boot would be the man page. One of them.

bootctl status


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.