Re: Busybox 1.27 breaks kernel cmdline preseeding

2017-11-27 Thread Mathieu Trudel-Lapierre
On Mon, Nov 27, 2017 at 4:22 PM, Raphael Hertzog  wrote:
[...]
> We wants to stop using the environment because busybox hides it from us...
> I don't see the point of continuing to use it.

I understand that; I tend to agree, modulo things not being listed in
/proc/cmdline as below...

>
> Can you elaborate on what's wrong with /proc/cmdline on kfreebsd? We know
> that it exists. Are you saying that it doesn't contain the actual
> parameters passed on the kernel command line at boot time?
>

Correct; /proc/cmdline exists, but anything set up using:

set kFreebsd.priority=high
set kFreebsd.auto=true

Which appears to me to be the current method for preseeding on the
command-line (ie. at boot time; from grub); these options do not show
up in /proc/cmdline in my testing.

I tried to pass things after boot_one; but did not dig in any farther
than that. There probably is another way to get this to work.

[...]
> At least it does not cope well with parameters without any "=". Try adding
> words like "quiet" in the middle of your parameter list. They do not end
> up on a line of their own.
>
> I freely admit that my solution is complex but I was not able to find a
> simpler one that works well enough with my test case:
> language=fr_FR long?='1 2 3' rescue/enable="true" my/description="un message" 
> --- quiet

Yeah, I didn't have one of those in my test case. Oops.

-- 

Mathieu Trudel-Lapierre 
Freenode: cyphermox, Jabber: mathieu...@gmail.com
4096R/65B58DA1 818A D123 0992 275B 23C2  CF89 C67B B4D6 65B5 8DA1



Re: Busybox 1.27 breaks kernel cmdline preseeding

2017-11-27 Thread Raphael Hertzog
Hi,

On Mon, 27 Nov 2017, Mathieu Trudel-Lapierre wrote:
> On Mon, Nov 27, 2017 at 3:08 PM, Raphael Hertzog  wrote:
> [...]
> > I pushed a pu/kernel-cmdline-preseed branch implementing the preseeding
> > out of /proc/cmdline. It's more elaborate than Mathieu's patch
> > (https://paste.ubuntu.com/26034695/) in that it is able to handle
> > multi-word values.
> >
> > I tested it locally and it fixes the rescue mode for me. For
> > consistency, I renamed the command and the udeb, but the only place
> > where it matters is in "debian-installer" itself where we have to update
> > the package name.
> 
> That will work on most arches, but not on kfreebsd/*. That said, the
> easy fix would be to look at both environment and /proc/cmdline.

We wants to stop using the environment because busybox hides it from us...
I don't see the point of continuing to use it.

Can you elaborate on what's wrong with /proc/cmdline on kfreebsd? We know
that it exists. Are you saying that it doesn't contain the actual
parameters passed on the kernel command line at boot time?

I put debian-bsd@lists.debian.org in copy to have their feedback/advice.
Is there any other way to get the parameters passed on the kernel
command line?

> I *think* you only really need -e 's/\([^ =]*=[^ "]\)/\n\1/g'  -e
> "s/\([^ =]*=[^ ']\)/\n\1/g" to multiline the entries and appropriately
> handle any multiword. With my limited testing it seemed to work well,
> and would be less complex than your solution ;)
> 
> Did I miss some important corner-case?

At least it does not cope well with parameters without any "=". Try adding
words like "quiet" in the middle of your parameter list. They do not end
up on a line of their own.

I freely admit that my solution is complex but I was not able to find a
simpler one that works well enough with my test case:
language=fr_FR long?='1 2 3' rescue/enable="true" my/description="un message" 
--- quiet

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Support Debian LTS: https://www.freexian.com/services/debian-lts.html
Learn to master Debian: https://debian-handbook.info/get/