preseed file interpreted as having nonexistent backslashes

Bug #253734 reported by Nick Moffitt
4
Affects Status Importance Assigned to Milestone
busybox (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: busybox

An automated preseed install of hardy has failed on two separate models of hardware, one after 15 successful memtest passes, because two lines of the preseed file are interpreted as one.

The lines:

 d-i pkgsel/include string openssh-server zsh nagios-nrpe-server nagios-plugins ntp-server snmpd bzr bzrtools postfix vim patch screen procmail dnsutils irqbalance userdir-ldap sl toilet netcat mtr-tiny linux-image-server ncurses-term dselect

and:

 tasksel tasksel/first multiselect

Appear to be joined together when interpreted, giving the error:

 Jul 30 16:23:40 in-target: Note, selecting ntp for regex ‘ntp-server’
 Jul 30 16:23:40 in-target: dnsutils is already the newest version.
 Jul 30 16:23:40 in-target: netcat is already the newest version.
 Jul 30 16:23:40 in-target: mtr-tiny is already the newest version.
 Jul 30 16:23:40 in-target: E:
 Jul 30 16:23:40 in-target: Couldn't find package dselecttasksel

I gave Colin Watson a log of the install with /lib/preseed/preseed.sh run -x, and he suggested that the problem may be a subtle shell bug causing the line ending in dselect to be treated as though there were a backslash at the end. (Or, more specifically, it thinks [ "$line" != "${line%\\\\}" ]) This is a little difficult to prove because of the way syslog treats newlines.

I am in the process of trying again with extra whitespace following "dselect" in the first line.

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

For reference, adding a space to the end of the line caused it to appear in the joined line, which still caused the pkgsel step to try and install tasksel tasksel/first multiselect (and thus fail)

description: updated
Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

Possibly related: When the system exhibits this bug, the VCs get a bit unpredictable. Keystrokes often repeat (although this may just be a side-effect of the VNC KVM I'm using), and occasionally the output from the VC just to the "right" of the current one will overlay on top of the one that receives input.

I've never seen this behavior with this hardware and/or KVM before (separately or in combination) so I thought it might be relevant.

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

As baffling as this is to me, the following change to the config file makes this problem vanish:

The last line of the preseed file is:

 #d-i finish-install/reboot_in_progress note

...and I simply uncommented it.

What tickled this bug in the first place was my prepending a '#' on the front so I could hop into tty2 and ensure that the install was correct to my satisfaction. I've done this any number of times with other preseed files in this network and on others.

Adding the '#' seems to have triggered this bug, because removing it causes the install to succeed and adding it makes the bug manifest again. I thought this was coincidence, but it is consistent and repeatable.

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

Hmm, actually I take back the earlier statement about the whitespace just after "dselect". It seems that *that* run errored out on a DNS lookup of the archive hostname. Not sure yet if that was repeatable, although the VC oddness and the syslog encoding effects (‘ instead of ") did occur.

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

Outright *removing* the finish-install/reboot_in_progress line causes the problem to appear again, even with the space after dselect (Manifests as "Release 'first' for 'tasksel' was not found" in pkgsel).

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

Well I've tried adding comment lines at various points in the file (both before and after the two that get joined) and nothing I do seems to affect it. It's almost as if the actual presence of the reboot_in_progress setting is what fixes this. I even put this setting at the top of the file and it allows the install to complete. Curiouser and curiouser...

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.