A recent security (?) update in 14.10 Utopic Unicorn caused "apt-get dist-upgrade" in Ubuntu 14.10 to try to remove package "grub-efi-amd64", and replace it with package "grub-pc". I use grub-efi to boot in UEFI mode, which at least originally was not compatible with the plain "grub-pc" without "grub-efi". Thus, I am a bit wary to remove the package "grub-efi-amd64", because it was quite difficult to set up the UEFI boot process, which I used because I was not able to install Ubuntu in BIOS mode without putting the hardware in legacy mode. So, my question is: Is it safe to replace the "grub-efi-amd64" with "grub-pc" so that the UEFI boot procedure still works? Note that I am unable to update the kernel without removing the "grub-efi-amd64" package, i.e. "sudo apt-get install linux-image-generic" also causes the removal of "grub-efi-amd64".

XXX@YYY:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... The following package was automatically installed and is no longer required:
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
The following NEW packages will be installed:
  grub-gfxpayload-lists grub-pc linux-headers-3.16.0-29 linux-headers-3.16.0-29-generic
  linux-image-3.16.0-29-generic linux-image-extra-3.16.0-29-generic python3-requests
The following packages will be upgraded:
  linux-headers-generic linux-image-generic python3-cupshelpers
3 upgraded, 8 newly installed, 1 to remove and 0 not upgraded.
Need to get 64.2 MB of archives.
After this operation, 232 MB of additional disk space will be used.
Do you want to continue? [Y/n] n

You're right to be wary. Although the replacement of grub-efi-amd64 by grub-pc will probably leave the major GRUB EFI file intact, GRUB may become confused by changes to its configuration file -- or it might not, since this is a luck-of-the-draw sort of thing. I haven't seen this specific issue for a while, but when I did it often resulted in boot problems if not caught.

To be most helpful, you might try upgrading individual packages (e.g., sudo apt-get install linux-headers-generic and so on) to see which one(s) might have inappropriate dependencies, then file a bug report against whatever's forcing the change. If they're all doing the same thing, then it could be something unrelated to individual package packaging, like a missing /sys/firmware/efi directory tree (which could be a kernel module issue). That might merit a bug report filed against a relevant package, or maybe a configuration file change on your system.

Another approach (not incompatible with the first) is to install another boot manager or boot loader that can run instead of GRUB. It could be you'll switch to this other one or simply keep it as a backup. I describe several options on my EFI Boot Loaders for Linux page. If you set up such a boot loader as a backup, you should be able to let the replacement proceed and then reverse it manually when it's done, and if something goes wrong, you'll still be able to boot.

  • As you suggested, I used apt-get for finding the exact package causing the problem, and it turned out to be linux-image-generic. I'll try to find some extra time for filing a bug report against the package. Thank you for confirming that it is likely a bug, and not something one should expect. – Aapo Feb 9 '15 at 17:00

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.