Comment 37 for bug 2009141

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2023-04-14 07:02 EDT-------
(In reply to comment #35)
> (In reply to comment #34)
> > BTW, the kernel boot parameters look odd:
> >
> > [ 0.440956] Kernel command line:
> > @```@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> > @@@
> >
> > @<email address hidden>, what exact parm file content did you use to boot the
> > installer?
>
> I started out with the following, but my syntax sequence for the line was
> not accepted , as was getting "Unknown kernel command line parameters"

Unfortunately, this kernel message can be misleading.

The Linux "kernel" command line can contain different types of parameters:
(1) actual kernel parameters
(2) arbitrary user space parameters

See also Section "Parameters other than kernel parameters" in https://www.ibm.com/docs/en/linux-on-systems?topic=skp-different-sources-1#ipl_kernparm_conflicts__title__4
and
https://www.ibm.com/docs/en/linux-on-systems?topic=s-kernel-parameter-line-1

Recently, the kernel started to check the syntax for (1). So any parameters from class (2) [before an optional separator "--"] get reported as unknown, but they can still be perfectly used by user space.

You can specify all non-kernel parameters from class (2) after a "--" separator on the kernel command line like this to avoid misleading kernel messages [see also below]:
<all actual kernel parameters> -- <any non-kernel parameters>

> I need to check the proper syntax and sequence for the Kernel command line
> input to put in file PARMFILE UBUNTU
>
> PARMFILE UBUNTU
> ip=9.11.116.213::9.11.116.1:24:255.255.255.0:ilabg13:ence0f:none:9.11.227.25

I think the duplicate specification of both a CIDR netmask and an IP netmask seems odd:
24:255.255.255.0

I'm not sure, which syntax the Ubuntu installer initrd actually uses.
There is a (user space) dracut cmdline option
https://mirrors.edge.kernel.org/pub/linux/utils/boot/dracut/dracut.html#_network
ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|ibft}[:[<mtu>][:<macaddr>]]
ip=<client-IP>:[<peer>]:<gateway-IP>:<netmask>:<client_hostname>:<interface>:{none|off|dhcp|on|any|dhcp6|auto6|ibft}[:[<dns1>][:<dns2>]]
And there is an actual kernel parameter
https://www.kernel.org/doc/html/latest/admin-guide/nfs/nfsroot.html#kernel-command-line
ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>:<dns0-ip>:<dns1-ip>:<ntp0-ip>

Comparing with my last Ubuntu on s390x installation, I would probably use this instead (dropping ":24"), no matter if used as kernel boot parameter or entered interactively (in case the latter understands ip= syntax, which I don't know):

ip=9.11.116.213::9.11.116.1:255.255.255.0:ilabg13:ence0f:none:9.11.227.25

FWIW, I had also added an url= pointing to the ISO in my parmfile when I manually installed Ubuntu on s390x the last time, but that might be optional(?):

url=http://bistro/ubuntu/UBUNTUxx.yy/zzz.-live-server-...-s390x.iso

Also, without DPM device auto configuration, I wonder how the network interface ence0f would get configured as prerequisite. As opposed to PCI(e) based network devices such as RoCE adapters, CCW based (the prefix enc stands for EtherNet on Ccw bus) network devices need an explicit s390-specific pre-config consisting of the assembly of a ccwgroup (subchannel/device triplet) and setting that ccwgroup online. I installed under z/VM (so definitely without DPM dev auto conf) and only had ip= and url=, so there must be some magic in the Ubuntu installer initrd automatically, performing the pre-req for an enc... network interface.

> i.e.
> [ 0.452018] Kernel command line:
> ip=9.11.116.213::9.11.116.1:24:255.255.255.0:ilabg13:ence0f:none:9.11.227.25
> [ 0.452037] Unknown kernel command line parameters
> "ip=9.11.116.213::9.11.116.1:24:255.255.255.0:ilabg13:ence0f:none:9.11.227.
> 25", will be passed to user space
>
>
> So I chose to go with the default PARMFILE UBUNTU, with just the "---" line
> and enter the info as requested per the the statement "will be passed to
> user space", as it prompts

Sorry, if I missed it as I'm a bit lost in all the debug data. Where can I see this prompt and what was interactively entered?

> i.e.
> Default PARMFILE UBUNTU
> ---

ubuntu@bistro:~/UBUNTU22.04.1/CD/boot$ xxd parmfile.ubuntu
00000000: 202d 2d2d 200a --- .

@Canonical, I would like to understand the rationale behind this default kernel boot parameter.
I'm puzzled by the triple-dash, because the kernel parameter documentation
https://www.kernel.org/doc/html/latest/admin-guide/kernel-parameters.html
only seems to mention a double-dash to have the kernel end parsing for kernel parameters and pass the remainder to init:
<quote>
The kernel parses parameters from the kernel command line up to ?--?; if it doesn?t recognize a parameter and it doesn?t contain a ?.?, the parameter gets passed to init: parameters with ?=? go into init?s environment, others are passed as command line arguments to init. Everything after ?--? is passed as an argument to init.
</quote>
Does that mean the triple dash would (accidentally??) lead to "- " or "-" being passed as command line argument to init? What would be the consequences?

Also, I don't understand how that default could cause a completely unexpected garbled kernel command line with lots of special characters, and whether that could cause any follow-on problems (subiquity and other user space actually saw the same garbled content via /proc/cmdline as visible in the logs (let alone what might be passed to the environment or as arguments of init/PID1)):

> > [ 0.440956] Kernel command line:
> > @```@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> > @@@