Score:0

How to cleanly disable Grub after a migration to systemd-boot?

ye flag

Short story: I replaced grub2 with systemd-boot and cannot be happier. Much simpler, and works perfectly on a rather complex efi multi-boot system mixing sata, nvme...

Now I want to make sure update-grub and friends are not going to be called and mess with the config when a new kernel is apt installed.

There are many posts about removing / uninstalling Grub... but in my case

# apt --simulate purge grub2-common
The following packages will be REMOVED:
  grub2-common*
The following NEW packages will be installed:
  gcc-12-base:i386 grub2-common:i386 krb5-locales libc6:i386 ...

and many other 32 bits packages are to be installed.

There is probably a 32 bits package that requires all that (and was happy with grub2-common)? How can I find it if that's the case?

And anyway, is there a way to cleanly remove grub or at least disable it, without installing a bunch of 32 bits packages?

Matias N Goldberg avatar
vg flag
Have you tried trying to remove it via aptitude? It sounds like there is a conflict and apt is showing you the first solution it found. Aptitude will show what all those solutions are and what is causing the conflict
ye flag
Same thing. Aptitude says it will install 26 packages i386 ; it says that `shim-signed` depends on grub2-common - not sure I can remove shim-signed (as well)...
Matias N Goldberg avatar
vg flag
Ahh I see. `shim-signed` is what is preventing you from removing grub2. This package is the bootloader that boots the bootloader during secure-boot. If you have secure boot w/ Microsoft keys, you need this (I don't know if systemd-boot also uses shim or is signed separately). For more info see https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot
Score:1
cn flag

Boot from another media and mount the root partition of your system.

mount /dev/sda1 /mnt

Then chroot into the mounted partition so that you can execute commands as if you were logged into the installed system

chroot /mnt

Then remove grub.

apt-get remove grub2

Finally unmount and reboot your system.

*** Don't forget to backup your data before doing this ***

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.