15.4 - When I switch drives, what is rewriting the grub menu? os-prober? How to turn it off? (remove it?)
All, One annoying quirk of 15.4 is it rewrites the grub boot menu when I change drives. I don't want it to do that. I just stuck the windows drive in, and it wiped out the 15.0 chainload and boot. How do I stop this from happening? Remove os-prober (if that is what is doing it?) Or does 15.4 use something else to rewrite the grub menu when disks change? -- David C. Rankin, J.D.,P.E.
On 2022-06-12 19:42, David C. Rankin wrote:
All,
One annoying quirk of 15.4 is it rewrites the grub boot menu when I change drives. I don't want it to do that. I just stuck the windows drive in, and it wiped out the 15.0 chainload and boot. How do I stop this from happening?
How do you change drives?
Remove os-prober (if that is what is doing it?) Or does 15.4 use something else to rewrite the grub menu when disks change?
-- Cheers / Saludos, Carlos E. R. (from Elesar, using openSUSE Leap 15.3)
On 6/12/22 14:33, Carlos E. R. wrote:
On 2022-06-12 19:42, David C. Rankin wrote:
All,
One annoying quirk of 15.4 is it rewrites the grub boot menu when I change drives. I don't want it to do that. I just stuck the windows drive in, and it wiped out the 15.0 chainload and boot. How do I stop this from happening? How do you change drives?
Flip the laptop over, take the battery out, unlock and slide the back cover off, loosen the 3 retaining screws of the drive-caddy I'm removing, slide the drive out, put the new drive in it's place and tighten the 3 retaining screws? Laptop has 2 hdd bays (3 if you include the CD/DVD which can hold a 3rd sata drive) So I suspect os-prober is the culprit. I'll have to reboot again to see if it re-wrote the grub menu to the original (with 15.4 primary chain-loading 15.0). I pulled the 15.0 drive a few days ago and put the W10 drive back in. Next thing I know the grub menu is rewritten offering to load 15.4 and chainload W10. I don't want this to happen. I like to have one setup for grub, and if I change drives (and I'm going to keep it that way), I'll regenerate the grub.cfg menu with # grub-mkconfig -o /boot/grub/grub.cfg I suspect when dracut (or something similar) is triggered, the menu is regenerated, or it could be a boot time check. Maybe it happened when grub was last updated due to the CVE that was fixed a few days ago? Either way, I'm trying to determine what did it and make sure it doesn't do it again. Can I do it just by setting: GRUB_DISABLE_OS_PROBER=false In /etc/default/grub? (that woulds work on Arch, but I don't know if openSUSE does something different?) -- David C. Rankin, J.D.,P.E.
On 6/13/22 02:16, David C. Rankin wrote:
On 6/12/22 14:33, Carlos E. R. wrote:
On 2022-06-12 19:42, David C. Rankin wrote:
All,
One annoying quirk of 15.4 is it rewrites the grub boot menu when I change drives. I don't want it to do that. I just stuck the windows drive in, and it wiped out the 15.0 chainload and boot. How do I stop this from happening? How do you change drives?
Flip the laptop over, take the battery out, unlock and slide the back cover off, loosen the 3 retaining screws of the drive-caddy I'm removing, slide the drive out, put the new drive in it's place and tighten the 3 retaining screws?
Laptop has 2 hdd bays (3 if you include the CD/DVD which can hold a 3rd sata drive)
So I suspect os-prober is the culprit. I'll have to reboot again to see if it re-wrote the grub menu to the original (with 15.4 primary chain-loading 15.0). I pulled the 15.0 drive a few days ago and put the W10 drive back in. Next thing I know the grub menu is rewritten offering to load 15.4 and chainload W10.
I don't want this to happen. I like to have one setup for grub, and if I change drives (and I'm going to keep it that way), I'll regenerate the grub.cfg menu with
# grub-mkconfig -o /boot/grub/grub.cfg
I suspect when dracut (or something similar) is triggered, the menu is regenerated, or it could be a boot time check. Maybe it happened when grub was last updated due to the CVE that was fixed a few days ago?
Either way, I'm trying to determine what did it and make sure it doesn't do it again. Can I do it just by setting:
GRUB_DISABLE_OS_PROBER=false
In /etc/default/grub?
Yes, you can do that, however it needs to be `GRUB_DISABLE_OS_PROBER=true`. Additionally, you can remove the `os-prober` package - it may complain during `grub2-mkconfig` about it missing, but happily generate the configuration without it. (that woulds work on Arch, but I don't know if
openSUSE does something different?)
On 2022-06-13 02:16, David C. Rankin wrote:
On 6/12/22 14:33, Carlos E. R. wrote:
On 2022-06-12 19:42, David C. Rankin wrote:
All,
One annoying quirk of 15.4 is it rewrites the grub boot menu when I change drives. I don't want it to do that. I just stuck the windows drive in, and it wiped out the 15.0 chainload and boot. How do I stop this from happening? How do you change drives?
Flip the laptop over, take the battery out, unlock and slide the back cover off, loosen the 3 retaining screws of the drive-caddy I'm removing, slide the drive out, put the new drive in it's place and tighten the 3 retaining screws?
Ah, ok, so no software running involved.
Laptop has 2 hdd bays (3 if you include the CD/DVD which can hold a 3rd sata drive)
So I suspect os-prober is the culprit. I'll have to reboot again to see if it re-wrote the grub menu to the original (with 15.4 primary chain-loading 15.0). I pulled the 15.0 drive a few days ago and put the W10 drive back in. Next thing I know the grub menu is rewritten offering to load 15.4 and chainload W10.
I don't want this to happen. I like to have one setup for grub, and if I change drives (and I'm going to keep it that way), I'll regenerate the grub.cfg menu with
# grub-mkconfig -o /boot/grub/grub.cfg
I suspect when dracut (or something similar) is triggered, the menu is regenerated, or it could be a boot time check. Maybe it happened when grub was last updated due to the CVE that was fixed a few days ago?
That could be it, yes.
Either way, I'm trying to determine what did it and make sure it doesn't do it again. Can I do it just by setting:
GRUB_DISABLE_OS_PROBER=false
true
In /etc/default/grub? (that woulds work on Arch, but I don't know if openSUSE does something different?)
-- Cheers / Saludos, Carlos E. R. (from Elesar, using openSUSE Leap 15.3)
On 6/13/22 02:34, Carlos E. R. wrote:
I suspect when dracut (or something similar) is triggered, the menu is regenerated, or it could be a boot time check. Maybe it happened when grub was last updated due to the CVE that was fixed a few days ago? That could be it, yes.
I confirmed, it is not a boot-time check and reconfiguration. My 15.4 menu wasn't changed when I did the drive swap (but this time 15.4 was /dev/sdb instead of /dev/sda -- if that makes a difference) So absent a drive device dependency (which doesn't sound likely), it seems the hook is limited to either a call to dracut or the grub2 upgrade. -- David C. Rankin, J.D.,P.E.
On 2022-06-13 13:12:28 David C. Rankin wrote:
|On 6/13/22 02:34, Carlos E. R. wrote: |>> I suspect when dracut (or something similar) is triggered, the menu is |>> regenerated, or it could be a boot time check. Maybe it happened when |>> grub was last updated due to the CVE that was fixed a few days ago? |> |> That could be it, yes. | |I confirmed, it is not a boot-time check and reconfiguration. My 15.4 menu |wasn't changed when I did the drive swap (but this time 15.4 was /dev/sdb |instead of /dev/sda -- if that makes a difference) | |So absent a drive device dependency (which doesn't sound likely), it seems | the hook is limited to either a call to dracut or the grub2 upgrade.
You might have to resort to using (ugh) UUIDs instead of device names, since devices are numbered in the order they respond to the system's queries. Leslie -- Operating System: Linux Distribution: openSUSE Leap 15.4 x86_64 Desktop Environment: Trinity Qt: 3.5.0 TDE: R14.0.12 tde-config: 1.0
participants (4)
-
Carlos E. R.
-
David C. Rankin
-
Georg Pfuetzenreuter
-
J Leslie Turriff