1

I have been using a process for preseeding the initrd in a Debian ISO for some time. I just tried the same process for desktop and server variants of Ubuntu 17.10 ISOs, and everything looks fine until I boot into it and see absolutely no indication that the installer sees the preseed.cfg I placed in its initrd. For example, the installer asks me what language/locale first thing, even though my preseed.cfg has:

d-i debian-installer/locale string en_US.UTF-8
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string us
d-i debian-installer/keymap select us
d-i keymap select us
d-i keyboard-configuration/xkb-keymap select us

I looked through all the F* key options and could not find any option comparable to the Debian Installer's "Automated Install", which decompresses the initrd and looks for/uses the preseed.cfg at its root to answer, potential, all installer questions. The Ubuntu preseeding docs confirm that Ubuntu preseeding is supposed to work the same way, saying that:

…the point at which the preconfiguration file is loaded and processed. For initrd preseeding this is right at the start of the installation, before the first question is even asked.

Does anyone have any helpful hints for what might be going wrong based on the differences between Ubuntu ISOs and Debian ISOs, and the process of preseeding them via initrd?

These pages (here, here, and here) indicate that newer desktop ISOs have been reported to not be preseedable, and that the server ISOs should work "better". So, I downloaded 17.04 (and 17.10) server, repeated my test with that, and got the same behavior.

FTR, the process for embedding the preseed.cfg in the initrd I'm using was taken from the Debian Wiki. Specifically, I'm using the "isofiles" approach, which is to mount the ISO (I'm using udevil), copy the files to local storage, then add preseed file to the initrd.

Like I said, this process works great for Debian ISOs, but does not appear to work at all for any of the desktop or server Ubuntu ISOs I've tried.

The Ubuntu help confirms that my assumption is valid:

If you are using initrd preseeding, you only have to make sure a file named preseed.cfg is included in the root directory of the initrd. The installer will automatically check if this file is present and load it.

The next thing I tried was to compare my preseed.cfg with the official example Ubuntu preseed file to see if there's some problem with d-i and Ubuntu installers using/supporting different preseed directives. I didn't find much difference. To be sure, I installed, verbatim, the the official example Ubuntu preseed file in the initrd of the 17.10 server ISO, and the resulting installer still requires human to answer the questions as if there was no preseed at all.

7
  • OK folks, I have repeated my test with ubuntu-17.10.1-server-amd64.iso, and am getting the same result. I have updated the title and issue description.
    – timblaktu
    Apr 6, 2018 at 18:41
  • Rinzwind, would you please vote to remove this post from "on hold" status, now that it's no longer specific to 17.04? It's been updated to reflect that it is related to 17.10, and also I've deleted my "answers", compiled them into the OP.
    – timblaktu
    Apr 6, 2018 at 21:55
  • Have you looked at askubuntu.com/questions/806820/…
    – Terrance
    Apr 7, 2018 at 1:24
  • Thank Terrance. His approach isn't what I'm looking for, but Niklas posted a link there to his approach which is identical to my Debian preseed initrd one, plus a little extra magic that mine was missing. He patches grub.cfg and isolinux.cfg to add an "unattended install" boot menu default item that explicitly uses the preseed file. I'm eager to try this approach out, communicate with Niklas, and will report back here if this leads to a real answer to my question. github.com/core-process/linux-unattended-installation
    – timblaktu
    Apr 8, 2018 at 2:00
  • 1
    @timblaktu Did you ever figure out how to get this working? I'm trying with 18.04 server and it doesn't seem to want to use my preseed file.
    – mbrig
    Jul 18, 2018 at 16:06

1 Answer 1

1

On server, to get the lang questions answered, you have add auto=true as an option to boot menu.

Here is an example of a pxe menu using auto=true (grub menu should be similar):

label install
    menu default
    menu label ^Preseed Install
    kernel ubuntu-installer/amd64/linux
    append auto=true vga=normal initrd=ubuntu-installer/amd64/initrd.gz 

Taken from https://wiki.debian.org/DebianInstaller/Preseed#Loading_the_preseeding_file_from_a_webserver:

The "auto" command launches the installation in the automated mode, where the configuration of hostname, locale and keymap are postponed so that they can be answered from the preseed file loaded from the network. You could use "install url=..." but you'd have to answer these questions manually, regardless of what you have in the preseed config. If a server path isn't specified the path 'd-i//preseed.cfg' will be tried, for example d-i/stretch/preseed.cfg. Note that network configuration options (netcfg/*) cannot be applied via a network-loaded preseed.cfg file, as the network must be configured before the preseed file can be fetched. If network configuration options must be declared, needed options have be passed as kernel options (eg netcfg/choose_interface=eth0).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .