Debian 12: how disable automatic call of grub-install ?
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
the packages may have a postinstall script, which will be automatically started after copying the files. Without that the installation is incomplete.
So if you install a new kernel grub-install will be automatically executed.
I don't know your case, if it is similar or not, you gave no any details.
That is my case where I need grub-install not to be called automatically. Which details should I please post ?
The case we know nothing about.
All we know is that grub-install was (automatically?) invoked, which you don't want.
What are you trying to do at all?
What do you want to achieve (it is not enough to say what you don't want)?
What commands did you execute, what's happened?
What OS and environment do you have?
Why do you want to skip it? http://www.catb.org/~esr/faqs/smart-...html#beprecise
This is about 5 questions, a 3 word answer will not be enough.
The case we know nothing about.
All we know is that grub-install was (automatically?) invoked, which you don't want.
What are you trying to do at all?
What do you want to achieve (it is not enough to say what you don't want)?
What commands did you execute, what's happened?
What OS and environment do you have?
Why do you want to skip it? http://www.catb.org/~esr/faqs/smart-...html#beprecise
This is about 5 questions, a 3 word answer will not be enough.
grub-install is automatically invoked after some upgrades which I don't want.
I use multiboot with openSUSE Tumbleweed on btrfs which Debian's grub can't access (result is that TW is not visible in Debian's grub menu) so I boot Debian using TW's grub. I want use TW's grub only to boot both distros (and they are usually both visible in TW's grub).
I did not try any command so far.
Both Debian and TW are 32bit and use IceWM.
Because TW is not visible in Debian's grub menu.
Last edited by MakeTopSite; 02-14-2024 at 06:21 AM.
you don't need two grubs, one is enough and it should detect both OSs. At least I think that would be the optimal solution.
You can implement a dummy grub-install script and replace the original, temporarily, if you wish.
It is not a good solution and may cause additional troubles, but anyway you can try it.
I'd be surprised that grub-install is run on any updates. The grub-mkconfig script is run by some systems when a new kernel is installed. If you could, post which of the two systems does this, is it Debian or Opensuse? Are both of these systems Legacy/CSM installs and, if so is Opensuse in the MBR of the drive? Are both Debian and Opensuse on the same hard drive? In any case, you want to use the Opensuse Grub then make sure it has code in the MBR if a Legacy install or if EFI, it is set to first boot in the BIOS or if they are on separate drives, set the drive with Opensuse to first boot in the BIOS.
Uninstall the grub package that does grub-install, not sure which one, or uninstall all of the grub packages. Mark to hold the grub packages not to upgrade.
Only one of the installed OS' should host the grub installation in any multi-boot scenario. Elect one OS for this purpose and remove grub entirely from all others.
This should have the desired result:
Code:
# apt-get purge grub*
Then reboot into the OS which hosts the grub install and set up from there.
Last edited by _blackhole_; 02-15-2024 at 06:48 AM.
you don't need two grubs, one is enough and it should detect both OSs. At least I think that would be the optimal solution.
You can implement a dummy grub-install script and replace the original, temporarily, if you wish.
It is not a good solution and may cause additional troubles, but anyway you can try it.
I've tried it few times again but Debian's grub still can't detect TW.
I'd be surprised that grub-install is run on any updates. The grub-mkconfig script is run by some systems when a new kernel is installed. If you could, post which of the two systems does this, is it Debian or Opensuse? Are both of these systems Legacy/CSM installs and, if so is Opensuse in the MBR of the drive? Are both Debian and Opensuse on the same hard drive? In any case, you want to use the Opensuse Grub then make sure it has code in the MBR if a Legacy install or if EFI, it is set to first boot in the BIOS or if they are on separate drives, set the drive with Opensuse to first boot in the BIOS.
grub-install only run on grub package upgrade. But it is "enough" because repair take some time and is not trivial.
Both systems runs grub-install but problem is with Debian (it's grub does not contain openSUSE)
Both of these systems are Legacy/CSM installs.
Opensuse is in the MBR of the drive if I understand it correctly - grub was installed by
Code:
grub-install /dev/sda
Both Debian and Opensuse are on the same hard drive.
Booting and grub of the openSUSE is set properly and it works properly (until Debian calls grub-install).
Why do you upgrade Grub on Debian if you don't use/need it? Did you try the suggestion above in post 11?
Quote:
Opensuse is in the MBR of the drive if I understand it correctly
Does that mean you are not sure? It should be easy enough to determine as the background on the menu for each system is very different. If that doesn't tell you, you could try running boot repair which you can download from the site at the link below. If you select the option to Create BootInfo summary, it will output a report and the info on which OS is in the MBR will be at the top of the report. Do NOT do any repairs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.