#2844 PR merged: Overhauled rescue/GNU/Linux/290_kernel_cmdline.sh

Labels: enhancement, fixed / solved / done

jsmeix opened issue at 2022-07-28 11:57:

I simulated that proc/cmdline contains

console=ttyS0,9600 console=tty0

and then COPY_KERNEL_PARAMETERS+=( console )
results

# usr/sbin/rear -D mkrescue
...
Adding console=ttyS0,9600 to KERNEL_CMDLINE
Adding console=tty0 to KERNEL_CMDLINE

for me.

  • Brief description of the changes in this pull request:

Overhauled rescue/GNU/Linux/290_kernel_cmdline.sh
in particular to make it possible
to add several kernel options by this script
with same kernel option keyword like

console=ttyS0,9600 console=tty0

jsmeix commented at 2022-08-02 07:23:

@rear/contributors @pcahyna
I would like to merge it tomorrow afternoon
provided there are no objections.

pcahyna commented at 2022-08-02 10:14:

Hello @jsmeix , what is the intended interaction with cmdline_add_console (called from rescue/GNU/Linux/400_use_serial_console.sh )? It seems to strip all console parameters and add its own, so if it gets invoked, this change will have no effect on the console used. Am I right?

jsmeix commented at 2022-08-02 10:31:

In this pull request there is no intended interaction
with anything related to ReaR's current way of setting
the 'console' kernel command line options.

The only intent of this pull request is to enhance
the generic COPY_KERNEL_PARAMETERS functionality
to make it possible to add several kernel options
with same kernel option keyword like

console=ttyS0,9600 console=tty0

which is only used here as example for a kernel option
that can appear more than once on the kernel command line.

After this pull request is merged - i.e. when

COPY_KERNEL_PARAMETERS+=( console )

works as it should, then I will have a look at
how we could simplify ReaR's current way of
setting 'console' kernel command line options.
My plan is to follow your proposal, cf.
https://github.com/rear/rear/pull/2749#issuecomment-1196650631
i.e. basically have in default.conf

COPY_KERNEL_PARAMETERS=( 'console' 'net.ifnames' 'biosdevname' )

and then removal of ReaR's current default way
of discovering "possibly console" devices and
constructing 'console' kernel options on its own.

pcahyna commented at 2022-08-03 07:40:

Hello @jsmeix , thanks for the explanation. I was asking because your description of testing the change may suggest that the code is now getting the console parameters right in the presence of a serial console (although it does not actually say so).

jsmeix commented at 2022-08-03 11:59:

@pcahyna
if it is OK for you I would like to merge it soon.

pcahyna commented at 2022-08-03 13:12:

Thanks, I think this is a step in the right direction.

jsmeix commented at 2022-08-03 13:21:

Thank you for your review.


[Export of Github issue for rear/rear.]