Re: [gentoo-user] Exact setting in grub to default to a kernel by name?
On Sunday, 13 June 2021 21:58:05 BST Walter Dnes wrote: > On Sun, Jun 13, 2021 at 04:09:58PM -0400, Philip Webb wrote > > > Or the OP could use Lilo, the simplest boot manager of all. > > On a UEFI-only desktop PC? No. There is sys-boot/elilo, which ought to do, but I haven't tried it. -- Regards, Peter.
Re: [gentoo-user] Exact setting in grub to default to a kernel by name?
On Sun, Jun 13, 2021 at 04:09:58PM -0400, Philip Webb wrote > > Or the OP could use Lilo, the simplest boot manager of all. On a UEFI-only desktop PC? -- Walter Dnes I don't run "desktop environments"; I run useful applications
Re: [gentoo-user] Exact setting in grub to default to a kernel by name?
210613 Neil Bothwick wrote: > Isn't this a new laptop? If so, why torment yourself with GRUB when you > have UEFI available to you? The only real justification for using GRUB in > such a situation is that you are completely familiar with it and don't > want to learn something else. But if you have to learn something, you may > as well learn the 2/3 line configs of systemd-boot. > Note that systemd-boot doesn't require systemd, it's just the gummiboot > boot manager that was merged into systemd taken out again. Or you could > use rEFInd if you prefer a prettier boot menu. Or the OP could use Lilo, the simplest boot manager of all. -- ,, SUPPORT ___//___, Philip Webb ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto TRANSIT`-O--O---' purslowatchassdotutorontodotca
Re: [gentoo-user] Exact setting in grub to default to a kernel by name?
On Sunday, 13 June 2021 19:05:29 BST Neil Bothwick wrote: > On Sun, 13 Jun 2021 09:33:57 -0400, Walter Dnes wrote: > > On Sun, Jun 13, 2021 at 06:46:15AM +0200, Hund wrote > > > > > >Let me rephrase the question more generally... given a > > > >kernel "/boot/vmlinuz-fubar" how and where do I specify it by name as > > > >the default boot kernel? > > > > > > What about this? > > > > > > https://www.stephenrlang.com/2017/06/setting-default-kernel-in-grub2/ > > > > > Is /boot/grub/grub.cfg the file that actually controls bootup, and is > > > > all 154 lines of verbosity really necessary? For menu entries I see... > > Not necessary, but does no harm either. The first 90% of the file is > automated setup, which you can replace with hard coded entries or just > leave it to its own devices. The only part you need to think about is the > menuentry sections. > > > I'd be tempted to do a manual gub.cfg if I had documentation. > > GRUB has extensive documentation. it's not the best written but every > configuration option is described. > > Isn't this a new laptop? If so, why torment yourself with GRUB when you > have UEFI available to you? The only real justification for using GRUB in > such a situation is that you are completely familiar with it and don't > want to learn something else. But if you have to learn something, you may > as well learn the 2/3 line configs of systemd-boot. > > Note that systemd-boot doesn't require systemd, it's just the gummiboot > boot manager that was merged into systemd taken out again. Or you could > use rEFInd if you prefer a prettier boot menu. I do like rEFInd, feels AppleMac-like. :-) However, I have abandoned all boot managers these days on UEFI MoBos and just use the native UEFI firmware to boot with.[1] It's simpler, lighter and faster. However, I don't boot into different OS/kernels unless I have to and when I do I have to use the UEFI menu GUI to switch OS/kernels, so this won't suit all use cases. This approach requires to enable the 'EFI boot stub' option in the kernel, so that the UEFI firmware can recognise and load the kernel directly as an EFI executable.[2] Then it is a matter of using the efibootmgr on the CLI to set up my boot menu labels and OS/kernel order.[3] [1] https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/ Bootloader#Alternative_2:_efibootmgr [2] https://wiki.gentoo.org/wiki/EFI_Stub [3] https://wiki.gentoo.org/wiki/Efibootmgr signature.asc Description: This is a digitally signed message part.
Re: [gentoo-user] Exact setting in grub to default to a kernel by name?
On Sun, 13 Jun 2021 09:33:57 -0400, Walter Dnes wrote: > On Sun, Jun 13, 2021 at 06:46:15AM +0200, Hund wrote > > >Let me rephrase the question more generally... given a > > >kernel "/boot/vmlinuz-fubar" how and where do I specify it by name as > > >the default boot kernel? > > > > What about this? > > > > https://www.stephenrlang.com/2017/06/setting-default-kernel-in-grub2/ > > > > Is /boot/grub/grub.cfg the file that actually controls bootup, and is > all 154 lines of verbosity really necessary? For menu entries I see... Not necessary, but does no harm either. The first 90% of the file is automated setup, which you can replace with hard coded entries or just leave it to its own devices. The only part you need to think about is the menuentry sections. > I'd be tempted to do a manual gub.cfg if I had documentation. GRUB has extensive documentation. it's not the best written but every configuration option is described. Isn't this a new laptop? If so, why torment yourself with GRUB when you have UEFI available to you? The only real justification for using GRUB in such a situation is that you are completely familiar with it and don't want to learn something else. But if you have to learn something, you may as well learn the 2/3 line configs of systemd-boot. Note that systemd-boot doesn't require systemd, it's just the gummiboot boot manager that was merged into systemd taken out again. Or you could use rEFInd if you prefer a prettier boot menu. -- Neil Bothwick Mouse: (n.) an input device used by management to force computer users to keep at least a part of their desks clean. pgpPxJzM0hjsF.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Exact setting in grub to default to a kernel by name?
On Sun, Jun 13, 2021 at 06:46:15AM +0200, Hund wrote > >Let me rephrase the question more generally... given a > >kernel "/boot/vmlinuz-fubar" how and where do I specify it by name as > >the default boot kernel? > > What about this? > > https://www.stephenrlang.com/2017/06/setting-default-kernel-in-grub2/ Is /boot/grub/grub.cfg the file that actually controls bootup, and is all 154 lines of verbosity really necessary? For menu entries I see... = menuentry 'Gentoo GNU/Linux, with Linux production' --class blah blah blah { blah blah blah set root='hd0,gpt1' linux /vmlinuz-production root=/dev/sda2 ro noexec=on net.ifnames=0 intel_pstate=disable ipv6.disable=1 } menuentry 'Gentoo GNU/Linux, with Linux production (recovery mode)' --class blah blah blah { blah blah blah set root='hd0,gpt1' linux /vmlinuz-production root=/dev/sda2 ro single } menuentry 'Gentoo GNU/Linux, with Linux experimental' --class blah blah blah { blah blah blah set root='hd0,gpt1' linux /vmlinuz-experimental root=/dev/sda2 ro noexec=on net.ifnames=0 intel_pstate=disable ipv6.disable=1 } menuentry 'Gentoo GNU/Linux, with Linux experimental (recovery mode)' --class blah blah blah { blah blah blah set root='hd0,gpt1' linux /vmlinuz-experimental root=/dev/sda2 ro single } = I'd be tempted to do a manual gub.cfg if I had documentation. -- Walter Dnes I don't run "desktop environments"; I run useful applications
Re: [gentoo-user] Exact setting in grub to default to a kernel by name?
On Sun, 13 Jun 2021 09:21:36 +0100, Neil Bothwick wrote: > The default setting takes either the number of title of a kernel, so > default="experimental kernel" should do it. Forgot the obligatory RTFM reference :) https://www.gnu.org/software/grub/manual/grub/grub.html#default -- Neil Bothwick After all is said and done let there not be more said than done. pgpcGURGY0yxa.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Exact setting in grub to default to a kernel by name?
On Sun, 13 Jun 2021 00:07:27 -0400, Walter Dnes wrote: > I have multiple (would you believe 2?) kernels in /boot. > > [x8940][waltdnes][~] ll /boot/vm* > -rwxr-xr-x 1 root root 7046848 Jun 12 23:46 /boot/vmlinuz-experimental > -rwxr-xr-x 1 root root 6986624 Jun 12 16:55 /boot/vmlinuz-production > > The grub kernel listing at bootup is > > - production kernel > - production kernel recovery mode > - experimental kernel > - experimental kernel recovery mode > > The default is the first entry, i.e. "GRUB_DEFAULT=0" in > /etc/default/grub. I prefer going with "experimental". If I screw up > the config to the point where it can't boot, then I'll manually override > to "production". The simple way of getting the third entry as default > is "GRUB_DEFAULT=2" (remember to count from zero). > > This works for now. But what happens if/when I add more kernels for > whatever reason? Let me rephrase the question more generally... given a > kernel "/boot/vmlinuz-fubar" how and where do I specify it by name as > the default boot kernel? > The default setting takes either the number of title of a kernel, so default="experimental kernel" should do it. -- Neil Bothwick A Smith & Wesson beats Four Aces everytime. pgpyzmCiCiVrV.pgp Description: OpenPGP digital signature
Re: [gentoo-user] Exact setting in grub to default to a kernel by name?
>Let me rephrase the question more generally... given a >kernel "/boot/vmlinuz-fubar" how and where do I specify it by name as >the default boot kernel? What about this? https://www.stephenrlang.com/2017/06/setting-default-kernel-in-grub2/ -- Hund
[gentoo-user] Exact setting in grub to default to a kernel by name?
I have multiple (would you believe 2?) kernels in /boot. [x8940][waltdnes][~] ll /boot/vm* -rwxr-xr-x 1 root root 7046848 Jun 12 23:46 /boot/vmlinuz-experimental -rwxr-xr-x 1 root root 6986624 Jun 12 16:55 /boot/vmlinuz-production The grub kernel listing at bootup is - production kernel - production kernel recovery mode - experimental kernel - experimental kernel recovery mode The default is the first entry, i.e. "GRUB_DEFAULT=0" in /etc/default/grub. I prefer going with "experimental". If I screw up the config to the point where it can't boot, then I'll manually override to "production". The simple way of getting the third entry as default is "GRUB_DEFAULT=2" (remember to count from zero). This works for now. But what happens if/when I add more kernels for whatever reason? Let me rephrase the question more generally... given a kernel "/boot/vmlinuz-fubar" how and where do I specify it by name as the default boot kernel? -- Walter Dnes I don't run "desktop environments"; I run useful applications