On Wed, 20 Dec 2023 at 06:01, David Wright <deb...@lionunicorn.co.uk> wrote:
>
>
> 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.

Yes, that's exactly it. My very first attempt involved using Debian's
/boot partition as the /boot partition for LFS as well, so installing
LFS's kernel (6.4.12 IIRC) alongside Debian's, but I quickly learned
the folly of that when I saw the mess update-grub made of that...

So I rebuilt my LFS (was happy to do so, this is a learning exercise)
with its own /boot partition, which gets me closer to the solution I
want which is one Grub, Debian's grub, with Debian as the first and
default boot choice, but LFS available as an alternative. And the only
remaining problem is the Debian GRUB's insistence on using /dev/sdX2
(for the root partition is the second partition on the disk) in the
"linux" command line parameter.

>
> 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.
>

Interesting -- but there is no grub.cfg on the LFS system because grub
has never been installed there. There is a /boot partition but no
/boot/grub/grub.cfg <suddenly doubts self, and goes to check --
indeed, there isn't>.
So, nothing to copy from in this case.

Mark

Reply via email to