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
  • Previous
  • 1
  • 2
Author
Message
tld
Veteran
Veteran
Posts: 1889
Joined: Tue Dec 09, 2003 9:35 pm

  • Quote

Post by tld » Tue Jan 04, 2022 7:21 pm

Disk space had nothing whatsoever to do with canning grub2 for me. As soon as I saw that whole kludgy generated config script crap, as compared to the simplicity of the grub1 (and syslinux) config files, I was just immediately put off. I couldn't care less how well it might work, or whether or not you can edit those generated scripts etc...I just don't want to (See NeddySeagoon's C. A. R. Hoare quote). To each their own, but for me you can keep that mess.

Tom
Top
grknight
Retired Dev
Retired Dev
Posts: 2549
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Tue Jan 04, 2022 7:24 pm

tld wrote:Disk space had nothing whatsoever to do with canning grub2 for me. As soon as I saw that whole kludgy generated config script crap, as compared to the simplicity of the grub1 (and syslinux) config files, I was just immediately put off. I couldn't care less how well it might work, or whether or not you can edit those generated scripts etc...I just don't want to (See NeddySeagoon's C. A. R. Hoare quote). To each their own, but for me you can keep that mess.

Tom
This was already mentioned, but no one has to use grub-mkconfig. In fact the less talked about tool, grub-menulst2cfg, will take a grub legacy config and directly translate it to grub-2 and keep it the same minimalist config it always was.

Edit: to demonstrate:

Code: Select all

# cat /boot/grub.0/grub.conf
# Boot automatically after 5 secs.
timeout 5

# By default, boot the first entry.
default 0

# Fallback to the second entry.
fallback 1

# Splash image to show behind grub.
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux (4.9.34-gentoo)
root (hd0,0)
kernel /vmlinuz-4.9.34-gentoo root=UUID=e392274b-edd4-4e44-975c-9c1fbce772d5 video=radeondrmfb:1024x768 net.ifnames=0 rootfstype=ext4
initrd /initramfs-4.9.34-gentoo.img

title=Gentoo Linux (4.9.16-gentoo)
root (hd0,0)
kernel /vmlinuz-4.9.16-gentoo root=UUID=e392274b-edd4-4e44-975c-9c1fbce772d5 video=radeondrmfb:1024x768 net.ifnames=0 rootfstype=ext4
initrd /initramfs-4.9.16-gentoo.img

title=Gentoo Linux (4.4.26-gentoo)
root (hd0,0)
kernel /kernel-genkernel-x86_64-4.4.26-gentoo root=/dev/sda3 video=radeondrmfb:1024x768 net.ifnames=0 rootfstype=ext4

# For booting Gentoo with the static rescue shell
title  Gentoo (rescue shell)
root (hd0,0)
kernel /kernel-genkernel-x86_64-4.4.26-gentoo root=/dev/sda3 ramdisk=8192 init=/bin/bb dolvm net.ifnames=0
initrd /initramfs-genkernel-x86_64-4.4.26-gentoo

Code: Select all

# grub-menulst2cfg /boot/grub.0/grub.conf
# Boot automatically after 5 secs.
set timeout=5

# By default, boot the first entry.
set default='0'; if [ x"$default" = xsaved ]; then load_env; set default="$saved_entry"; fi

# Fallback to the second entry.
set fallback='1'

# Splash image to show behind grub.
# Unsupported legacy command: splashimage=(hd0,0)/grub/splash.xpm.gz


menuentry 'Gentoo Linux (4.9.34-gentoo)' {
  set root='(hd0,1)'; set legacy_hdbias='0'
  legacy_kernel   '/vmlinuz-4.9.34-gentoo' '/vmlinuz-4.9.34-gentoo' 'root=UUID=e392274b-edd4-4e44-975c-9c1fbce772d5' 'video=radeondrmfb:1024x768' 'net.ifnames=0' 'rootfstype=ext4'
  legacy_initrd '/initramfs-4.9.34-gentoo.img' '/initramfs-4.9.34-gentoo.img'

}

menuentry 'Gentoo Linux (4.9.16-gentoo)' {
  set root='(hd0,1)'; set legacy_hdbias='0'
  legacy_kernel   '/vmlinuz-4.9.16-gentoo' '/vmlinuz-4.9.16-gentoo' 'root=UUID=e392274b-edd4-4e44-975c-9c1fbce772d5' 'video=radeondrmfb:1024x768' 'net.ifnames=0' 'rootfstype=ext4'
  legacy_initrd '/initramfs-4.9.16-gentoo.img' '/initramfs-4.9.16-gentoo.img'

}

menuentry 'Gentoo Linux (4.4.26-gentoo)' {
  set root='(hd0,1)'; set legacy_hdbias='0'
  legacy_kernel   '/kernel-genkernel-x86_64-4.4.26-gentoo' '/kernel-genkernel-x86_64-4.4.26-gentoo' 'root=/dev/sda3' 'video=radeondrmfb:1024x768' 'net.ifnames=0' 'rootfstype=ext4'

  # For booting Gentoo with the static rescue shell
}

menuentry 'Gentoo (rescue shell)' {
  set root='(hd0,1)'; set legacy_hdbias='0'
  legacy_kernel   '/kernel-genkernel-x86_64-4.4.26-gentoo' '/kernel-genkernel-x86_64-4.4.26-gentoo' 'root=/dev/sda3' 'ramdisk=8192' 'init=/bin/bb' 'dolvm' 'net.ifnames=0'
  legacy_initrd '/initramfs-genkernel-x86_64-4.4.26-gentoo' '/initramfs-genkernel-x86_64-4.4.26-gentoo'
}
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Tue Jan 04, 2022 9:07 pm

The vast majority of the time grub-mkconfig works just fine. I have, however, adopted the practice of also maintaining a /boot/grub/custom.cfg file each time grub needs to be updated, i.e. new kernel. Once crafted, easy to keep up-to-date. Here is a snipit:

Code: Select all

$ head -14 /boot/grub/custom.cfg
#timeout=5
#default=0
#menu_color_normal=white/blue

menuentry 'Gentoo GNU/Linux, with Linux 5.4.88-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.88-gentoo-advanced-5958fd45-723e-4d6b-9253-e74dada52d45' {
	set root='hd0,msdos1'
	linux /boot/kernel-5.4.88-gentoo root=/dev/sda1 ro rootfstype=ext4 net.ifnames=0
	initrd	/boot/early_ucode.cpio
}
menuentry 'Gentoo GNU/Linux, with Linux 5.4.88-gentoo (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.4.88-gentoo-advanced-5958fd45-723e-4d6b-9253-e74dada52d45' {
	set root='hd0,msdos1'
	linux /boot/kernel-5.4.88-gentoo root=/dev/sda1 ro single rootfstype=ext4
	initrd	/boot/early_ucode.cpio
}
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
tld
Veteran
Veteran
Posts: 1889
Joined: Tue Dec 09, 2003 9:35 pm

  • Quote

Post by tld » Tue Jan 04, 2022 9:17 pm

As I briefly mentioned above, especially for UEFI systems, I can't say enough about rEFInd (sys-boot/refind). After doing a make install on the kernel, I'm just plain done. rEFInd simply finds all the kernels in /boot and defaults to the newest (with the ability to override of course).

I changed it's config to enable the "textonly" option, as I like that better than the icons. But yea...that beats anything I've used.

Tom
Top
Chiitoo
Administrator
Administrator
User avatar
Posts: 3018
Joined: Sun Feb 28, 2010 5:36 pm
Location: Sore wa sore, kore wa kore... nanoda.

  • Quote

Post by Chiitoo » Tue Jan 04, 2022 9:58 pm

NeddySeagoon wrote:Chiitoo,

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

Your system is haunted by the bootloader :)
I am using it with GPT currently, and I have never tried EFI still.

I guess ELILO might work with that, but I imagine I'll move something else if need be.
Kindest of regardses.
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 11:11 pm

As said, for each their own. My UEFI boot choice is EFi stub kernel. Motherboard firmware has built in menu which I can use to load a backup kernel if need arises. My kernel command line is built into kernel. Since my kernel names never change there is never any need to mess with efibootmgr. I like it simple.
My Gentoo installation notes.
Please learn how to denote units correctly!
Top
pietinger
Moderator
Moderator
Posts: 6608
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Wed Jan 05, 2022 12:06 am

Jaglover wrote:As said, for each their own. My UEFI boot choice is EFi stub kernel. Motherboard firmware has built in menu which I can use to load a backup kernel if need arises. My kernel command line is built into kernel. Since my kernel names never change there is never any need to mess with efibootmgr. I like it simple.
I also boot via UEFI and want to add an information: grub2 starts a stub-kernel like every other normal kernel also.

Therefore first I did a ordinary grub2-installation from our AMD64-handbook, changed my kernel to a stub-kernel and added a boot-entry to UEFI-BIOS via "efibootmgr" WITHOUT a version in the kernel's name. After getting a new kernel version I install it as stub-kernel. And if the new kernel has successfully booted I just add it to grub2. You will find my cheat sheet for that all in the first post of: https://forums.gentoo.org/viewtopic-t-1112848.html

I am a fan of KISS
Top
Jaglover
Watchman
Watchman
User avatar
Posts: 8291
Joined: Sun May 29, 2005 1:57 am
Location: Saint Amant, Acadiana

  • Quote

Post by Jaglover » Wed Jan 05, 2022 12:25 am

pietinger wrote:I also boot via UEFI and want to add an information: grub2 starts a stub-kernel like every other normal kernel also.
Sure it does. Actually when I got my very first EFi board I knew nothing about EFI. But I made my install EFI-ready. ESP, stub kernel. But I booted it with syslinux. One day I read the excellent documentation by Roderick Smith and switched to EFI. At this point I had sort of "dual boot", when I chose CSM in BIOS it performed legacy boot, when I chose EFI it booted in EFI mode. All this with the same kernel, located in same place.
My Gentoo installation notes.
Please learn how to denote units correctly!
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Wed Jan 05, 2022 4:00 am

tld wrote:As I briefly mentioned above, especially for UEFI systems, I can't say enough about rEFInd (sys-boot/refind). ...
Tom
Actually, only for UEFI systems. But, should I ever be required to use EFI again, I'm interested in rEFInd and glad to know about it. I have had to use EFI in the enterprise where it's been buggy and painful in each case. My personal systems are either old, or in the case of my main desktop PC, perfectly happy with traditional BIOS booting of MBR drives. The limitations of MBR partitioning are nowhere close to approaching my needs. I'm just added a "new" 2TB drive to my primary desktop (3rd spinning rust drive, this on an ST2000DM008-2FR1) using MBR partitioning should I ever need to use it as my boot drive.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
grknight
Retired Dev
Retired Dev
Posts: 2549
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Wed Jan 05, 2022 4:08 am

figueroa wrote:
tld wrote:As I briefly mentioned above, especially for UEFI systems, I can't say enough about rEFInd (sys-boot/refind). ...
Tom
Actually, only for UEFI systems. But, should I ever be required to use EFI again, I'm interested in rEFInd and glad to know about it. I have had to use EFI in the enterprise where it's been buggy and painful in each case. My personal systems are either old, or in the case of my main desktop PC, perfectly happy with traditional BIOS booting of MBR drives. The limitations of MBR partitioning are nowhere close to approaching my needs. I'm just added a "new" 2TB drive to my primary desktop (3rd spinning rust drive, this on an ST2000DM008-2FR1) using MBR partitioning should I ever need to use it as my boot drive.
This is a common misconception. Disk table types rarely matters for boot installation types (UEFI vs CSM/BIOS) except for some really strange mainboard firmwares (certain ThinkPads for example).

GPT is very capable of being started through 99% of CSM/BIOS firmware bootup with a tiny preparation for some loaders.

Other OSs may not like this, but Linux kernel and loaders generally do not care.
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Wed Jan 05, 2022 4:34 am

I don't know about misconception. At the school, I could not get a Gigabyte Technology Co., Ltd. M61PME-S2P/M61PME-S2P, BIOS F2 12/30/2008 to boot with GRUB from a properly prepared ST2000DM008-2FR1 that was setup with GPT and the required partitions. 1% -- so be it.

I realize that this is supposed to work, but with MBR and traditional BIOS boot loading no particular preparation is required beyond partitioning and formatting. I just don't need the grief. I'm happy to stick with BIOS/CSM until they pry it from my cold dead fingers. :-)
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
eccerr0r
Watchman
Watchman
Posts: 10234
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Wed Jan 05, 2022 10:06 am

I have a Gigabyte board that claims EFI compatibility.
I think not: it's quite deficient... Could not get it to boot off of a MBR formatted disk with ESP, did not like it. My Insyde H2O machines and Tianocore QEMU machine seems to boot just fine.

Back to the default MBR boot on the Gigabyte board...
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
technotorpedo
Apprentice
Apprentice
Posts: 151
Joined: Tue Dec 10, 2019 4:57 am

  • Quote

Post by technotorpedo » Wed Jan 05, 2022 11:30 am

Ah bless the Gentoo community, someone can always learn something or several somethings here. :) Resisted grub2 a year or so but as a then mostly noob eventually concluded this mystical "upstream" entity had moved on ... had spoken, legacy was being deprecated so I'd best embrace the decision and start googling about grub2. As a now more seasoned Linux noob, at some point got comfortable with the dang thing so grub2 became my go to. As yet only ever briefly tried the alternatives, did mostly like rEFInd ( one thing was-is clear to me, Rod Smith is no friggin joke when it comes to technical matters.)

Still occasionally seeing the word rEFInd, I experience flashbacks of wading through all the info he'd put on his website about secure boot, UEFI and GPT. How they worked, what it all meant and people's options. Scrambling to understand developments thinking it was some major obstacle Microsoft and/or other co-conspirators had thrown up to stiffle Linux adoption.

The guy was like a one man army, seeing postings he did everywhere online, explaining the topic and work arounds for Linux users ... Rod Smith, help threads far and wide. Believe recall one or more of his postings, made it clear how I eventually was able to chainload grub2 with Win8.1's own bootloader and get Windows to leave it alone, people were having issues with Windows upgrades borking their bootloaders. Guy is clearly no slouch though.
figueroa wrote:

I realize that this is supposed to work, but with MBR and traditional BIOS boot loading no particular preparation is required beyond partitioning and formatting. I just don't need the grief. I'm happy to stick with BIOS/CSM until they pry it from my cold dead fingers. :-)
Lmao .. hey, whatever works, works. Thanks all for the interesting tips, insights and/or reminders of all things booting gnu/Linux. :)
I <heart> gnu/Linux, Openbox and xdotool ...
Top
Irre
Guru
Guru
Posts: 434
Joined: Sat Nov 09, 2013 10:03 am
Location: Stockholm

  • Quote

Post by Irre » Wed Jan 05, 2022 1:18 pm

Grub2win is a grub2 boot loader that is installed and administered via windows. Good if you want to multiboot several systems without annoying windows!
Top
technotorpedo
Apprentice
Apprentice
Posts: 151
Joined: Tue Dec 10, 2019 4:57 am

  • Quote

Post by technotorpedo » Wed Jan 05, 2022 2:29 pm

^ Nice thanks, search says Grub2Win even supports Windows 10. I threw in the towel at 8.1 with no plans to look back. I simply must agree with the following, all things considered. :P
Linus Torvalds wrote:
A computer is like air conditioning – it becomes useless when you open Windows.”
I <heart> gnu/Linux, Openbox and xdotool ...
Top
Post Reply

40 posts
  • Previous
  • 1
  • 2

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