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


Groups > linux.debian.user > #264949

Re: GRUB -- Debian overrides? Or maybe I just don't understand it well...

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: GRUB -- Debian overrides? Or maybe I just don't understand it well...
Date 2023-12-20 07:10 +0100
Message-ID <HMXWh-eNBt-3@gated-at.bofh.it> (permalink)
References <HMsz7-euji-1@gated-at.bofh.it> <HMu7T-evjs-1@gated-at.bofh.it> <HMSDf-eKfb-3@gated-at.bofh.it> <HMUOJ-eLqm-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue 19 Dec 2023 at 21:40:19 (-0500), Felix Miata wrote:
> Mark Fletcher composed on 2023-12-20 00:28 (UTC):
> 
> > I am curious to know from Debian
> > GRUBbers (as it were) if the behaviour I am describing in this thread
> > is expected...
> 
> I suspect few if any regulars here spend much time with Slackware. I think a more
> conventional approach would be to reconfigure Slackware to boot by UUID, with the
> result that Debian's os-prober should pick it up in the more reliable fashion. I
> don't have a bootloader installed on my only Slackware, and have no more
> familiarity with ELILO than that it seems to be the Slack user favorite
> bootloader. Whether or how well it or its Grub might pick up Debian, or any
> proclivity it may have to usurp boot control from Debian or include stanza(s) for
> Debian, I have no basis for guessing.

I can't see anywhere where the OP claims to have set up LFS for
booting itself, as opposed to being booted from a Debian Grub.
It only says "I have been able to get a grub.cfg including the
LFS system …", which seems to imply LFS has only been set up
as a "foreign" system by a Debian system.

When os-prober runs on my system, a lot of stuff gets logged in
messages, syslog and user.log. The lines that contain the string
"result:" (without the quotes) are interesting. It's evident from
those that have six fields following result: have had their root=
field copied from the foreign system's grub.cfg. (In my case,
"foreign" means a Debian system of the previous release.)

When os-prober writes several clauses into my new grub.cfg's
"### BEGIN /etc/grub.d/30_os-prober ###" section, the references
to the partition are constructed using UUIDs (not PARTUUIDs, because
there's an initrd). However, the kernel command line reads
"root=LABEL=toto04", so that string wasn't constructed by os-prober,
but copied from the foreign grub.cfg¹.

That suggests to me the probability that whereas +Grub constructs+
the root= strings for the "### BEGIN /etc/grub.d/10_linux ###"
section, +os-prober copies+ the root= strings into the
"### BEGIN /etc/grub.d/30_os-prober ###" section instead.

> If you can keep your Slack kernel (& initrd if using one) generically symlinked
> without much trouble, a stanza you put in /etc/grub.d/41_custom should be able to
> boot Slack from Debian's Grub using your custom stanza containing root=LABEL= or
> root=UUID= without trouble. Same would go for using 07_custom, or custom.cfg with
> 06_custom, to move your custom stanza to the Debian Grub menu's top.

In case it's not clear, "generically symlinked" means that
/vmlinuz is a symlink pointing to the most recent linux-image.
(Similarly for initrd.) I added the following to
/etc/grub.d/07_custom:

  menuentry 'My bullseye' $menuentry_id_option 'custom' {
      load_video
      set gfxpayload=keep
      insmod gzio
      insmod part_gpt
      insmod ext2
      search --no-floppy --set=root --label noah03
      echo    'Load /vmlinuz …'
      linux   /vmlinuz root=LABEL=noah03 ro systemd.show_status=true quiet
      echo    'Load initial ramdisk /initrd.img …'
      initrd  /initrd.img
  }

¹ After installing a system, upgrading the kernel, or upgrading
  Grub, I run a script that converts /all/ the UUIDs in grub.cfg
  into LABELs, in this little dance:
  cp grub.cfg           →     grub.cfg-uuids
  cp grub.cfg-edited    →     grub.cfg-old
   < grub.cfg filter-script > grub.cfg-edited
  cp grub.cfg-edited    →     grub.cfg

Cheers,
David.

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


Thread

GRUB -- Debian overrides? Or maybe I just don't understand it well... Mark Fletcher <mark27q1@gmail.com> - 2023-12-18 21:40 +0100
  Re: GRUB -- Debian overrides? Or maybe I just don't understand it well... Richmond <dnomhcir@gmx.com> - 2023-12-18 22:00 +0100
  Re: GRUB -- Debian overrides? Or maybe I just don't understand it  well... Felix Miata <mrmazda@earthlink.net> - 2023-12-18 23:20 +0100
    Re: GRUB -- Debian overrides? Or maybe I just don't understand it well... Mark Fletcher <mark27q1@gmail.com> - 2023-12-20 01:30 +0100
      Re: GRUB -- Debian overrides? Or maybe I just don't understand it  well... Felix Miata <mrmazda@earthlink.net> - 2023-12-20 03:50 +0100
        Re: GRUB -- Debian overrides? Or maybe I just don't understand it  well... David Wright <deblis@lionunicorn.co.uk> - 2023-12-20 07:10 +0100
          Re: GRUB -- Debian overrides? Or maybe I just don't understand it  well... Felix Miata <mrmazda@earthlink.net> - 2023-12-20 08:00 +0100
          Re: GRUB -- Debian overrides? Or maybe I just don't understand it well... Mark Fletcher <mark27q1@gmail.com> - 2023-12-21 22:40 +0100
            Re: GRUB -- Debian overrides? Or maybe I just don't understand it well... Mark Fletcher <mark27q1@gmail.com> - 2023-12-21 23:00 +0100
            Re: GRUB -- Debian overrides? Or maybe I just don't understand it  well... David Wright <deblis@lionunicorn.co.uk> - 2023-12-22 02:30 +0100
              Re: GRUB -- Debian overrides? (but on original thread topic, not so  much) Felix Miata <mrmazda@earthlink.net> - 2023-12-22 04:30 +0100
                Re: GRUB -- Debian overrides? (but on original thread topic, not so  much) David Wright <deblis@lionunicorn.co.uk> - 2023-12-22 06:40 +0100
              Re: GRUB -- Debian overrides? Or maybe I just don't understand it well... Mark Fletcher <mark27q1@gmail.com> - 2023-12-22 12:30 +0100
                Re: GRUB -- Debian overrides? Or maybe I just don't understand it  well... David Wright <deblis@lionunicorn.co.uk> - 2023-12-27 06:00 +0100
        Re: GRUB -- Debian overrides? Or maybe I just don't understand it well... "Roy J. Tellason, Sr." <roy@rtellason.com> - 2023-12-20 17:10 +0100
        Re: GRUB -- Debian overrides? Or maybe I just don't understand it well... Mark Fletcher <mark27q1@gmail.com> - 2023-12-21 22:40 +0100
          Re: GRUB -- Debian overrides? Or maybe I just don't understand it  well... Felix Miata <mrmazda@earthlink.net> - 2023-12-22 01:40 +0100
            Re: GRUB -- Debian overrides? Or maybe I just don't understand it  well... Greg Wooledge <greg@wooledge.org> - 2023-12-22 01:50 +0100
    Re: GRUB -- Debian overrides? Or maybe I just don't understand it well... Mark Fletcher <mark27q1@gmail.com> - 2023-12-21 23:50 +0100
      Re: GRUB -- Debian overrides? Or maybe I just don't understand it well... Anssi Saari <anssi.saari@debian-user.mail.kapsi.fi> - 2023-12-22 08:50 +0100
        Re: GRUB -- Debian overrides? Or maybe I just don't understand it well... Mark Fletcher <mark27q1@gmail.com> - 2023-12-22 12:00 +0100
          Re: GRUB -- Debian overrides? Or maybe I just don't understand it well... Mark Fletcher <mark27q1@gmail.com> - 2023-12-22 12:50 +0100
            Re: GRUB -- Debian overrides? Or maybe I just don't understand it  well... Felix Miata <mrmazda@earthlink.net> - 2023-12-22 15:20 +0100

csiph-web