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

Re: Setting up to do repetitive installs on ONE machine (cf BabelBox)

Richard Owlett wrote:
> I will, initially, be doing only manual installs using preseeding to
> avoid entering fixed data - keyboard, time zone, user name/password,
> no networking etc.

I see that you are using preseeding.  That is good because it sets you
up to do automated installations very easily.

> Can I simply copy all 8 DVD's to the root of my supervising Debian
> install?
> After an install will I be able to do apt-get to access the DVD
> content now residing on the hard drive?
> Am I missing something?

Normally you would also need to do more than simply copy the disks.
At the least you would need to set up the sources.list file to point
to those locations.

What I do is maintain a full mirror of everything I want to install.
I only mirror Stable which doesn't change very often.  (But the same
thing applies to Unstable too.)  I use 'debmirror' to maintain the
Stable mirror.  In any case with all packages locally available it
speeds things up considerably for doing repeated installations.  It is
actually kinder to the upstream file servers because I have many
machines and am often doing many installations in rapid succession.

In other words...  I recommend setting up a local network mirror
instead of trying to use your 8 DVD images.  I think a local network
mirror is easier.

But if you can figure a way to use the DVDs then that is great too.
But simply copying them to the root isn't enough.  You would
definitely need to do more to make them available for the

> Are there other routes to my goals I should investigate?

Since you have all of the packages on disk I would probably use them
to seed a local network mirror.  But I would maintain the mirror using
a tool like 'debmirror' or 'reprepro'.  Then I would point to it
during the installation.

Additionally I would set up a network PXE boot.  Then you can boot a
system without physical media.  Simply PXE boot from the network and
do the installation that way.  This makes it very easy to modify the
network configuration in the PXE boot area.

Without going into all of the detail needed this is a snippet from my
pxe boot menu for doing an install.

label squeezeamd64
        menu label Install 64-bit amd64 "Squeeze"
        kernel debian-installer/amd64/linux
        append vga=788 initrd=debian-installer/amd64/initrd.gz console-keymaps-at/keymap=us locale=en_US interface=eth0 hostname=localhost domain=localdomain auto url=http://mylocalwebserver/debian/preseed-all-boot-root-swap.cfg --

I have a long list of customized installation preseed scripts.
Included in there is this setting:

  d-i preseed/late_command string wget -O/target/var/tmp/bootstrap http://mylocalwebserver/bootstrap/bootstrap; in-target sh /var/tmp/bootstrap

At that point I think you can see how you can have an automated
installation and run a script at the end to finish things off with
your local customizations.  Everything automated.

Also I have this in my local dhcp server so that a default preseed
file is always used.  It sets things I want to my local mirrors.

  if substring(option vendor-class-identifier, 0, 9) = "PXEClient" or
     substring(option vendor-class-identifier, 0, 9) = "Etherboot" {
    filename "/pxeboot/pxelinux.0";
  if substring (option vendor-class-identifier, 0, 3) = "d-i" {
    filename "http://despair.proulx.com/debian/preseed.cfg";;

Also I use this with libvirt and kvm.

  env -i HOME=$HOME PATH=$PATH \
    virt-install \
    --name "$name" \
    --ram "$ram" \
    --vcpus "$cpus" \
    --hvm \
    --nographics \
    --disk path=/var/lib/libvirt/images/"$name".img,size="$size" \
    --os-type linux \
    --os-variant debiansqueeze \
    --network bridge:br0 \
    --location http://mylocalwebserver/ftp.us.debian.org/debian/dists/squeeze/main/installer-amd64/ \
    --extra-args "console=ttyS,9600n8 initrd=debian-installer/i386/initrd.gz console-keymaps-at/keymap=us locale=en_US interface=eth0 hostname=localhost domain=localdomain"

At that point I think you have all of the pieces in very terse form
showing how you can automate everything and be completely
self-contained without going out to the network for anything.  When
everything is local it is very fast.


Attachment: signature.asc
Description: Digital signature

Reply to: