Installer silently ignores preseed directives

Bug #1276064 reported by Matt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kickseed (Ubuntu)
New
Undecided
Unassigned

Bug Description

I'm trying to perform a fully automated installation of Ubuntu server on 100 Dell C8220s, by PXE booting the installer ISO then feeding it a preseed file over http using kernel cmdline params including (among others) url=http://myserver/path/ubuntu.preseed DEBCONF_DEBUG=5

I'm unable to defeat certain prompts; it appears as if the preseed values are simply being ignored. This is a showstopper to Ubuntu deployment at scale; we cannot tolerate any interactivity whatsoever with 100 servers. When (if) this works, it will expand to even more servers.

I've been banging my head against this for some time now, so I can supply a wide variety of preseed files that don't work, but which I think should work. I'll attach the more interesting ones to this report shortly.

1. Ubuntu release: Precise, using ubuntu-12.04.3-alternate-amd64.iso

2. Package version: whichever version of {debian,ubuntu}-installer or kickseed is included with the above ISO.

3. What I expect to happen:

3.1. Preseed directives shall either work, or fail in a debuggable way

Preseed configuration directives generated by debconf-get-selections --installer > file, when this file is edited and fed back into the Ubuntu installation, shall either:
3.1.a. Do what I want them to do; or
3.1.b. Output comprehensible diagnostics on tty4, explaining why they did not work.

For example, if I have the wrong owner name (not eg 'd-i'), the wrong directive name, the wrong type, or a unavailable value, tty4 shall show a diagnostic explaining which of these is the case.

3.2. The selections output by debconf-get-selections --installer shall reflect the choices I made in an interactive installation, to enable me to reproduce a previous manual installation.

4. What actually happens

4.1. In many (but not all) cases, preseed directives neither work, nor output any explanation as to why they did not work that is visible to me. Perhaps I'm looking in the wrong places - is tty4 not the right place?

4.2. debconf-get-selections --installer outputs great loads of stuff, which bears only a vague relation to choices I made during manual install.

For example, the output contains:
# Choices: Algeria, Angola, Benin, Botswana, Burkina Faso, Burundi, Cameroon, Cape Verde, Central African Republic, Chad, Congo, Congo\, The Democratic Republic of the, Djibouti, Egypt, Equatorial Guinea, Eritrea, Ethiopia, Gabon, Gambia, Ghana, Guinea, Guinea-Bissau, Kenya, Lesotho, Liberia, Libya, Malawi, Mali, Mauritania, Morocco, Mozambique, Namibia, Niger, Nigeria, Rwanda, Sao Tome and Principe, Senegal, Sierra Leone, Somalia, South Africa, Sudan, Swaziland, Tanzania\, United Republic of, Togo, Tunisia, Uganda, Western Sahara, Zambia, Zimbabwe
d-i localechooser/countrylist/Africa select

This is pointless; it won't defeat any interactive prompting, as it's missing a value. So there's no point including it in the output. It's just noise.
Also, I already told the installer I'm in Oceania, so I was never prompted for a country in Africa. This directive thus has nothing to do with what I choe in the interactive install.

On the other hand, the output also contains:
partman-lvm partman-lvm/vgcreate_parts multiselect

It appears to have forgotten that I selected /dev/sda1 as the sole LVM PV during the interactive install - the value is missing.
Again, without the value, this directive doesn't do anything useful.

I could accept this type of output if I had said 'debconf-get-selections --installer --all', ie asking for a sort of preseed template containing every possible directive. But I didn't (one can't).

I currently think that rather than using a preseed file, it would be easier to make my own initrd which executes cfdisk/pvcreate/vgcreate/lvcreate/mkfs/mkswap/mount/debootstrap the way I want. That's pretty sad - it's easier to write one's own installer than to figure out how to configure the existing installer.

Revision history for this message
Matt (vbsikhfihe) wrote :

This peseed contains:

partman-auto partman-auto/method string lvm

However, I am still prompted whether I want to use LVM on the sole usable block device (/dev/sda) in the machine, or guided partitioning, or etc.

There's no indication on tty4 (or anywhere else I can see) that this directive is not the correct syntax, or is being ignored for some reason, or otherwise why it hasn't done what I want.

Revision history for this message
Matt (vbsikhfihe) wrote :

Another analogous problem with this preseed: although I attempt to enable root logins, and I attempt to defeat creation of a non-root user, and even though in desperation I have set a full name and username for the non-root user (both 'deleteme'), I am still prompted for a full name and username for the user.
It's like the 'user-setup-udeb passwd/username string deleteme' and 'user-setup-udeb passwd/user-fullname string deleteme' directives don't do anything whatsoever - and again there's no indication why.
I could work around this by enabling root logins and deleting the user in a late command, but I shouldn't have to do that.
In other preseeds (to be attached), these exact same directives *do* defeat creation of a non-root user.
So it's not as simple as these directives always getting ignored. Something other mystery factor controls whether they do anything or not, and the installer's not telling me what that mystery factor is.

Revision history for this message
Matt (vbsikhfihe) wrote :

FWIW I get better results using a RedHat-style Kickstart file, with ks=http://blah, instead of a preseed file.
But analogously, I cannot seem to defeat the prompt about over-writing an existing LVM configuration.
Therefore I theorise this is not a problem with the pressed parser and kickstart parser separately, but is instead a problem with the honouring of the parsed directives, after the parse step is done and the difference between preseed and kickstart is irrelevant.

Revision history for this message
Matt (vbsikhfihe) wrote :

Hey Colin, this is driving me absolutely crazy, and is blocking a large-scale deployment of Ubuntu.
I know you know this stuff well; this is probably a no-brainer for you. Please help!
Even if it's not a no-brainer, I'm happy to debug it with you and enhance d-i/kickseed (because it's a showstopper for us).

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.