Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #274059

Re: Grub menu entry for a system on a second drive.

From Felix Miata <mrmazda@stanis.net>
Newsgroups linux.debian.user
Subject Re: Grub menu entry for a system on a second drive.
Date 2024-10-25 22:50 +0200
Message-ID <JBzpT-4ciD-11@gated-at.bofh.it> (permalink)
References <JBcWl-3YAB-9@gated-at.bofh.it> <JBd61-3YE2-1@gated-at.bofh.it> <JBvvX-49ZN-7@gated-at.bofh.it> <JBwLn-4aEm-1@gated-at.bofh.it> <JBxR7-4bwF-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


David Wright composed on 2024-10-25 14:08 (UTC-0500):

> On Fri 25 Oct 2024 at 13:51:06 (-0400), Felix Miata wrote:

>> My actual custom stanzas are in /boot/grub2/custom.cfg, because I use only one
>> bootloader per PC, no matter how many installations it contains, which averages in
>> excess of 20, and I use whatever version of Grub2 that Tumbleweed provides,
>> usually the latest available. That shouldn't make any difference in Debian use,
>> other than the "2" in directory name.

>> In /etc/grub.d/ I copy 41_custom to 07_custom. Then I empty 41_custom and make it
>> immutable so that the entries 07_custom refers to are not duplicated by 41_custom
>> after every time whatever Grub package providing it is updated.

> Do you mean that the previously inserted copies of custom.cfg are
> preserved, and a new copy inserted, each time grub-mkconfig runs?

I don't understand this "insertion" business, thus neither "preserved". My
grub.cfgs contain zilch that is contained in custom.cfgs.

grub.cfg always contains:
…
### END /etc/grub.d/06_custom ###

### BEGIN /etc/grub.d/07_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/07_custom ###

### BEGIN /etc/grub.d/10_linux ###
…
This code means custom.cfg is read at boot, with result that custom.cfg stanzas
are displayed before those contained within grub.cfg itself.

> If that's not the case, then does it really matter that you have
> the same menuentry contents at positions 07 and 41?

07… stanzas are displayed prior to grub.cfg's own (10…) stanzas. 41… entries are
displayed after. These numbers beginning filenames in /etc/grub.d/ are about the
order of presentation when grub is putting up a menu at boot.
-- 
Evolution as taught in public schools is, like religion,
	based on faith, not based on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Grub menu entry for a system on a second drive. peter@easthope.ca - 2024-10-24 22:50 +0200
  Re: Grub menu entry for a system on a second drive. Felix Miata <mrmazda@earthlink.net> - 2024-10-24 23:00 +0200
  Re: Grub menu entry for a system on a second drive. David Wright <deblis@lionunicorn.co.uk> - 2024-10-25 05:30 +0200
    Re: Grub menu entry for a system on a second drive. peter@easthope.ca - 2024-10-25 17:50 +0200
      Re: Grub menu entry for a system on a second drive. Joe <joe@jretrading.com> - 2024-10-25 18:10 +0200
        Re: Grub menu entry for a system on a second drive. Max Nikulin <manikulin@gmail.com> - 2024-10-25 18:40 +0200
        Re: Grub menu entry for a system on a second drive. peter@easthope.ca - 2024-10-25 21:00 +0200
          Re: Grub menu entry for a system on a second drive. David Wright <deblis@lionunicorn.co.uk> - 2024-10-25 21:20 +0200
            Re: Grub menu entry for a system on a second drive. peter@easthope.ca - 2024-10-25 22:50 +0200
              Re: Grub menu entry for a system on a second drive. peter@easthope.ca - 2024-11-10 02:30 +0100
                Re: Grub menu entry for a system on a second drive. David Wright <deblis@lionunicorn.co.uk> - 2024-11-12 05:00 +0100
      Re: Grub menu entry for a system on a second drive. Greg Wooledge <greg@wooledge.org> - 2024-10-25 18:50 +0200
      Re: Grub menu entry for a system on a second drive. David Wright <deblis@lionunicorn.co.uk> - 2024-10-25 20:20 +0200
  Re (2): Grub menu entry for a system on a second drive. peter@easthope.ca - 2024-10-25 18:40 +0200
    Re: Grub menu entry for a system on a second drive. Felix Miata <mrmazda@stanis.net> - 2024-10-25 20:00 +0200
      Re: Grub menu entry for a system on a second drive. David Wright <deblis@lionunicorn.co.uk> - 2024-10-25 21:10 +0200
        Re: Grub menu entry for a system on a second drive. Felix Miata <mrmazda@stanis.net> - 2024-10-25 22:50 +0200
        Re: Grub menu entry for a system on a second drive. Felix Miata <mrmazda@stanis.net> - 2024-10-26 06:00 +0200
          Re: Grub menu entry for a system on a second drive. David Wright <deblis@lionunicorn.co.uk> - 2024-10-26 07:10 +0200
    Re: Re (2): Grub menu entry for a system on a second drive. Tim Woodall <debianuser@woodall.me.uk> - 2024-10-25 23:40 +0200
      [solved, partly] Re: Grub menu entry for a system on a second drive. peter@easthope.ca - 2024-10-27 05:20 +0100
        Re: [solved, partly] Re: Grub menu entry for a system on a second  drive. David Wright <deblis@lionunicorn.co.uk> - 2024-10-27 16:00 +0100
          Re: [solved, partly] Re: Grub menu entry for a system on a second drive. peter@easthope.ca - 2024-10-27 19:50 +0100
            Re: [solved, partly] Re: Grub menu entry for a system on a second  drive. Greg Wooledge <greg@wooledge.org> - 2024-10-28 12:10 +0100
              Re: [solved, partly] Re: Grub menu entry for a system on a second  drive. Greg Wooledge <greg@wooledge.org> - 2024-11-01 12:10 +0100
            Re: [solved, partly] Re: Grub menu entry for a system on a second drive. peter@easthope.ca - 2024-10-28 17:30 +0100
            Re: [solved, more] Re: Grub menu entry for a system on a second drive. peter@easthope.ca - 2024-11-02 16:10 +0100
              Re: [solved, more] Re: Grub menu entry for a system on a second  drive. David Wright <deblis@lionunicorn.co.uk> - 2024-11-04 05:50 +0100
                Re: [solved, more] Re: Grub menu entry for a system on a second drive. peter@easthope.ca - 2024-11-10 04:00 +0100
              Re: [solved, more] Re: Grub menu entry for a system on a second  drive. Dan Purgert <dan@djph.net> - 2024-11-04 13:50 +0100
          Re: [solved, partly] Re: Grub menu entry for a system on a second  drive. Max Nikulin <manikulin@gmail.com> - 2024-11-03 03:50 +0100

csiph-web