NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-xen/59451: XEN3_DOM0 kernel finds the wrong root device
The following reply was made to PR port-xen/59451; it has been noted by GNATS.
From: Chuck Zmudzinski <frchuckz%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: port-xen/59451: XEN3_DOM0 kernel finds the wrong root device
Date: Mon, 2 Jun 2025 12:48:30 -0400
On 6/2/2025 8:20 AM, Michael van Elst via gnats wrote:
> The following reply was made to PR port-xen/59451; it has been noted by GNATS.
>
> From: mlelstv%serpens.de@localhost (Michael van Elst)
> To: gnats-bugs%netbsd.org@localhost
> Cc:
> Subject: Re: port-xen/59451: XEN3_DOM0 kernel finds the wrong root device
> Date: Mon, 2 Jun 2025 12:18:41 -0000 (UTC)
>
> gnats-admin%NetBSD.org@localhost ("Chuck Zmudzinski via gnats") writes:
> ...
> > My testing verified that Manuel is correct: bootdev= and root= behave the same way,
> > but actually root= is better because it gives me three more characters for the
> > boot command line before it overflows and starts to truncate the end of the command
> > line.
>
>
> bootdev= and root= currently work the same way.
>
> The supplied string is checked against all disk and network interface
> device names.
>
> If there is a match, then the result is a pointer "booted_device"
> to the driver and an integer "booted_partition". The kernel will
> later try to access the particular driver and read data from the
> numbered partition. Obviously the partition is ignored for a
> network interface, and it should be 0 for something like a wedge
> (that doesn't have partitions).
>
> If there is no match, then the string is passed as is, similar to
> a hardcoded embedded "config root" in the kernel config file. The
> result is the string pointer "bootspec" that is evaluated later
> by the kernel.
>
> In either case, the supplied string can have 144 bytes (including
> the terminating NUL character), but the parser truncates the
> full command line to 255 characters first, not sure why.
>
After further investigation...
I don't think the string passed by the bootdev= setting is overflowing
in the kernel. Rather, I think the length of the arguments of the
"load" command that the bootloader uses to load the DOM0 kernel image
is overflowing. I think so because I was actually able to use a
long UUID as the wedgename by reducing the number of characters in
the filename of the kernel I am booting, and reducing that helps
reduce the length of the arguments to the bootlader's "load" command.
In any case, I decided to set a label on the GPT partition like "netsbd-root"
instead of using the long UUID as the wedgename to help ensure that nothing
in my boot.cfg gets truncated.
Home |
Main Index |
Thread Index |
Old Index