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

Reply via email to