Ubuntu/Debian Installer: Overriding preseed values using boot kernel parameters

When using a pressed file there’s a vicious circle if you also want to pass boot parameters: Because you pass the preseed path using boot parameters (e.g. url=http://path/to/preseed.cfg) the installer has to interpret the boot parameters first and can then read/use those vales found in the loaded preseed file.

That’s bad if you wan’t to override values already defined the pressed file (e.g. user, password, hostname, packages and so on). Values from the boot parameters are set first then they from the preseed file so all values defined as  boot parameters are overridden from the values found in the preseed file.

There a bug report that has a similar background: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=805291

So I did some investigations on how the installer works and found that it calls a script named “env2debconf” for parsing the boot parameter values.

So I did an easy workaround: In my preseed file I added the line

d-i preseed/early_command string env2debconf

So the installer will still will:

  • parse the boot parameters (using env2debconf)
  • downloading the preseed file and set all values found there

an for now:

  • calling the early_command (env2debconf). So all values passed as boot parameters are set again (no matter if they have been overridden by pressed or not).

 

As long as the debian/ubuntu installers keep processing  values using env2debconf this solution will work.

Advertisements
This entry was posted in Linux, WiFi/Netboot and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s