[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

automatic preseed installs from official d-i media



Hi Folks,

I've been playing with d-i recently with the intent of making it possible
to create official CDs and other boot images that can trivially be used to
do automated installs.

I'm now looking for feedback to see what still needs to be sorted out
before we could include this in d-i by default.

The system currently relies on a trivial package called dashslashdash.udeb
that needs to be included in the initrd.  It's called that because you kick
off an auto install by specifying a command line parameter with a list of
classes that you want to define the type of install, the parameter being "-/-".

If you don't specify and -/ variables, the media work exactly as normal
sarge install media would.  I've been doing all this based on the sarge
release of d-i to try to avoid relying on anything that has been introduced
since.

So, to install a Xen domain 0 machine, with a uk keyboard, and using the UK
mirror, you'd do:

  boot:  linux25 -/-=xen0;uk

So, the first question is, what do people think of the choice of -/- as the
variable?  I chose it to be as short as possible while having a slash in it
to get it included as a preseed value, but I'm open to suggestions for
better choices of variable names.

The next thing is that at present it bootstraps itself from a default
location of http://hands.com/d-i unless you override that with a
-/url=http://wherever/ option -- obviously if this gets onto official media
we need the repository of recipes to be on a debian.org named host.  Any
suggestions for where?

The details of the dashslashdash.udeb are that it contains two files, one
is dashslashdash.cfg, which is put on the root of the initrd.  You can find
a commented version of the file here:

  http://hands.com/d-i/dashslashdash.cfg

although the one in the package has the comments removed.

The other is /lib/debian-installer-startup.d/S35dashslashdash which checks
for the presence of the /dashslashdash.cfg file and either a -/- or a -/url
debconf value, and if they exist, uses the file as a preseed location, and
edits /var/lib/dpkg/status so that the keyboard & country prompts get their
 installer-menu-item set to 22, which means that they happen after the
network comes up, and you therefore get to preseed them.

The package is here:  http://hands.com/d-i/udebs/

As you can see, there's also another udeb "bootstrapwrap" -- this can be
installed in the preseed/early-command and allows /base_exclude &
/base_include files to be used to modify the behaviour of debootstrap later on.

Another couple of ideas that I've not quite implemented yet, which would
make this system significantly more useful are:

1) look for a machine called something like d-i-preseed-host.<mydomain> and
use that for getting the rest of the preseed files, if it exists.

2) allow a local machine to provide files which the preseeding system would
prefer if they existed, but will fall back to the default debian host if
the file is not available locally.  Again, this could be given a standard
name, or could be specified with -/localurl=http://myhost/~phil/d-i (say)

Anyway, thoughts?

Also, feel free to have a look at the stuff at http://hands.com/d-i/ and
have a play -- the most interesting recipes so far are probably the xen0
one which does a xen install, then lets you run d-i in zen domain1, and
kde341 which is Luke Leighton's recipe for doing an Xorg and recent KDE
install.

Of course, I rejigged the whole thing recently, so there may be some rough
edges -- bug reports are always welcome :-)

Cheers, Phil.

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: