0

I've been using Debian preseed files for a while now doing netinstalls of Debian and Ubuntu.

Ubuntu 20.04 has a weird video problem even on the text terminal. After install, sometimes you can't see anything. The host is working over the network properly but nothing on vga output.

Adding nomodeset to the kernel commmandline list fixes it.

I'd like to just add nomodeset to the kernel args that the system is installed with but I'm having a heck of a time finding the preseed option for specifying additional kernel arguments / kernel commandline.

I tried merely adding nomodeset during the launch of the installer but that didn't appear to take hold on the installed environment eiher.

What is the proper way in a Debian Installer preseed file, to specify additional kernel arguments that should be applied to the installed system?

  • The new autoinstall changes much, but the old debian installer just copied all kernel cmdline parameters appearing after a double dash to the system being installed (the assumption being, every manual workaround necessary for the installer to run also being necessary for the installed system) – anx Mar 02 '21 at 14:36
  • Ubuntu has _always_ had weird video problems, all the way back to Warty Warthog. As far as I can tell Canonical doesn't care to fix them because people can just nomodeset and pretend the problem doesn't exist. – Michael Hampton Mar 02 '21 at 19:29
  • @anx it has to be after a double dash huh? The way I build my pxe boots scripts assume something else would be at the end of the args list, the preseed URL, but I guess I could change that. I thought it would copy every kernel ARG from the installer but then again I guess it makes sense it shouldn't do that cuz you don't want to boot everyday with a preseed URL in your grub config – Billy left SE for Codidact Mar 03 '21 at 16:02
  • @michael hampton well nomodeset is exactly what I want to do. I just can't be doing it by hand manually every time I install a machine – Billy left SE for Codidact Mar 03 '21 at 16:03
  • Exactly, that's why it's so frustrating that Canonical won't fix it. – Michael Hampton Mar 03 '21 at 16:30

1 Answers1

0

Not every kernel parameter is carried over from how you launch your installer, but you can specify this in your argument list.

From the documentation for installing Ubuntu 20.04 (arch-specific, I am linking to amd64), chapter "Boot Parameters":

Be sure to specify this option after “---”, so that it is copied into the bootloader configuration for the installed system (if supported by the installer for the bootloader).

That triple dash is the key to telling the installer that the kernel command line parameters following it are not just meant to work around issues during installation, but should also be persisted in bootloader configuration - such as /etc/default/grub.

This was historically just two dashes, and is - for the most common bootloader grub - respected both by the newer curtin ("autoinstall", see commands/install_grub.py) and the traditional d-i ("preseed", I have no clue where this is implemented, but I have used it).

In any case, please keep in mind what Linux upstream says about forcing text mode: "Unless you actually understand what nomodeset does, you should reboot without enabling it" and try to raise the issue with the distribution (or if its not just Ubuntu) or kernel maintainers instead of just hoping that nomodeset will make the problem go away long enough.

Strictly speaking, the proper way is probably preseeding the grub2/linux_cmdline string, but that hasnt worked for me while the carry-over-from-installer-cmdline trick worked, so for now, the latter is my answer.

anx
  • 6,875
  • 4
  • 22
  • 45
  • Where did you find reference to grub2/linux_cmdline ? I have a heck of a time finding documentation for debian's installer's preseed functionality. I'd like to be able to read through a definitive list of all the knobs I can tweak with a preseed. – Billy left SE for Codidact Mar 04 '21 at 00:17
  • Dumped a finished installation via `debconf-get-selections`, searched the line containing my kernel cmdline tweaks (and confirmed from `/var/lib/dpkg/info/grub-efi-amd64.postinst` that this is indeed supposed to be kept in sync with `/etc/default/grub`) – anx Mar 04 '21 at 00:52