I have been using systemd-boot with Mint 20.3 for quite some time now, but every kernel update (generic and OEM, Xanmod does not seem to require it) seems to want to reinstall grub.
A workaround that I've been using is to just sudo apt-mark hold grub-* before updating the kernels.
[SOLVED] How do I prevent kernel updates from reinstalling grub?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
[SOLVED] How do I prevent kernel updates from reinstalling grub?
Last edited by LockBot on Wed Jan 04, 2023 11:00 pm, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How do I prevent kernel updates from reinstalling grub?
To clarify, the system isn't reinstalling Grub. It's running update-grub, which rewrites a file called grub.cfg.
The command t42 has given you will stop that.
The command t42 has given you will stop that.
Re: How do I prevent kernel updates from reinstalling grub?
But if you don't allow the update-grub process you will never use the new kernel unless you manually edit the kernel line by hitting e at the grub menu when you reboot.
What's the point of that?
What's the point of that?
Re: How do I prevent kernel updates from reinstalling grub?
OP says he isn't using Grub but systemd-boot.
Re: How do I prevent kernel updates from reinstalling grub?
Update manager does say that grub will be installed (At that time I purged all grub packages other than grub-common and grub-pc-bin) along with kernels
Purged the two packages mentionned earlier, will reply after another kernel update
Edit: iirc the systemd-boot install guide that I read tells me to write 2 certain, identical files that define what update-initramfs should do after kernel install / remove. Are the update-grub lines located there?
Edit 2: looked it up, those are
Code: Select all
/etc/kernel/postinit.d/zz-update-systemd-boot
/etc/kernel/postrm.d/zz-update-systemd-boot
/etc/kernel/post-update.d/zz-update-systemd-boot
Re: How do I prevent kernel updates from reinstalling grub?
I don't use systemd-boot, so can't comment on that. I'm pretty familiar with Grub, though. Installing or updating Grub packages is a very different thing from reinstalling Grub. Update Manager will do the former but not the latter.
By the way, if you're looking to get away from Grub, you might consider rEFInd.
By the way, if you're looking to get away from Grub, you might consider rEFInd.
Re: How do I prevent kernel updates from reinstalling grub?
There have been kernel updates (Xanmod, Generic and OEM) for me. OEM and Generic wants to reinstall grub once again, even with grub-common removed while Xanmod does not.
Re: How do I prevent kernel updates from reinstalling grub?
Grub is a recommended package, open Synaptic -> Settings -> Preferences and uncheck "Consider recommended packages as dependencies" on the General tab.
-=t42=-