[debian-lan-devel] [SCM] Debian-LAN development and packaging branch, master, updated. 0.6-44-gcddc730

Andreas B. Mundt andi at debian.org
Thu Sep 20 12:17:56 UTC 2012


The following commit has been merged in the master branch:
commit 4ae3fda95bc3229ed6b20e91a91df06206217f7c
Author: Andreas B. Mundt <andi at debian.org>
Date:   Wed Sep 19 14:50:52 2012 +0200

    Add Debian installer to the PXE boot options.
    
    This allows to run a standard Debian PXE installation on unknown
    machines.  Useful for personal machines i.e. laptops that are not
    permanently connected to the Debian-LAN network.

diff --git a/fai/config/files/etc/rc.local/FAISERVER b/fai/config/files/etc/rc.local/FAISERVER
index ff0f3a9..39be75a 100755
--- a/fai/config/files/etc/rc.local/FAISERVER
+++ b/fai/config/files/etc/rc.local/FAISERVER
@@ -7,6 +7,10 @@ set -e
 
 ############################
 TIMEOUT=120
+TFTPDIR="/srv/tftp/fai"
+URLIMGi386="http://http.us.debian.org/debian/dists/wheezy/main/installer-i386/current/images/netboot/netboot.tar.gz"
+URLIMGamd64="http://http.us.debian.org/debian/dists/wheezy/main/installer-amd64/current/images/netboot/netboot.tar.gz"
+
 cat <<EOF
 ================================================================================
 The nfsroot for FAI may be created by executing $0.
@@ -51,6 +55,44 @@ if wget --quiet --output-document=/tmp/fai-setup $URL ; then
     ## create default configuration (sysinfo) if not yet in place:
     fai-chboot -p -S default
 
+    ## Add Debian PXE Installer:
+    wget --output-document=$TFTPDIR/netboot_i386.tar.gz $URLIMGi386 && \
+	tar xvf $TFTPDIR/netboot_i386.tar.gz -C $TFTPDIR ./debian-installer/
+    wget --output-document=$TFTPDIR/netboot_amd64.tar.gz $URLIMGamd64 && \
+	tar xvf $TFTPDIR/netboot_amd64.tar.gz -C $TFTPDIR ./debian-installer/
+
+    if [ -d $TFTPDIR/debian-installer/i386 ] ; then
+	## add installer menu
+	cat >> $TFTPDIR/pxelinux.cfg/default <<EOF
+menu label Debian-LAN/FAI live system
+
+menu title Boot menu
+menu background debian-installer/i386/boot-screens/splash.png
+menu color title        * #FFFFFFFF *
+menu color border       * #00000000 #00000000 none
+menu color sel          * #ffffffff #76a1d0ff *
+menu color hotsel       1;7;37;40 #ffffffff #76a1d0ff *
+menu color tabmsg       * #ffffffff #00000000 *
+menu color help         37;40 #ffdddd00 #00000000 none
+menu vshift 16
+menu rows 7
+menu helpmsgrow 12
+menu cmdlinerow 12
+menu tabmsgrow 13
+default debian-installer/i386/boot-screens/vesamenu.c32
+timeout 150
+ontimeout fai-generated
+prompt 0
+noescape 1
+
+label Debian Installer i386
+        config debian-installer/i386/pxelinux.cfg/default
+
+label Debian Installer amd64
+        config debian-installer/amd64/pxelinux.cfg/default
+EOF
+    fi
+
     ## Use git to track modifications of the config space:
     cd $FAI_CONFIGDIR
     HOME="/root"
diff --git a/fai/config/scripts/DISKLESS_CLIENT/20-server b/fai/config/scripts/DISKLESS_CLIENT/20-server
index ef2131e..cfc58bb 100755
--- a/fai/config/scripts/DISKLESS_CLIENT/20-server
+++ b/fai/config/scripts/DISKLESS_CLIENT/20-server
@@ -5,8 +5,10 @@
 
 set -e
 
+TFTPDIR="/srv/tftp/fai"
+
 if [ $FAI_ACTION == "dirinstall" ] ; then
-    TEMPLATE=/srv/tftp/fai/pxelinux.cfg/diskless.tmpl
+    TEMPLATE=$TFTPDIR/pxelinux.cfg/diskless.tmpl
 
     if [ ! -e $TEMPLATE ]; then
 	KERNEL=`basename $(ls /srv/tftp/fai/vmlinuz*)`
@@ -26,4 +28,36 @@ EOF
 	echo "The template $TEMPLATE exists already!"
     fi
     fai-chboot -vc diskless default
+
+    if [ -d $TFTPDIR/debian-installer/i386 ] ; then
+	## add installer menu
+	cat >> $TFTPDIR/pxelinux.cfg/default <<EOF
+menu label Debian-LAN/FAI live system
+
+menu title Boot menu
+menu background debian-installer/i386/boot-screens/splash.png
+menu color title        * #FFFFFFFF *
+menu color border       * #00000000 #00000000 none
+menu color sel          * #ffffffff #76a1d0ff *
+menu color hotsel       1;7;37;40 #ffffffff #76a1d0ff *
+menu color tabmsg       * #ffffffff #00000000 *
+menu color help         37;40 #ffdddd00 #00000000 none
+menu vshift 16
+menu rows 7
+menu helpmsgrow 12
+menu cmdlinerow 12
+menu tabmsgrow 13
+default debian-installer/i386/boot-screens/vesamenu.c32
+timeout 150
+ontimeout fai-generated
+prompt 0
+noescape 1
+
+label Debian Installer i386
+        config debian-installer/i386/pxelinux.cfg/default
+
+label Debian Installer amd64
+        config debian-installer/amd64/pxelinux.cfg/default
+EOF
+    fi
 fi

-- 
Debian-LAN development and packaging



More information about the debian-lan-devel mailing list