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.