console= parameters need to be added before -- on kernel cmdline
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Unassigned | ||
1.8 |
Fix Released
|
Undecided
|
Unassigned | ||
curtin |
Fix Released
|
Medium
|
Unassigned | ||
curtin (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Trusty |
Fix Released
|
High
|
Unassigned | ||
Utopic |
Won't Fix
|
Medium
|
Unassigned | ||
Vivid |
Fix Released
|
Medium
|
Unassigned | ||
Wily |
Fix Released
|
High
|
Unassigned | ||
debian-installer (Debian) |
Fix Released
|
Unknown
|
|||
debian-installer (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Trusty |
Fix Released
|
Undecided
|
Unassigned | ||
Utopic |
Fix Released
|
Undecided
|
Unassigned | ||
Vivid |
Fix Released
|
Undecided
|
Unassigned | ||
Wily |
Fix Released
|
Undecided
|
Unassigned | ||
debian-installer-utils (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Precise |
Fix Released
|
Undecided
|
Mathieu Trudel-Lapierre | ||
Trusty |
Fix Released
|
Undecided
|
Mathieu Trudel-Lapierre | ||
Utopic |
Fix Released
|
Undecided
|
Mathieu Trudel-Lapierre | ||
Vivid |
Fix Released
|
Undecided
|
Unassigned | ||
Wily |
Fix Released
|
Undecided
|
Unassigned | ||
maas (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Precise |
Won't Fix
|
Medium
|
Unassigned | ||
Trusty |
Confirmed
|
Medium
|
Unassigned | ||
Utopic |
Won't Fix
|
Medium
|
Unassigned | ||
Vivid |
Confirmed
|
Medium
|
Unassigned | ||
Wily |
Fix Released
|
Medium
|
Unassigned |
Bug Description
=== Begin SRU Information ===
[Description]
In kernel version 3.15, the linux kernel began ignoring command line options that come after a '--' on the kernel command line.
Kernel documentation at https:/
| 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.
This change of behavior collided with Ubuntu installer's usage (both d-i and curtin). The installers would copy arguments after '--' to the installed system.
For example, booting an installer with:
kernelarg1 arg2 arg3=bar -- console=
would result in the installed system having 'console=
The problem is then that if you're booting a kernel > 3.15 for your installer (which is the case for trusty-hwe-u or utopic onward) the 'console=' flag will not be paid attention to in the install environment.
The solution used by d-i was to modify its token to be '---' or '--'.
This solution has been implmented in curtin also.
MAAS has used '--' in the past, but will now need to use '---'. However, maas can't simply use '---' as that would result in un-patched installers not copying the parameters over to the installed system. The install environment would get them, but not the installed environment.
[Impact]
The impact is that when booting an installer with a command line like:
kernelarg1 arg2 arg3=bar -- console=
the output does not go to the console. Other kernel command line parameters are also ignored, console= is just the most immediately obvious.
[Regression Potential]
The fix in curtin and in d-i honor both '--' or '---', so chance of regression is low.
The fix in MAAS is relatively ignorant as it does not make its decision to use '---' or '--' based on what it is installing. The decision would be hard to make as it would require knowing the version of debian-
With the change in place in MAAS, the failure case would show itself as arguments not being copied to the installed system.
[Other Info]
To do this properly, we really need to hold the change in MAAS until all expected installers have the fix.
Since MAAS uses curtin as the default installer in current trunk and 1.8 branches, we've made curtin expose the information of which token to use to MAAS. That does mean that d-i would broken until all SRUs are done.
=== End SRU Information ===
=== Original Bug Report ===
Kernel documentation at https:/
| 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.
In my experience that was never true, and I can reproduce the kernel paying
attention to a command line like:
-- root=LABEL=
and the system booting fine, and with data ton ttyS0 on a 3.13 (trusty) kernel.
The fun begins a 3.16 (utopic/hwe-u) where the kernel documentation quoted above seems to be valid.
Currently maas is takes global command line parameters (as set via 'maas admin set-config name=kernel_opts value="
The end result is that setting console=ttyS0 as kernel parameters does not work with 3.16 in the commissioning and install environment.
Curtin (in following with convention I believe to be true in 'd-i' ) will copy parameters after a '--' to the installed system. So, the installed system works fine, but the install and commissioning is 'blind'.
There are 2 solutions here:
a.) put kernel flags twice (both before and after a '--')
this could in the future make systemd unhappy as those would then turn into flags to systemd.
b.) put kernel flags only before and find another way to pass to curtin or d-i
Joy.
Related branches
- Raphaël Badin (community): Approve
-
Diff: 118 lines (+49/-6)2 files modifiedsrc/provisioningserver/kernel_opts.py (+16/-3)
src/provisioningserver/tests/test_kernel_opts.py (+33/-3)
Changed in debian: | |
status: | Unknown → Fix Released |
description: | updated |
Changed in debian-installer-utils (Ubuntu): | |
status: | New → Fix Released |
Changed in curtin: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in curtin (Ubuntu Precise): | |
status: | New → Won't Fix |
no longer affects: | curtin (Ubuntu Precise) |
Changed in curtin (Ubuntu Utopic): | |
importance: | Undecided → Medium |
status: | New → Won't Fix |
Changed in curtin (Ubuntu Vivid): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in curtin (Ubuntu Wily): | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in curtin (Ubuntu Trusty): | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in curtin: | |
status: | Confirmed → Fix Committed |
Changed in maas (Ubuntu Precise): | |
importance: | Undecided → Medium |
status: | New → Confirmed |
tags: |
added: verification-done removed: removal-candidate verification-needed |
affects: | debian → debian-installer (Debian) |
Changed in maas (Ubuntu Utopic): | |
importance: | Undecided → Medium |
status: | Confirmed → Won't Fix |
Changed in maas (Ubuntu): | |
importance: | Undecided → Medium |
Changed in maas (Ubuntu Wily): | |
importance: | Undecided → Medium |
Changed in maas (Ubuntu Vivid): | |
importance: | Undecided → Medium |
Changed in maas (Ubuntu Trusty): | |
importance: | Undecided → Medium |
no longer affects: | maas/1.7 |
Changed in maas: | |
milestone: | next → none |
Sorry, I hadn't seen this bug so I went ahead and implemented part of the solution in d-i (well, cherry-picking changes really).
So what will happen is rather than using "--" as a separator, we can use "---" (three dashes).
So, on request from Scott; here's a quick breakdown on how the parameters passed on the command line are handled:
This already was understood by the debian- installer- utils source package, which contains a "user-params" script which takes some user parameters (but not debconf preseeds). console= is one of the user parameters taken by user-params.
All the parameters passed on the command-line make it to the installer environment; this is done, AIUI, by the kernel.
From there, the preseed source package has an env2debconf script which will take the environment variables it recognizes (containing a slash or know as aliases to some debconf variable), and ship them to debconf for the installer to use.
From that point, the installer runs. Towards the end of the installation, the grub-installer package will ask user-params for what to add to the kernel command-line when setting up the bootloader (this is also true of yaboot-installer). Other parameters relevant to the installed system go through debconf, and will get applied based on what postinst scripts do -- for instance, console-setup will carry the keymap/model settings on to the installed system's /etc/default/ keyboard.