Debian's GRUB doesn't get along with other distro's

If none of the more specific forums is the right place to ask

Debian's GRUB doesn't get along with other distro's

Postby Isakku » 2018-11-13 04:11

Some weeks ago I just installed Debian in my older Pentium D desktop PC. It's an old 2GB machine, I was running Linux mint , but I decided to wipe everything and install Arch linux.
So, I already had Arch running, but I also wanted to have Debian installed. After installing it, I could no longer boot my Arch linux because it crashed with a "kernel panic" message.
So, I thought whatever could be wrong wouldn't be wrong if I installed something else. So I installed Manjaro, and everything was fine for a few days. Except today. Today I updated Debian and while it works fine, the update also updated Debian's GRUB and ruined Manjaro. Now Manjaro doesn't boot giving a "kernel panic" message. How do I know Debian updated GRUB? Easy. I had set a GRUB custom theme from Manjaro with a different background and all, now the theme is Debian's GRUB theme!

Here I provide a screenshot with the exact kernel panic message:

Image
https://photos.app.goo.gl/zDBNquDaH33xCBfp9

Really it broke my other distro twice now.
Freedom is the right of all sentient beings.
User avatar
Isakku
 
Posts: 4
Joined: 2018-11-13 03:05

Re: Debian's GRUB doesn't get along with other distro's

Postby Head_on_a_Stick » 2018-11-13 06:15

Isakku wrote:I had set a GRUB custom theme from Manjaro with a different background and all, now the theme is Debian's GRUB theme!

^ This would only happen if `grub-install` was run from Debian, no change in any file on the Debian system would cause GRUB to change if it had been installed from Manjaro and no update in Debian would cause GRUB to be installed to the hard drive (AFAIK), and even if there was there would be a dialogue asking you where to install the bootloader — did you see such a dialogue?

You can install and run the boot-info script if you want, that may clarify things.

https://packages.debian.org/stretch/boot-info-script

https://aur.archlinux.org/packages/bootinfoscript/
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8324
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian's GRUB doesn't get along with other distro's

Postby Isakku » 2018-12-07 01:27

Head_on_a_Stick wrote:
Isakku wrote:I had set a GRUB custom theme from Manjaro with a different background and all, now the theme is Debian's GRUB theme!

^ This would only happen if `grub-install` was run from Debian, no change in any file on the Debian system would cause GRUB to change if it had been installed from Manjaro and no update in Debian would cause GRUB to be installed to the hard drive (AFAIK), and even if there was there would be a dialogue asking you where to install the bootloader — did you see such a dialogue?

You can install and run the boot-info script if you want, that may clarify things.

https://packages.debian.org/stretch/boot-info-script

https://aur.archlinux.org/packages/bootinfoscript/


Well, of course grub-install had to run when I installed Debian the first time.
Well, digging the web I found this

https://askubuntu.com/questions/705063/ ... l-the-oses

I would like to know how to prevent the installer from running grub-install (even the grub update command seems to do the same, since this happened after updating Debian)
If Debian didn't have another grub installed this would simply not happen.
Something simmilar happened to me when I tried installing Manjaro alongside Linux Mint in my Laptop.

https://forum.manjaro.org/t/some-crazy- ... etup/30552

Every time I installed or updated something system related in one of the distros, the distro's GRUB was also automatically updated and that caused strange inconsistencies. In the end I had to start from scratch and I ended up installing Mint KDE alongside Mint Cinnamon. Since those are basically the same distro with a different desktop environment, there was no GRUB conflict (seems it's exaclty the same GRUB unlike when you mix completely different distros such as Manjaro and Mint)
Being exactly the same GRUB perhaps made it simply overwrite when I installed it instead of making another instance in the boot partition (EFI laptop).
But my current problem happens in a non UEFI system. it's older and I thought all the mess was caused by the UEFI boot system complexity messing up when you had different GRUBs. Seems I was wrong because now I do have a similar problem (two GRUBs) in a non UEFI system. GRUB doesn't get overrided nor overwritten. Except that instead of being shown at boot (UEFI system showed the two GRUBs) now it lies somewhere, dormant, and when I update a distro and that update updates any GRUB config in a certain way, sometimes it breaks the other distro! I was able to run some changes (such as theming it) without breaking anything, maybe because I was making the changes in the GRUB that had become the "default" because it was installed later (I installed Manjaro some time after installing Debian) But the Debian update appears to have updated Debian's GRUB, and now it became the "default" GRUB, breaking Manjaro's booting! Manjaro is still listed, but it doesn't boot, booting it crashes with that Kernel panic message I posted before.
Freedom is the right of all sentient beings.
User avatar
Isakku
 
Posts: 4
Joined: 2018-11-13 03:05

Re: Debian's GRUB doesn't get along with other distro's

Postby bw123 » 2018-12-07 01:52

Are you sharing a /boot partition with several distros or something? On debian stretch grub-pc stores it's config in /boot/grub/grub.cfg and when you use grub-install it points to this. So if you have some other grub from another distro installed in the mbr, running update-grub on debian shouldn't change a thing, unless you are trying to share /boot, which is a bad idea for a lot of reasons.

I have two debian installs on this machine, but only one has grub installed to avoid confusion, you can just purge it if you don't want it. Be sure and install the ver from the distro you want first!! and you will have to make sure it either probes for debian or has a 40-custom file like debian does to add it to the boot menu.

I don't know anything about other distros, do you think it's possible to document what you're saying with something like bootinfoscript or something? Might help if it is a bug. I think the installer will let you skip grub in expert mode? or maybe you could point it to some nonsense device or /dev/null and when it fails tell installer to continue anyway.
User avatar
bw123
 
Posts: 3580
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Debian's GRUB doesn't get along with other distro's

Postby milomak » 2018-12-07 16:13

i don't think any distro forces you to run grub during the installation process

Image
Desktop: iMac Late-2015 27" 5K Retina (17,1 - 3.3GHz) - MacOS and Windows 10 (Bootcamp)/ Debian Sid (External SSD)
Laptop: Lenovo ideapad Y700 [nVidia Optimus] (64-bit) - Debian Sid, Win10,
Kodi Box: AMD Athlon 5150 APU w/Radeon HD 8400 - Debian Sid
milomak
 
Posts: 1855
Joined: 2009-06-09 22:20

Re: Debian's GRUB doesn't get along with other distro's

Postby stevepusser » 2018-12-08 00:39

The GRUB update in Stretch did ask a few questions it, including about whether and where the user wanted to install it--why is the OP skipping over what they did during the upgrade? Surely they told it to install GRUB and this is the root of their problem.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Flightgear 2018.2.2, 4.19.5 kernel, wine-staging 4.0~rc1, Pale Moon 28.2.2, Mesa 18.2.6, Midori 7.0
User avatar
stevepusser
 
Posts: 10278
Joined: 2009-10-06 05:53

Re: Debian's GRUB doesn't get along with other distro's

Postby Head_on_a_Stick » 2018-12-08 11:29

Isakku wrote:I would like to know how to prevent the installer from running grub-install

The trick is to leave all of the checkboxes for all of the partitions unchecked, then you will see the confirmation screen posted by @milomak.

It is a little confusing, I agree, but simple enough once you know about it.

In respect of auto-updated GRUB configurations, I prefer to run a custom grub.cfg and install GRUB from the "live" environment[1] without having the GRUB package installed at all, this prevents the configuration from being updated after kernel upgrades and suchlike.
dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8324
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian's GRUB doesn't get along with other distro's

Postby Isakku » 2018-12-13 21:53

Well, first of all thanks a lot to all of you guys for your interest and your replies.

bw123 wrote:Are you sharing a /boot partition with several distros or something?

Huh? Hmm no, that can't be... unless... maybe I selected the whole disk instead of a partition when I was asked where I wanted /boot to be? Maybe I made that mistake? Perhaps. Maybe the whole disk was the default place for /boot in both Manjaro and Debian installers, and I had simply left it where it was. Maybe I'm wrong. I thought each distro's partition was it's own /boot.

milomak wrote:i don't think any distro forces you to run grub during the installation process

Image

THIS is what I was looking for! I wasn't sure if Debian installer actually had such an option or not. I was messing with Mint 19's installer and I couldn't get anything like that. So, currently Linux Mint does force you to install it's own GRUB. I'm making a thread at their forums.
https://forums.linuxmint.com/viewtopic. ... 6&t=283455

Head_on_a_Stick wrote:The trick is to leave all of the checkboxes for all of the partitions unchecked, then you will see the confirmation screen posted by @milomak.

So, that's the trick... I see, I will try it later.

stevepusser wrote:The GRUB update in Stretch did ask a few questions it, including about whether and where the user wanted to install it--why is the OP skipping over what they did during the upgrade? Surely they told it to install GRUB and this is the root of their problem.

Of course I had to install GRUB when I installed Debian the first time on this machine, it was the only way it could boot. (how could I boot it otheriwse? Debian was alone the only O.S. at a certain point in that machine. About upgrading, I don't know. All I know is that I saw that there was an update for Debian, so I booted my machine, saw the notification in the panel, opened the Discover software and clicked "update". Internet is quite slow in my country. it took it's time to update. When it finished I rebooted, Debian appeared to be fine, but it was strange to see that the custom GRUB theme I had installed from Manjaro was gone and Debian's GRUB theme was back, so I rebooted from Debian and tried to boot into Manjaro just to get a Kernel Panic and nothing else. Later I found out that the Manjaro's recovery mode is still capable of booting Manjaro in that machine. Maybe if I update Manjaro's Grub the way I usually do when I change a theme
Code: Select all
# grub-mkconfig -o /boot/grub/grub.cfg


But I will still need to remove one of the GRUBs if I don't want to reinstall everything from scratch.
bw123 wrote:I have two debian installs on this machine, but only one has grub installed to avoid confusion, you can just purge it if you don't want it. Be sure and install the ver from the distro you want first!! and you will have to make sure it either probes for debian or has a 40-custom file like debian does to add it to the boot menu.

If this is possible it would be great. How do I purge one of the GRUBs leaving the other one intact?

Ok. I have installed Boot-info-script via synaptics package manager. But... how do you turn this on?
Code: Select all
# sudo boot-info-script

or
Code: Select all
# sudo boot_info_script

both say
command not found!
hmm... maybe
Code: Select all
# sudo apt-get install boot-info-script

Ah... nope. It says the latest version is already installed... what is going on here?
Last edited by Isakku on 2018-12-13 23:32, edited 1 time in total.
Freedom is the right of all sentient beings.
User avatar
Isakku
 
Posts: 4
Joined: 2018-11-13 03:05

Re: Debian's GRUB doesn't get along with other distro's

Postby NorthEast » 2018-12-13 22:59

From the tarball info, it's: bootinfoscript
Run the script as sudoer:
sudo ./bootinfoscript <outputfile>

or if your operating system does not use sudo:

su -
./bootinfoscript <outputfile>


Perhaps check that spelling.
NorthEast
 
Posts: 10
Joined: 2018-11-18 04:35

Re: Debian's GRUB doesn't get along with other distro's

Postby Isakku » 2018-12-13 23:15

NorthEast wrote:From the tarball info, it's: bootinfoscript
Run the script as sudoer:
sudo ./bootinfoscript <outputfile>

or if your operating system does not use sudo:

su -
./bootinfoscript <outputfile>


Perhaps check that spelling.

Well, it's quite weird, I had even copied and pasted.
Tutorials put it as simply running
Code: Select all
sudo boot_info_script

https://www.hecticgeek.com/2012/07/trou ... fo_script/

but what you counsel me to do doesn't work either.
Code: Select all
 sudo ./bootinfoscript <outputfile>

gives a command not found response.
Quite strange.
Freedom is the right of all sentient beings.
User avatar
Isakku
 
Posts: 4
Joined: 2018-11-13 03:05

Re: Debian's GRUB doesn't get along with other distro's

Postby Head_on_a_Stick » 2018-12-14 05:34

dbruce wrote:Ubuntu forums try to be like a coffee shop in Seattle. Debian forums strive for the charm and ambience of a skinhead bar in Bacau. We intend to keep it that way.
User avatar
Head_on_a_Stick
 
Posts: 8324
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian's GRUB doesn't get along with other distro's

Postby NorthEast » 2018-12-14 23:28

but what you counsel me to do doesn't work either.

Code: Select all
sudo ./bootinfoscript <outputfile>
gives a command not found response.

Sorry for not being so clear ... I only meant to draw attention to the name of the program and its spelling: bootinfoscript.
Beyond that, I hoped you could find it with that corrected name on your filesystem ... Head_on_a_Stick nailed it though I think.
NorthEast
 
Posts: 10
Joined: 2018-11-18 04:35

Re: Debian's GRUB doesn't get along with other distro's

Postby p.H » 2018-12-15 08:36

Isakku wrote:Here I provide a screenshot with the exact kernel panic message

The message indicates that the kernel cannot find the root device. This may mean that :
- the kernel does not use an initrd/initramfs and the root= parameter was not passed properly by GRUB to the kernel command line ; check in grub.cfg.
- the kernel is supposed to use an initrd/initramfs but none was specified in grub.cfg or GRUB failed to load it.

The latter is more likely to happen on modern systems which mostly use a modular kernel and an initramfs.
Either may be caused by failure of Debian grub-mkconfig/os-prober to properly parse the contents of Arch /boot and /boot/grub/grub.cfg.

Without seeing the contents of Arch's /boot and grub.cfg, I cannot be more precise.

To work around this, you can manually add a menu entry in Debian's grub.cfg to chainload Arch's GRUB from Debian's GRUB.

If you don't want update-grub or grub-install to be run on kernel or GRUB package updates, remove the grub-pc package but leave the other grub-* packages.

The script installed by boot-info-script is bootinfoscript. It is in the system path, you do not have to prepend it with ./ or anything.
p.H
 
Posts: 648
Joined: 2017-09-17 07:12


Return to General Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable