9

Is there any way I can stop Ubuntu from overwriting bootloader?

It happens after updating (I suppose) system's kernel. I want to stay with my other linux distro bootloader without having to change it manually every time a certain update og ubuntu is changing it.

Thanks.

  • 1
    Try to disable or un-install it – Dishank Jindal Jul 27 '14 at 20:48
  • I just stumbled on this answer. tl;dr: uninstall grub* and then apt-mark hold grub* to prevent it from re-installing. – Hendy May 8 '17 at 20:42
5

Grub remembers where to reinstall.

To see what drive grub2 uses see this line - grub-pc/install_devices, check what it is now:

sudo debconf-show grub-pc

to get grub2 to remember where to reinstall on updates, grub-pc is for BIOS and grub-efi is for UEFI, if you unselect everything then the command above should change to a blank or grub will not reinstall.

sudo dpkg-reconfigure grub-pc
sudo dpkg-reconfigure grub-efi-amd64

Enter thru first pages,spacebar to choose/unchoose drive, enter to accept, do not choose partitions

http://ubuntuforums.org/showthread.php?t=2189643

You can also just change to install grub to a partition. We suggest never to install to a partition as it does not work well, but if really booting with another copy of grub that is not really an issue.

How to: Create a Customized GRUB2 Screen that is Maintenance Free.- Cavsfan

https://help.ubuntu.com/community/MaintenanceFreeCustomGrub2Screen

0

@oldfred's answer led me to the correct one:

sudo dpkg-reconfigure grub-efi-amd64

For the first couple of questions accept the existing values (just press Enter) but when it comes to this, select No:

 +----------------------| Configuring grub-efi-amd64 |-----------------------+
 |                                                                           |
 | GRUB can configure your platform's NVRAM variables so that it boots into  |
 | Debian automatically when powered on. However, you may prefer to disable  |
 | this behavior and avoid changes to your boot configuration. For example,  |
 | if your NVRAM variables have been set up such that your system contacts   |
 | a PXE server on every boot, this would preserve that behavior.            |
 |                                                                           |
 | Update NVRAM variables to automatically boot into Debian?                 |
 |                                                                           |
 |                    <Yes>                       <No>                       |
 |                                                ^^^^                       |
 +---------------------------------------------------------------------------+

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.