Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Don't want to upgrade grub - any emerge options?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
40 posts
  • 1
  • 2
  • Next
Author
Message
eohrnberger
Apprentice
Apprentice
Posts: 250
Joined: Thu Dec 09, 2004 5:42 pm

Don't want to upgrade grub - any emerge options?

  • Quote

Post by eohrnberger » Sat Jun 06, 2020 10:39 pm

I'm perfectly happy with the simple grub version 1 (or is that version 0.x?)
grub version 2 is just a whole lot of additional complexity that I simply don't welcome.

That version of grub is no longer offered in the ebuild files sync'd down from Gentoo's repositories.

What sorts of options are available to keep (and build) systems with the old grub?
Top
ian.au
l33t
l33t
User avatar
Posts: 620
Joined: Thu Apr 07, 2011 3:39 am
Location: Australia

  • Quote

Post by ian.au » Sat Jun 06, 2020 11:21 pm

You'd drop the grub you want to keep into a https://wiki.gentoo.org/wiki/Custom_repository and add a mask for the version you don't want.
Top
eohrnberger
Apprentice
Apprentice
Posts: 250
Joined: Thu Dec 09, 2004 5:42 pm

  • Quote

Post by eohrnberger » Sat Jun 06, 2020 11:24 pm

ian.au wrote:You'd drop the grub you want to keep into a https://wiki.gentoo.org/wiki/Custom_repository and add a mask for the version you don't want.
Hey, thanks for the pointer. I'll be digging into that more, for sure!

Cheers and best wishes!
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Jun 07, 2020 12:25 am

You could also migrate to an alternative loader, such as syslinux. It uses a fairly simple configuration file, and is still in the main repository.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56075
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Jun 07, 2020 11:27 am

A boot loader is firmware.
My grub-static was installed in April 2009 when I brought this box up. As it still works, why upgrade?
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2110
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun Jun 07, 2020 2:41 pm

NeddySeagoon wrote:A boot loader is firmware.
My grub-static was installed in April 2009 when I brought this box up. As it still works, why upgrade?
Firmware is software. Why do we upgrade software?
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

  • Quote

Post by Tony0945 » Sun Jun 07, 2020 2:59 pm

My non-UEFI boxes are still running grub legacy. I switched one box once and found the syntax for manually editing grub.conf too confusing.
I'm sure it solves problems for lots of cases but mine (and I assume yours) was the simple case of no separate usr, no raid or mdm, just a plain hard drive booting on an old motherboard.
As you say, it works and is easy to modify parameters, so why change?
Many people that I respect here use syslinux and I think someone is even using LILO. But, I think, they have to be re-installed with every kernel upgrade. I only have to edit /boot/grub/grub.conf when upgrading a kernel or changing a monitor.
One box triple-booted, Gentoo, Windows, and Ubuntu with grub 2. A simple chainload directive took care of the late two, then their own bootloaders took over. IIRC, even chain-loading has a complex syntax in grub 2.

I have the patches if you need them.

Code: Select all

 grub # ls -l *
-rw-r--r-- 1 portage portage 9143 Feb  5  2018 grub-0.97-r14.ebuild
-rw-r--r-- 1 portage portage 9419 Feb  5  2018 grub-0.97-r15.ebuild
-rw-r--r-- 1 portage portage 9596 Feb  5  2018 grub-0.97-r16.ebuild
-rw-r--r-- 1 portage portage 3391 Apr  4  2018 Manifest
-rw-r--r-- 1 portage portage  781 Apr  4  2018 metadata.xml

files:
total 16
-rw-r--r-- 1 portage portage 1118 Mar  7  2016 gfxpayload.patch
-rw-r--r-- 1 portage portage  591 Aug  8  2015 grub.conf.gentoo
-rw-r--r-- 1 portage portage 1612 Dec 15  2015 grub-legacy-0.97-Add-esp-to-list-of-clobbered-registers.patch
-rw-r--r-- 1 portage portage  799 Dec 18  2015 grub-legacy-0.97-ncurses-pkgconfig.patch
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56075
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Jun 07, 2020 3:29 pm

GDH-gentoo,

Where do you stop?

Your CPU and other large devices on the motherboard are the hardware expression of some software, so they are really software.
I don't upgrade that software either.

-- edit --
That doesn't really answer you question.

I don't update my boot loader, or initrd as I don't need any of the new functionality on offer, nor do they pose security issues, at least, not the way I use them.
If you have the physical access to my PC to be able to exploit boot loader issues, I have much bigger problems.

Most of us running Gentoo update fairly frequenty, because we can.
Others only update if they are affected by a GLSA, then its the bare minimum.
Last edited by NeddySeagoon on Sun Jun 07, 2020 3:40 pm, edited 1 time in total.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Jun 07, 2020 3:35 pm

GDH-gentoo wrote:
NeddySeagoon wrote:A boot loader is firmware.
My grub-static was installed in April 2009 when I brought this box up. As it still works, why upgrade?
Firmware is software. Why do we upgrade software?
We upgrade software to fix bugs that matter to us or to get new features we want. Does grub2 offer either of those, relative to the grub-static that Neddy is using? For his use case, apparently not, or he would have felt some pressure to upgrade.
Tony0945 wrote:Many people that I respect here use syslinux and I think someone is even using LILO. But, I think, they have to be re-installed with every kernel upgrade.
Syslinux only requires a configuration file change, same as grub legacy. Even that could be avoided if you took the model that the active kernel always has a fixed name. I like having the kernels installed with their version in their name, so that in case of an early boot failure, I can easily switch to a different one. Thus, when I install a new kernel, I need to modify the syslinux configuration file to tell it the name of the new kernel.
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2110
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun Jun 07, 2020 6:23 pm

Tony0945 wrote:

Code: Select all

 grub # ls -l *
-rw-r--r-- 1 portage portage 9143 Feb  5  2018 grub-0.97-r14.ebuild
-rw-r--r-- 1 portage portage 9419 Feb  5  2018 grub-0.97-r15.ebuild
-rw-r--r-- 1 portage portage 9596 Feb  5  2018 grub-0.97-r16.ebuild
-rw-r--r-- 1 portage portage 3391 Apr  4  2018 Manifest
-rw-r--r-- 1 portage portage  781 Apr  4  2018 metadata.xml

files:
total 16
-rw-r--r-- 1 portage portage 1118 Mar  7  2016 gfxpayload.patch
-rw-r--r-- 1 portage portage  591 Aug  8  2015 grub.conf.gentoo
-rw-r--r-- 1 portage portage 1612 Dec 15  2015 grub-legacy-0.97-Add-esp-to-list-of-clobbered-registers.patch
-rw-r--r-- 1 portage portage  799 Dec 18  2015 grub-legacy-0.97-ncurses-pkgconfig.patch
Note that the most recent ebuild for GRUB Legacy that Gentoo used to offer was -r18. In addition to the package's source archive and the example grub.conf file, that required an archive of patches (grub-0.97-patches-1.15.tar.bz2), the clobbered registers and ncurses patches, and a file named splash.xpm.gz.
NeddySeagoon wrote:Your CPU and other large devices on the motherboard are the hardware expression of some software, so they are really software.
I don't upgrade that software either.
Maybe I should have written "Firmware is replaceable software. Why do we upgrade replaceable software?" :) One could argue that hardware can also be upgraded with money, but that isn't the kind of 'upgrade' I was thinking about.
Hu wrote:We upgrade software to fix bugs that matter to us or to get new features we want.
And, following this line of though, it should be pointed out that unmaintained software like GRUB Legacy no longer offers bug fixes and new features, although the latter would not matter that much in this case.
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

  • Quote

Post by Tony0945 » Sun Jun 07, 2020 9:50 pm

GDH-gentoo wrote:Note that the most recent ebuild for GRUB Legacy that Gentoo used to offer was -r18. In addition to the package's source archive and the example grub.conf file, that required an archive of patches (grub-0.97-patches-1.15.tar.bz2), the clobbered registers and ncurses patches, and a file named splash.xpm.gz.
I don't need r18. I have no problems, no bugs. IIRC the last update I did was because of a new ncurses. I have no problems. When you update grub you have to re-istall. Why bother when it is doing its job of booting? YMMV
Top
crowbert
Tux's lil' helper
Tux's lil' helper
Posts: 147
Joined: Mon Apr 28, 2003 6:42 pm

  • Quote

Post by crowbert » Tue Jan 04, 2022 1:48 am

I've been getting prompted to upgrade my grub-0.97-r18 because of a flags change in an included eclass. I have a copy of the ebuild and associated files in my local repository (you can still pull them from git if you really need to). However, with GCC 10.3, I'm finding that it fails with an error that my stage2 is too large:

Code: Select all

 * Sanity check failed: stage2 (/var/tmp/portage/sys-boot/grub-0.97-r18/work/grub-0.97/stage2/stage2) is larger than 1MB (268959736 bytes)!
I don't actually want to touch it since it's working as-is, so I'm not going to investigate any further.

The quick fix will be to figure out how to hack /var/db/pkg/sys-boot/grub-0.97-18/ to reflect the current eclass build flags, my emerge world comes up clean again.

Someday I may install grub2, but I really like how simple the old grub config file was (with no required changes when updating kernels). On the other hand, I think this is the last 32-bit code on my system.
Top
Jaglover
Watchman
Watchman
User avatar
Posts: 8291
Joined: Sun May 29, 2005 1:57 am
Location: Saint Amant, Acadiana

  • Quote

Post by Jaglover » Tue Jan 04, 2022 2:24 am

I had same issue a few years ago, can't recall exactly, I think it had something to do wit 32 bit support. I simply unmerged legacy Grub and intended to migrate to syslinux ASAP ... it took me some three or four years before I emerged syslinux and completed my migration.
Why you want to keep it?
My Gentoo installation notes.
Please learn how to denote units correctly!
Top
eohrnberger
Apprentice
Apprentice
Posts: 250
Joined: Thu Dec 09, 2004 5:42 pm

  • Quote

Post by eohrnberger » Tue Jan 04, 2022 3:34 am

My solution was to bite the bullet and upgrade to grub 2.0.

If you work a bit, you cam skinny down the config to nearly what the earlier grub was.

For example:

Code: Select all

default r01
timeout 30

title=Gentoo Linux genkernel-x86_64 (5.4.38-gentoo)
    root (hd0,0)
    kernel /boot/vmlinuz-5.4.38-gentoo-x86_64 root=/dev/ram0 real_root=/dev/sda3
    initrd /boot/initramfs-5.4.38-gentoo-x86_64.img
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Tue Jan 04, 2022 4:25 am

I switched to syslinux when grub2 became the standard grub. It's not very featureful, but it is a decent replacement for grub1.
Top
tld
Veteran
Veteran
Posts: 1889
Joined: Tue Dec 09, 2003 9:35 pm

  • Quote

Post by tld » Tue Jan 04, 2022 2:45 pm

Tony0945 wrote:Many people that I respect here use syslinux and I think someone is even using LILO. But, I think, they have to be re-installed with every kernel upgrade.
I use syslinux on my older x86 BIOS systems. While I think you may be correct as to the re-installs with LILO(?) that's definitely not the case with syslinux. All I have to do with that after the kernel make install is to modify this:

Code: Select all

cat /boot/extlinux/syslinux.cfg 
PROMPT 1
TIMEOUT 60
ONTIMEOUT gentoo

UI vesamenu.c32
MENU TITLE Boot
 
LABEL gentoo
      LINUX /boot/kernel-5.10.76-gentoo-r1
      APPEND root=/dev/sda3
I just add a new entry at the top with the new kernel and change the existing one to have a label of gentoo-old for example.

On my new UEFI system I use rEFInd (at your recommendation in fact), and still loving it! Still grateful for that recommendation :D.

Tom
Top
Jaglover
Watchman
Watchman
User avatar
Posts: 8291
Joined: Sun May 29, 2005 1:57 am
Location: Saint Amant, Acadiana

  • Quote

Post by Jaglover » Tue Jan 04, 2022 3:18 pm

My kernel is always named bzImage and the backup version is always bzImage.old. Therefore I never need to change the bootloader configuration. Same for EFI stub installations. Only when using Lilo it must be re-run, making syslinux a better choice for legacy boot. BTW, syslinux also has a non-movable file, but as it is not the kernel image itself it is not creating additional hassle.
Regarding legacy Grub, apparently many users do not realize nothing from package sys-boot/grub is used to boot the computer. Your box will happily continue booting with Grub when you unmerge it.
My Gentoo installation notes.
Please learn how to denote units correctly!
Top
Chiitoo
Administrator
Administrator
User avatar
Posts: 3026
Joined: Sun Feb 28, 2010 5:36 pm
Location: Sore wa sore, kore wa kore... nanoda.

  • Quote

Post by Chiitoo » Tue Jan 04, 2022 5:00 pm

Moved to LILO here when Grub "legacy" started going away.

Just need to remember to run 'lilo' after any changes (not re-install), which I do still sometimes forget to do... but still, works for me!
Kindest of regardses.
Top
grknight
Retired Dev
Retired Dev
Posts: 2553
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Tue Jan 04, 2022 5:09 pm

On one Xen DomU machine, I saved grub:0 to a local repository so it could live on.

Why? It is a production machine and had issues with other loaders in the past. Easier than lots of downtime.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56075
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Jan 04, 2022 5:11 pm

Chiitoo,

LILO won't work with EFI/GPT, so it's effectively dead.

Your system is haunted by the bootloader :)
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
eccerr0r
Watchman
Watchman
Posts: 10238
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Tue Jan 04, 2022 5:33 pm

I really don't understand all the aversion to grub2. It's very good IMHO.
The only good excuse to not use it over a previously installed and working grub legacy install is that it risks a nonbooting computer - this is a good reason - and it's my sole reason for not switching from grub legacy to grub2. But I don't understand switching from grub legacy to syslinux or lilo - both of which are a step down from grub legacy.
Switching to rEFInd or just using the stub for EFI machines is also a sort of "upgrade" as you'd stop using MBR legacy boot.

For me I'm slowly just biting the bullet and upgrading to grub2 if portage starts complaining about it. This hasn't been the case for a while, my old grub legacy machines have been living in peace. All new MBR installs get grub2.

There is no reason to fear grub-mkconfig. It's completely optional, you can hand write grub.cfg if you want and it's not any more complex than grub legacy. However I've been slowly trying to use/automating grub-mkconfig as it reduces the risk of a typo when updating grub.cfg, which would be the same for any bootloader without some autoconfiguration script.
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
Jaglover
Watchman
Watchman
User avatar
Posts: 8291
Joined: Sun May 29, 2005 1:57 am
Location: Saint Amant, Acadiana

  • Quote

Post by Jaglover » Tue Jan 04, 2022 5:38 pm

eccerr0r wrote:I really don't understand all the aversion to grub2. It's very good IMHO.
Good for what? I should install tens of megabytes of software what I do not need? To take boot over from BIOS and hand it over to the kernel is simple process, takes a fraction of a second. I do not have Grub2 installed obviously, can someone tell how many files it installs and how many megabytes?
My Gentoo installation notes.
Please learn how to denote units correctly!
Top
Tony0945
Watchman
Watchman
Posts: 5127
Joined: Tue Jul 25, 2006 12:19 am
Location: Illinois, USA

  • Quote

Post by Tony0945 » Tue Jan 04, 2022 5:52 pm

tld wrote:On my new UEFI system I use rEFInd (at your recommendation in fact), and still loving it! Still grateful for that recommendation :D.

Tom
Thank You! I'm very happy to hear that!
Top
eccerr0r
Watchman
Watchman
Posts: 10238
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Tue Jan 04, 2022 5:58 pm

If you're hurting for a few megabytes on today's GB and TB disks you got other problems.
Fine if you're using a cdrom or a < 1GB memory card and really want to squeeze out the last few bytes, but if your kernels are 4MB a piece it's not really that big of a piece of software.

Not only that, most of the stuff is modules to handle special hardware or even encryption, and if you don't need those modules, you can delete them! Do you need grub2 to understand Amiga hard drives? No? Delete the module! Don't want localization? Delete! No RAID? Delete that! Don't even know what a serial console is? Why bother having those module then!

IMHO grub legacy and grub2 are the best thing that happened to MBR machines, and likewise even EFI machines if you don't have EFI shell in firmware. The main reason for me is a stable preboot environment to make changes when things aren't working as expected.

An untrimmed grub2 is about 12MB in /boot. You can delete themes and locales which is more than half, as well as fonts. Core code is less than 3MB, and even that can be trimmed from all the unneeded modules. The stuff in /usr/lib is copied to /boot when grub-install is run and granted it's duplicate but all bootloaders installed are that way.
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56075
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Jan 04, 2022 6:06 pm

C. A. R. Hoare wrote:There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.
It's something that software designers have lost sight of.

The days when you had to make your program fit into 16kB (sometimes 16k words) taught some very harsh lessons that appear to have been forgotten now.
Of course there was no operating system so that 16k was all yours. You would make a life long enemy of the computer operator if you used the RAM that the loader lived in, so you tried not to do that. :)

I'm a syslinux user where I have the choice.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Post Reply

40 posts
  • 1
  • 2
  • Next

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy