5

I installed Ubuntu 16.04 in a system that already uses rEFInd for booting. After installation, I removed all grub-related packages. However, each time a new kernel release comes out, it tries to install some grub dependencies that I don't need because I don't have grub installed to start with. Here's the commands I'm using:

$ sudo apt-get update && sudo apt-get upgrade
...
Fetched 306 kB in 0s (350 kB/s)    
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  linux-headers-generic linux-signed-generic linux-signed-image-generic

So after that I try with a dist-upgrade:

$ sudo apt-get dist-upgradeReading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common
  linux-headers-4.4.0-72 linux-headers-4.4.0-72-generic
  linux-image-4.4.0-72-generic linux-image-extra-4.4.0-72-generic
  linux-signed-image-4.4.0-72-generic os-prober
The following packages will be upgraded:
  linux-headers-generic linux-signed-generic linux-signed-image-generic
3 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 71.8 MB/71.8 MB of archives.
After this operation, 314 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

I tried upgrading anyways and removing the grub packages afterwards, however, the package manager fails when configuring and installing grub-pc, just like in this thread.

Is there any way I can upgrade the Kernel without installing those grub dependencies?

6

After checking the dependencies for linux-headers-generic, linux-signed-generic and linux-signed-image-generic. I saw that none of them depends on grub. So a simple hold using apt-mark to ignore all grub-related packages fixed the issue for me:

$ sudo apt-mark hold grub* grub*:i386

dist-upgrade now ignores grub.

1
  • 1
    Soooo helpful. I can't believe there's not more about how to remove grub and keep it that way. I dual boot and use syslinux; I was disheartened to find out that grub decided to blast my mbr the last time it updated. This is simple and easy!
    – Hendy
    May 8 '17 at 20:40

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.