PXE Deployment

Help with issues regarding installation of Debian

PXE Deployment

Postby Lonemorf » 2010-09-03 19:45

Hi all,
A friend of mine has been working on a Linux deployment/reload system using PXE and Kickstart files.
It works peachy with all flavours of Linux, but we hit a stumbling block with Debian.

Below is the Kickstart file:
Code: Select all
// Debian 5 Definition
class debian5 extends KickStart {
                public $name = 'Debian 5.05 (Lenny)';
                public $platform = array('i386','x64');
                public $ks = "# !!IPADDR!!
d-i debian-installer/locale string en_UK
d-i console-keymaps-at/keymap select uk
d-i netcfg/choose_interface select auto
d-i debian-installer/locale string en_UK
d-i console-keymaps-at/keymap select uk
d-i netcfg/get_hostname string !!HOSTNAME!!
d-i netcfg/choose_interface select auto
d-i netcfg/disable_dhcp boolean true
d-i netcfg/get_nameservers string !!NAMESERVER!!
d-i netcfg/get_domain string ******.com
d-i netcfg/wireless_wep string
d-i hw-detect/load_firmware boolean true
d-i mirror/country string enter information manually
d-i mirror/http/hostname string ftp.uk.debian.org
d-i mirror/http/directory string /debian
d-i mirror/http/proxy string
d-i mirror/suite string lenny
d-i clock-setup/utc boolean true
d-i time/zone string Europe/London
d-i clock-setup/ntp boolean true
d-i base-installer/kernel/linux/initramfs-generators string yaird
tasksel tasksel/first multiselect standard, web-server
d-i pkgsel/include string openssh-server build-essential
d-i passwd/make-user boolean false
d-i passwd/root-password password toor
d-i passwd/root-password-again password toor
popularity-contest popularity-contest/participate boolean false
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
d-i finish-install/reboot_in_progress note
wget http://*********.com/pxe-delete.php?hostname=!!HOSTNAME!!
echo 'auto lo' > /etc/network/interfaces
echo 'iface lo inet loopback' >> /etc/network/interfaces
echo 'auto eth0' >> /etc/network/interfaces
echo 'iface eth0 inet static' >> /etc/network/interfaces
echo 'address !!IPADDR!!' >> /etc/network/interfaces
echo 'netmask !!NETMASK!!' >> /etc/network/interfaces
echo 'gateway !!GATEWAY!!' >> /etc/network/interfaces
echo '!!HOSTNAME!!' > /etc/hostname";
                public $noraid = 'd-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-auto/choose_recipe select atomic
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true';
                public $swraid = 'd-i partman-auto/method string raid
d-i partman-auto/disk string /dev/sda /dev/sdb
d-i partman-auto/expert_recipe string \
      multiraid :: \
              1000 1000 1000000000 raid \
                      $bootable{ } $primary{ } method{ raid } \
              512 1000 200% raid \
                      method{ raid }\
d-i partman-auto-raid/recipe string \
    1 2 0 ext3 / \
          /dev/sda1#/dev/sdb1 \
    . \
    1 2 0 swap - \
          /dev/sda5#/dev/sdb5 \
d-i partman-md/confirm boolean true
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true';
                public $bootfile = "default menu.c32
prompt 0
timeout 1
KERNEL images/debian/!!PLATFORM!!/5.05/linux
append vga=normal initrd=images/debian/!!PLATFORM!!/5.05/initrd.gz auto interface eth0 preseed/url=http://pxe.ukdss.eu/!!KS!! debian-installer/locale=en_GB console-setup/layoutcode=gb debconf/priority=critical";

Now, on other flavours of *nix, this line:
wget http://*********.com/pxe-delete.php?hos ... !HOSTNAME!!
Would get and run the php file, and delete the kickstart file, and notify me that the reload/install was running. On debian we are getting a red screen error, asying it could not parse this and the configuration file was incorrect.

Guessing that this was syntax, we tried this:
echo'wget http://*********.com/pxe-delete.php?hos ... OSTNAME!!' > /debian.sh
sh /debian.sh

Still no joy. My guess is that the ? is screwing it all up, but am open to suggestions :)

Thoughts anyone?

Cheers in advance.
Posts: 2
Joined: 2010-09-03 19:34

Re: PXE Deployment

Postby peter_irich » 2010-09-04 06:15

I did not made the automatic installation, perhaps, this will be useful.

Posts: 911
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russia

Re: PXE Deployment

Postby Lonemorf » 2010-09-04 09:34

That all works already, but I need to know how to parse the line in question.
Posts: 2
Joined: 2010-09-03 19:34

Return to Installation

Who is online

Users browsing this forum: wizard10000 and 10 guests