preseed/early_command doesn't work from kernel command line

Bug #1845239 reported by Andrew Kanaber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
base-installer (Ubuntu)
New
Undecided
Unassigned

Bug Description

Using the Ubuntu netboot installer as obtained from http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/ the installer fails to run a preseed/early_command set from the kernel command line (added to the menu entry in grub.cfg).

A precisely equivalent config does cause the command to run in Debian 10 and 9, so this appears to be a difference between Debian's version of debian-installer and the one in Ubuntu. The preseeded command can be made to work in Ubuntu if instead placed in a preseed.cfg inserted into the initrd, so the issue appears to be specific to setting preseed/early_command from the kernel commandline.

For example, setting only the following grub config options: (this is on a Xen system)

    set root=(xen/xvdd,msdos1)
    linux /installer-ubuntu/18.04/linux "preseed/early_command=logger wibble"
    initrd /installer-ubuntu/18.04/initrd.gz

and the interrupting the install, starting a shell and running 'grep wibble /var/log/syslog' shows only the kernel commandline, whereas on Debian 10 with the following grub config

    set root=(xen/xvdd,msdos1)
    linux /installer-debian/10/vmlinuz "preseed/early_command=logger wibble"
    initrd /installer-debian/10/initrd.gz

and again interrupting the install and running 'grep wibble /var/log/syslog' from the shell produces:
Sep 24 17:09:57 kernel: [ 0.000000] Command line: "preseed/early_command=logger wibble"
Sep 24 17:09:57 kernel: [ 0.412794] Kernel command line: "preseed/early_command=logger wibble"
Sep 24 17:09:57 preseed: running preseed command preseed/early_command: logger wibble
Sep 24 17:09:57 root: wibble

adding DEBCONF_DEBUG=5 to the kernel command line on Ubuntu and running
'egrep early_command\|wibble /var/log/syslog' produces:
Sep 24 17:19:13 kernel: [ 0.000000] Command line: "preseed/early_command=logger wibble" DEBCONF_DEBUG=5
Sep 24 17:19:13 kernel: [ 0.000000] Kernel command line: "preseed/early_command=logger wibble" DEBCONF_DEBUG=5
Sep 24 17:19:14 frontend: --> GET preseed/early_command
Sep 24 17:19:14 frontend: --> SET preseed/early_command logger wibble
Sep 24 17:19:14 frontend: --> METAGET preseed/early_command type
Sep 24 17:19:14 frontend: --> FSET preseed/early_command seen true

So the preseed value does get picked up by debconf, it's just that the installer never actually runs the command.

Thanks for your help,

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.