Any way to keep "grub" out of apt updates??

Kernels & Hardware, configuring network, installing services

Re: Any way to keep "grub" out of apt updates??

Postby Head_on_a_Stick » 2020-12-25 21:09

este.el.paz wrote:prolly do tar.gz since it's a bit beyond "code" level?

You can run this command to upload the output to a pastebin site:
Code: Select all
/usr/sbin/grub-mkconfig | curl -F 'f:1=<-' ix.io

^ That should return a URL link which can be posted here.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13041
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Any way to keep "grub" out of apt updates??

Postby p.H » 2020-12-25 22:12

I forgot to mention in my previous post that os-prober should be disabled in secondary systems in order to not bloat their grub.cfg uselessly. This can be done by either uninstalling os-prober, removing/diverting /etc/grub.d/30_os-prober or (preferred) adding
Code: Select all
GRUB_DISABLE_OS_PROBER=true

in /etc/default/grub.
p.H
 
Posts: 1609
Joined: 2017-09-17 07:12

Re: Any way to keep "grub" out of apt updates??

Postby este.el.paz » 2020-12-26 00:47

_Stick:

OK, I'll pastebin it when I get back to my Debian Bullseye squeezetoy . . . .

@p.H:

Good suggestion, seems easy enough to add that line into /etc/default/grub . . . to try to clean it up a bit . . . . :roll:
este.el.paz
 
Posts: 42
Joined: 2012-03-09 19:56
Location: SoCal

Re: Any way to keep "grub" out of apt updates??

Postby este.el.paz » 2020-12-26 18:03

Head_on_a_Stick wrote:
este.el.paz wrote:prolly do tar.gz since it's a bit beyond "code" level?

You can run this command to upload the output to a pastebin site:
Code: Select all
/usr/sbin/grub-mkconfig | curl -F 'f:1=<-' ix.io

^ That should return a URL link which can be posted here.


@H_on_a_S:

Here's the link to the grub-mkconfig data:

http://ix.io/2JDu
este.el.paz
 
Posts: 42
Joined: 2012-03-09 19:56
Location: SoCal

Re: Any way to keep "grub" out of apt updates??

Postby Head_on_a_Stick » 2020-12-26 19:43

Ah, thank you. That output shows all of your other distributions and the timeout appears to be correct so it looks like grub-mkconfig is working just fine.

I presume this is a UEFI system so can we please see the boot entries:
Code: Select all
efibootmgr -v

And you still haven't explained exactly what you see as the machine boots up when you experience this problem. Do you see the GRUB menu with just the Debian entries or do you not see a GRUB menu at all?

If you don't see a GRUB menu at all have you tried pressing the <escape> key during the boot process? The Ubuntu bug people said that would work.

I've asked you this several times now without receiving a clear answer so I'm getting a bit bored of this thread...
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13041
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Any way to keep "grub" out of apt updates??

Postby este.el.paz » 2020-12-26 20:26

@H_:

There is an element of "boring" in all of life's experiences . . . .

Yep, UEFI on a Mac . . . back atcha on the efibootmgr output . . . I'm away from the Mac and running Pop! on a Sys76 laptop now.

Right now when I boot the desktop Mac computer w/o keystroke it loads the GRUB menu and I can select my choice without a problem. OR, previously I could hold the option key and it would load the OSX boot manager and I could select "EFI boot" and that also would then load GRUB.

However, since some time back when "ubuntu" would install an updated GRUB that wiped GRUB links out and only ubuntu would boot up . . . I went through that back in the Spring two or three times for each of the 3 ubuntu systems I had installed then . . . until I stopped updating grub via any of those systems, and "problem solved" . . . .

It was only because a couple days back that Debian wasn't letting Synaptic show "unlisting grub" from updates to install that I posted this thread. This morning I ran an apt in Debian and no grub updates showed as I wanted . . . and at the end in ran a "grub configuration" check and found all the choices . . . and on reboot it was not destructive to GRUB as was the problem with Ubuntu updates, so possibly the problem is exclusive to "ubuntu"??

Since I haven't used "ubuntu" to update any GRUB packages I haven't "lost GRUB" so I had no reason to press the esc key to test that out . . . it's not worth the time to run through that process, because months back it was a time consuming problem to fix, to then have them break it again, ad nauseum. In a few days I might be upgrading my Lubuntu install to "hirsute" and that may or may not "break grub" and if so then I could test the "esc" key to check the devs suggestion out . . . and possibly the Grub problem has been repaired upstream, but based upon the past year I don't think that is the case . . . something in their handling of grub seems to remove connections to other choices.

As of right now it seems like the "pinning" of GRUB in Debian got me through an apt update/d-u without causing damage to the visibility of grub menu on cold boot . . . possibly the issue is solved in Debian, I'll have more data on it when I upgrade Lubuntu and see if my Grub menu remains useable or gets busted up, etc.
este.el.paz
 
Posts: 42
Joined: 2012-03-09 19:56
Location: SoCal

Re: Any way to keep "grub" out of apt updates??

Postby p.H » 2020-12-26 21:31

A few comments on your grub.cfg.

- You may consider removing old kernels from your distributions more often, especially in openSUSE/GeckoLinux. I guess keeping the latest 2 or 3 kernels is enough.

Code: Select all
menuentry 'Manjaro Linux (20.2) (on /dev/sdb7)' (...)
   linux /boot/vmlinuz-5.4-x86_64 root=UUID=4b916772-18f6-4b7c-b47c-eb0fa3796eff rw quiet udev.log_priority=3
   initrd /boot/intel-ucode.img

As HoaS warned about Arch-based distributions in a previous post, Debian grub-mkconfig/30_os-prober script appears to not handle "initrd" lines with multiple files in foreign grub.cfg properly. It grabs only the first one in the line, which contains only CPU microcode and not the actual initramfs, so booting with such menu entry will fail.

Code: Select all
menuentry 'openSUSE Tumbleweed (on /dev/sdb9)' (...)
   linux /boot/vmlinuz-5.9.12-1-default root=/dev/sdb9

This menu entry seems to be built without the hints from a foreign bootloader config, so it seems that this installation does not have a grub.cfg file, or at least that Debian grub-mkconfig could not find and use it. Such menu entry lacks some parameters (quiet, splash, resume) and may fail as a /dev/sd* device name is not stable across reboots and may point to the wrong drive.
p.H
 
Posts: 1609
Joined: 2017-09-17 07:12

Re: Any way to keep "grub" out of apt updates??

Postby este.el.paz » 2020-12-26 22:14

@p.H:

Thanks for the follow-up . . . yes, I did look at the link and saw the endless list of Gecko kernels . . . . I am somewhat "new" to OpenSUSE, they use "zypper" rather than apt and the GUI is via Yast . . . my needs from a system are somewhat basic . . . access to the web for the most part . . . . But I haven't found that they have "apt autoremove" comparable options . . . like "zypper autoremove" or "clean" is "no command found" or something like that.

I jut ran a "zypper upgrade" in my main TW install and it removed a few packages, but didn't clean out a kernel . . . but considering the endless list of kernels I saw in Gecko I'll have to look into it . . . . I like the clean GUI of Gecko's MATE DE, but Gecko is kind of what I think is a "one woman show" . . . the forum isn't overly responsive. I could try to ask ask her why so many kernels are trailing along on the install, or try to look through Yast and see whether I can trim them out.

In spite of how "messy" my Grub might be "under the hood" . . . overall it does and was working fine until "ubuntu" seemed to install packages that eliminated all other systems and would only boot itself . . . problem resolved by skipping ubuntu upgrades to grub packages???? :shock:
este.el.paz
 
Posts: 42
Joined: 2012-03-09 19:56
Location: SoCal

Re: Any way to keep "grub" out of apt updates??

Postby Head_on_a_Stick » 2020-12-27 08:48

este.el.paz wrote:overall it does and was working fine until "ubuntu" seemed to install packages that eliminated all other systems and would only boot itself . . . problem resolved by skipping ubuntu upgrades to grub packages?

A better solution would be to hand control of the booting process over to one of your non-Ubuntu distributions and so take away it's ability to break your GRUB menu.

Use the efibootmgr command to change the boot order in a UEFI system.
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13041
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Any way to keep "grub" out of apt updates??

Postby p.H » 2020-12-27 12:29

este.el.paz wrote:In spite of how "messy" my Grub might be "under the hood" . . . overall it does and was working fine until "ubuntu" seemed to install packages that eliminated all other systems and would only boot itself . . . problem resolved by skipping ubuntu upgrades to grub packages?

You must understand that
- each distribution installs its own GRUB instance and does not mess with other distributions GRUB instances
- each GRUB instance uses its own grub.cfg config file and displays its own menu
- each distribution does its best effort to include other distributions in its own GRUB menu
- the GRUB menu displayed at boot time is the first one in the UEFI boot order, or the one you select in the UEFI boot menu
- installing or upgrading a GRUB instance may change the UEFI boot order and the default GRUB instance
- the UEFI boot order can be changed with efibootmgr or from the UEFI boot settings

If you do not want a GRUB upgrade in a given distribution to change the boot order, you can simply remove the package which actually installs the GRUB boot loader from that distribution. In Debian (maybe Ubuntu too) on 64-bit UEFI PC, this package is grub-efi-amd64. Other grub* packages won't actually install or upgrade the GRUB boot loader.
p.H
 
Posts: 1609
Joined: 2017-09-17 07:12

Re: Any way to keep "grub" out of apt updates??

Postby este.el.paz » 2020-12-28 00:24

p.H wrote:
este.el.paz wrote:In spite of how "messy" my Grub might be "under the hood" . . . overall it does and was working fine until "ubuntu" seemed to install packages that eliminated all other systems and would only boot itself . . . problem resolved by skipping ubuntu upgrades to grub packages?

You must understand that
- each distribution installs its own GRUB instance and does not mess with other distributions GRUB instances
- each GRUB instance uses its own grub.cfg config file and displays its own menu
- each distribution does its best effort to include other distributions in its own GRUB menu
- the GRUB menu displayed at boot time is the first one in the UEFI boot order, or the one you select in the UEFI boot menu
- installing or upgrading a GRUB instance may change the UEFI boot order and the default GRUB instance
- the UEFI boot order can be changed with efibootmgr or from the UEFI boot settings

If you do not want a GRUB upgrade in a given distribution to change the boot order, you can simply remove the package which actually installs the GRUB boot loader from that distribution. In Debian (maybe Ubuntu too) on 64-bit UEFI PC, this package is grub-efi-amd64. Other grub* packages won't actually install or upgrade the GRUB boot loader.


@p.H:

Thanks again for the post . . . I'll have to check into that "efi" package at some point . . . . In practical application with my 6 linux installs it used to be "last man hired" or installed would take over grub control . . . "ubuntu" seemed to do something that messed that up, but lately "OpenSUSE" provides the drop down menu to select from and it works to access each of the choices--it's tidy.

It's only when I have to get out the SuperGrub2 disk to boot into a system other than ubuntu that the massive listings of every system I ever installed and their .cfg files and and endless list of kernels and vmlinuz??? files shows up that it becomes --untidy.

For the most part I am an "end-user" and I just enjoy having a few systems to boot into and keep updated and I don't mess around with the internals that much, it was only in the Spring when "ubuntu" apt upgrades were busting up my beautiful grub menu that it took a major thread on the OpenSUSE forum to finally get to "chroot-ing" as the tactic to get their os-prober to kick in . . . and perhaps at that time I set opensuse as the "controller of the menu" . . . .

I have a Manjaro install in my newish linux laptop . . . and I have three distros installed, Gecko, Pop!, and Manjaro . . . Gecko seems to have decided to be the controller . . . menu shows up on cold boot . . . Manjaro has not messed with anything so far in the laptop or the desktop editions of Grub.
este.el.paz
 
Posts: 42
Joined: 2012-03-09 19:56
Location: SoCal

Previous

Return to System configuration

Who is online

Users browsing this forum: eiger3970 and 20 guests

fashionable