]> hackdaworld.org Git - hdw-linux/hdw-linux.git/commitdiff
CHANGELOG 2004-12-06
authorhackbard <hackbard>
Sun, 5 Dec 2004 23:59:22 +0000 (23:59 +0000)
committerhackbard <hackbard>
Sun, 5 Dec 2004 23:59:22 +0000 (23:59 +0000)
doc/CHANGELOG
doc/FAI
misc/hdw-tools/hdw-get
packages/ia32/syslinux/syslinux
packages/net/tftp-hpa/tftp-hpa
scripts/Create-FAI

index 61c73dd3233fd083f11810bcbd95902c770a177f..f461cc85c9d9927f92048b7983025056a2713408 100644 (file)
@@ -1,3 +1,9 @@
+*) 2004-12-6
+
+- further work on fai
+- updated tftp-hpa and syslinux package
+- added exit statement to hdw-get file
+
 *) 2004-10-31
 
 - some lines adding general mips support
diff --git a/doc/FAI b/doc/FAI
index 2cbfa0065b3190ca9c6d2005b41e3995d6195ad4..180ae6e80a46dd262f38c447abc3780f0f953d71 100644 (file)
--- a/doc/FAI
+++ b/doc/FAI
@@ -16,7 +16,6 @@ procedure
 ---------
 
        1) install mnimal nfsroot binaries
-          (as described in INSTALL chapter 2.)
 
                vi Config [enter default as a target, specify arch*]
 
@@ -25,17 +24,9 @@ procedure
              the install process. fai-server is actually the target you will
              need as a running system to have pxeboot/nfsutils and stuff.
 
-               ./scripts/Helper -create_dist_files
-               ./misc/hdw-tools/hdw-get dist-install /mnt/fai-root \
-                       ./distro/default
+               ./scripts/Create-FAI
 
-       2) prepare nfsroot & mount ./fai dir via loopback for configurations
-
-               ./scripts/Create-FAI /mnt/fai-root
-
-       4) adapt configs in ./fai (see chapter "fai config files")
-
-       3) edit the following files to match your needs, and restart services
+       2) edit the following files to match your needs, and restart services
 
                /etc/dhcpd.conf
                /etc/inetd.conf
@@ -44,6 +35,8 @@ procedure
 
                (have a look at chapter "fai server configuration")
 
+       3) adapt configs in ./fai (see chapter "fai config files")
+
        4) pxeboot your install candidates and watch installation
 
 
index 0aa2a3b10b3c5dba9a396aca187c609f5554b985..10be612b2887ae695b430b4eafb4948305e5f3c1 100644 (file)
@@ -170,6 +170,7 @@ elif [ "$install" = "1" ] ; then
                retval=$?
                if [ "$retval" != "0" ] ; then
                        echo "package not found at $net_addr, aborting ..."
+                       exit
                else
                        echo "extracting $package to $inst_root ..."    
                        tar --use-compress-program=bzip2 \
index 297c61cbacb01bda0fe090a1f2d032c386a6432c..fce7ebcc4976960ea3ee4dc3f6e5f2a3ce9eae6b 100644 (file)
@@ -2,9 +2,9 @@
 #
 # author: hackbard@hackdaworld.dyndns.org
 #
-# [V] 2.10
+# [V] 2.11
 # [S] 3-6
-# [D] syslinux-2.10.tar.bz2 http://kernel.org/pub/linux/utils/boot/syslinux/
+# [D] syslinux-2.11.tar.bz2 http://kernel.org/pub/linux/utils/boot/syslinux/
 
 post_install() {
        rm -rf $docdir
index e29796ed667b069f5f568a57fcc82e5f7d1d7256..46f0ad2f6888ab7f98ee796f13ce2da9bb541b6d 100644 (file)
@@ -3,5 +3,5 @@
 # author: hackbard
 
 # [S] 3-2
-# [V] 0.36
-# [D] tftp-hpa-0.36.tar.bz2 ftp://www.kernel.org/pub/software/network/tftp/
+# [V] 0.40
+# [D] tftp-hpa-0.40.tar.bz2 ftp://www.kernel.org/pub/software/network/tftp/
index cc3e6e6b71c5d64181d8fd1203600bf6c556a126..1b3366e816153405ef1b65514fc11784d09c3944 100755 (executable)
 #
 
 fairoot="$1"
+myip="`ifconfig eth0 | grep inet\ addr | awk '{ print $3 }' | awk -F: '{ print $2 }'`"
+home_dir=$PWD
 
 usage()        {
        echo
        echo "usage:"
-       echo "$1 <fai-root>"
+       echo "$0 <fai-root>"
        echo
        exit
        }
 
-if [ ! -d $fairoot -o ] ; then
-       usage
+[ "$#" != "1" ] && usage
+[ ! -d $fairoot ] && usage
+
+echo "reading config ..."
+if [ ! -f ./Config ] ; then
+       echo "config file not found, aborting"
+       exit
+fi
+. ./Config
+
+if [ ! -d ./fai ] ; then
+       echo "creating fai directory"
+       mkdir ./fai
+fi
+
+if [ ! -f ./fai/nfsroot-packages ] ; then
+       echo "storing $hdw_target as original target"
+       hdw_orig_target=$hdw_target
+
+       echo "pretending default target for nfsroot install now"
+       export hdw_target=default
+
+       ./scripts/Helper -create_dist_files
+
+       export hdw_target=$hdw_orig_target
+       echo "orig target restored to $hdw_target"
+
+       cp ./distro/default ./fai/nfsroot-packages
+fi
+
+echo "deleting some packages from list now"
+del="linux-libc-headers man-pages binutils gcc m4 autoconf automake"
+del="$del man make patch bin86 nasm lilo cvs"
+del="$del bootdisk" # just by now - may contain kernel image later
+for package in $del; do
+       grep -v ^$package ./fai/nfsroot-packages > ./fai/tmp~
+       mv ./fai/tmp~ ./fai/nfsroot-packages
+done
+
+if [ ! -f $fairoot/packages_installed ] ; then
+       echo "creating nfsroot..."
+       chmod 755 ./misc/hdw-tools/hdw-get
+       ./misc/hdw-tools/hdw-get dist-install $fairoot ./fai/nfsroot-packages
+       touch $fairoot/packages_installed
+       echo "done"
+else
+       echo "nfsroot seems to be available already"
+       echo "(del $fairoot/packages_installed to recreate it)"
 fi
 
-echo "preparing 
+
+echo "preparing nfsroot for automated install routine ..."
+
+cd $fairoot
+
+mknod -m 0666 dev/null c 1 3
+mknod -m 0600 dev/console c 5 1
+
+grep -v swap etc/fstab > tmp~
+mv tmp~ etc/fstab
+
+for i in sysklogd network inetd nscd; do
+       rm -f etc/init.d/rc2.d/*${i}
+done
+
+cd $home_dir
+
+echo "done"
+
+echo "checking pxe/nfs environment ..."
+mkdir -p /tftpboot
+cp $fairoot/boot/vmlinuz_hdw /tftpboot
+if [ ! -f /tftpboot/pxelinux.0 ] ; then
+       if [ ! -f /usr/lib/syslinux/pxelinux.0 ] ; then
+               echo "pxelinux (syslinux) not found, fix this manually now :p"
+       fi
+       cp /usr/lib/syslinux/pxelinux.0 /tftpboot
+fi
+mkdir -p /tftpboot/pxelinux.cfg
+echo -e "LABEL fai" > /tftpboot/pxelinux.cfg/fai
+echo -e "\tKERNEL vmlinuz_hdw" >> /tftpboot/pxelinux.cfg/fai
+echo -e "\tAPPEND root=/dev/nfs nfsroot=$myip:$fairoot \\" >> \
+       /tftpboot/pxelinux.cfg/fai
+echo -e "\tip=dhcp" >> /tftpboot/pxelinux.cfg/fai
+echo -e "\tPROMPT 1" >> /tftpboot/pxelinux.cfg/fai
+echo -e "$fairoot\tfoobar(async,ro,no_root_squash)" >> /etc/exports
+
+echo "mounting configuration dir to nfsroot export ..."
+mkdir -p $fairoot/fai-config
+mount --bind $PWD/fai $fairoot/fai-config
+
+echo "everything should work now. now do the following:"
+echo "1) edit /etc/exports to allow your clients to mount the nfsroot"
+echo "2) link the ipaddr in hex of the client to fai in pxe config dir"
+echo "3) tell your dhcpd (see syslinux docs for more help)"
+echo "4) make sure inetd/nfs/dhcpd are up running"
+echo "5) do the configuration stuff (see doc/FAI)"
+echo
+echo "note: tftp must support tsize option (use e.g. tftp-hpa package)
+echo
+
+echo "done"