grub-installer ignores grub2/linux_cmdline_default in preseed

Bug #581796 reported by joschi
112
This bug affects 23 people
Affects Status Importance Assigned to Milestone
grub-installer (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: grub-installer

Description: Ubuntu 10.04
Release: 10.04

When automatically installing a system with a preseed file, grub-installer seems to ignore settings for grub2/linux_cmdline_default.

I have tried the following two lines in my preseed file, but none of them worked:

grub-pc grub2/linux_cmdline_default string
d-i grub2/linux_cmdline_default string

When running `debconf-get-selections` on the newly installed system, the output still contains:

grub-pc grub2/linux_cmdline_default string quiet splash

This seems to be an error (or at least an undocumented nuisance) of grub-installer ignoring the settings in the preseed file.

Colin Watson (cjwatson)
Changed in grub-installer (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Mathieu Mitchell (mat128) wrote :

Note to anyone trying to make this work, we are using these lines in preseed/late_command:
 sed -i 's/\(GRUB_CMDLINE_LINUX_DEFAULT=\).*/\1\"\"/g' /target/etc/default/grub; \
 in-target bash -c 'update-grub'; \

To set GRUB_CMDLINE_LINUX_DEFAULT to "". I read in another bug that the intended behaviour for Ubuntu Server was to not have the splash, only the quiet option. Our systems got installed using both quiet and splash all the time using netinst.

This late_command allows us to have a completely verbose boot process.

Revision history for this message
Mathieu Mitchell (mat128) wrote :

I just noticed LP truncated my line in 2. Make sure both are on individual lines and there is not space next to the backslash.

Revision history for this message
Alan Sparks (alan-l-sparks) wrote :

Still not fixed as of 12.04.

Revision history for this message
Jason Sievert (jsievert) wrote :

Seeing this one as well in 12.10.

Revision history for this message
Rick White (rickatnight11) wrote :

Still not fixed in 13.04.

Revision history for this message
Daniel Dehennin (launchpad-baby-gnu) wrote :

Is there any chance to have a fix on Precise Pangolin?

Revision history for this message
Jeffrey Zhang (jeffrey4l) wrote :

Still no fixed in 14.04

Revision history for this message
Cory Wright (corywright) wrote :

Is there still hope for a fix to this 5 year old bug? I need this for our 14.04 systems.

Revision history for this message
Jeff Goldschrafe (jgoldschrafe) wrote :

Hi. It's 2016 now and this is still a problem in Xenial! Can someone look at this?

Revision history for this message
Remco Lamee (remco1hier) wrote :

I've been trying to fix our preseed installs as well, and I found the preseed entry that works: (tested on xenial beta2)

d-i debian-installer/add-kernel-opts string net.ifnames=0 quiet splash elevator=noop

debconf-get-selections doesn't mention this parameter in the output, but is does work because dmesg confirms that the options are passed to the boot image:

[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-18-generic root=UUID=123 ro net.ifnames=0 elevator=noop quiet splash

Revision history for this message
Martin Bergman (martin-devsed) wrote :

Still no fix in 16.04.2.

Could not use Remco's fix in my preseed either.

Revision history for this message
Andrew Lamarra (amlamarra) wrote :

Still no fix in Ubuntu 16.04.5.

Revision history for this message
Mathieu Mitchell (mat128) wrote :

The documentation for bionic mentions the new option, "debian-installer/add-kernel-opts":
https://help.ubuntu.com/lts/installation-guide/amd64/apbs04.html

Note however that there is a mention of "if supported by the bootloader installer".
Andrew: can you post full preseed file?

There is also a mention of "options passed to the installer will be added automatically", so maybe you can try passing kernel options through the installer kernel options?

Revision history for this message
Daniel Speichert (dasp) wrote :

@mat128 The problem is not with adding parameters (that indeed works) but removing them.
The "quiet splash" is added by default and there's no option to get rid of it easily.

Revision history for this message
Jeremy (nzlamb) wrote :

I can confirm this issue persists in Focal as well. I've run into the issue described at https://askubuntu.com/questions/1229910/ubuntu-20-04-black-screen-after-installing-no-booting on Dell PowerEdge R640 series with Matrox G200 graphics and in UEFI boot mode.

The suggested fix (remove quiet splash boot flags) works, and I've attempted to preseed this using the following line:

grub-pc grub2/linux_cmdline_default string

This works for the first boot after installation, and I can confirm the setting with debconf-get-selections.

Unfortunately /etc/default/grub still contains the quiet splash options, so the next time update-grub is called (e.g. kernel update) the box will fail to come up on boot unless that file is manually edited first.

Ideally the grub-pc grub2/linux_cmdline_default option would ensure that /etc/default/grub is set correctly so there is no unexpected reboot failure after a kernel update.

Revision history for this message
Thiago Martins (tcmcbot) wrote :

I was so annoyed that my "presseded" installations of Ubuntu 20.04 Legacy ISO Server with Packer were ending up with a black screen that only "ALT + Arrow Right" was bringing the `tty1` back to life...

Then, I realized that the "Packer builds were adding" the "quiet splash" to the /etc/default/grub file, no matter what I did to pressed regular options, and this problem brought me to this... 11 years old bug report!!! Whaaaat?!

So, the workaround proposed on comment #1 worked like a charm, and finally, my Packer builds produces awesome server images with a nice verbose boot that goes straight to tty1!

It looks like that won't be fixed since Canonical is moving to the new subiquity, Cloud-Init based `autoinstall`. Kinda sad. I don't like the new "Live Server" install media, legacy is way, way better.

Thank you Mathieu!

Revision history for this message
Thiago Martins (tcmcbot) wrote :

I'm thinking about this.. Maybe, this is by design! Right?

The way it's today, the options used during the Packer builds, for example, don't end up on the image! Sounds like a good idea actually.

Gonna take a look at "debian-installer/add-kernel-opts"!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.