public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Walter Dnes" <waltdnes@waltdnes.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: Exact setting in grub to default to a kernel by name?
Date: Sun, 13 Jun 2021 22:34:30 -0400	[thread overview]
Message-ID: <YMbANsUoon8Exgg8@waltdnes.org> (raw)
In-Reply-To: <20210614002044.288d580d@digimed.co.uk>

On Mon, Jun 14, 2021 at 12:20:44AM +0100, Neil Bothwick wrote
> On Sun, 13 Jun 2021 18:57:49 -0400, Walter Dnes wrote:
> 
> /etc/default/grub is only used when you call grub-mkconfig.
> 
> > 1) Is "insmod extfs3" necessary? I've built extfs3 into the kernels.
> 
> If the kernel is on an ext3 filesystem, yes. This is GRUB's module, it
> uses it to read an ext3 filesystem in order to load the kernel.

  Some confusion here.  "fdisk -l" on my new machine gives...

Device          Start        End    Sectors   Size Type
/dev/sda1        2048     526335     524288   256M EFI System
/dev/sda2      526336 1886416303 1885889968 899.3G Linux filesystem
/dev/sda3  1886418352 1953523119   67104768    32G Linux filesystem

  The EFI Systen partition is fat32.  The web examples I read show
"insmod <filesystem>" matching the filesystem of the linux system being
booted.  But all entries in grub.cfg on my new machine are "insmod fat".
I wonder if the web documentation was referring to BIOS-booting machines.
grub.cfg would be sitting on an xfs or extfs3 or whatever file system,
and would need to read it off that filesystem.

  I have a UEFI system which demands a fat32 boot partition.  Since grub
and the kernels are sitting on a fat32 partition, my machine needs
"insmod fat".

  Things that make you go hmmmm...
* you need to put "insmod fat" in grub.cfg to tell grub that the kernels
  are sitting on a fat32 partition
* but grub has to first read grub.cfg on the fat32 partition before it
  knows that it must read a fat32 partition

  I wonder if this is due to the verbose automagic configuration.  I
also noticed that all menuentries on my machine contain "insmod gzio
and "insmod part_gpt", so I'm including them here.  Here is my proposed
grub.cfg.  If anybody sees any problems, please let me know.  Otherwise,
I'll try the following tomorrow on the new machine...

========================================================================

        set timeout_style=menu
        set timeout=15
        insmod vga
        set gfxpayload=640x480
        insmod gzio
        insmod part_gpt
        insmod fat
        set root='hd0,gpt1'
menuentry 'Linux Experimental' --class gnu-linux {
        linux   /vmlinuz-experimental root=/dev/sda2 ro  noexec=on net.ifnames=0 intel_pstate=disable ipv6.disable=1
}
menuentry 'Linux Experimental Recovery' --class gnu-linux {
        linux   /vmlinuz-experimental root=/dev/sda2 ro
}
menuentry 'Linux Production' --class gnu-linux {
        linux   /vmlinuz-production root=/dev/sda2 ro  noexec=on net.ifnames=0 intel_pstate=disable ipv6.disable=1
}
menuentry 'Linux Production Recovery' --class gnu-linux {
        linux   /vmlinuz-production root=/dev/sda2 ro
}


-- 
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications


  reply	other threads:[~2021-06-14  2:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-13  4:07 [gentoo-user] Exact setting in grub to default to a kernel by name? Walter Dnes
2021-06-13  4:46 ` Hund
2021-06-13 13:33   ` Walter Dnes
2021-06-13 17:38     ` [gentoo-user] " Grant Edwards
2021-06-13 22:57       ` Walter Dnes
2021-06-13 23:20         ` Neil Bothwick
2021-06-14  2:34           ` Walter Dnes [this message]
2021-06-14 11:47             ` Neil Bothwick
2021-06-14  1:00         ` Grant Edwards
2021-06-14  6:44           ` Walter Dnes
2021-06-14  8:38             ` Grant Edwards
2021-06-14 20:25               ` Walter Dnes
2021-06-15 13:56                 ` Neil Bothwick
2021-06-16  0:51                   ` [gentoo-user] [SOLVED} " Walter Dnes
2021-06-13 18:05     ` [gentoo-user] " Neil Bothwick
2021-06-13 18:45       ` Michael
2021-06-13 20:09       ` Philip Webb
2021-06-13 20:58         ` Walter Dnes
2021-06-14  8:25           ` Peter Humphrey
2021-06-13  8:21 ` Neil Bothwick
2021-06-13  8:26   ` Neil Bothwick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YMbANsUoon8Exgg8@waltdnes.org \
    --to=waltdnes@waltdnes.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox