From 452c337f95981496e38c975108a484abf1c685e8 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Thu, 28 Feb 2008 00:30:52 +0000 Subject: Improved CD preboot init file ... git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1583 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/cdboot/init | 12 ++++++++++-- initramfs/initrd-stuff/init | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'initramfs') diff --git a/initramfs/cdboot/init b/initramfs/cdboot/init index 40368351..338a171e 100755 --- a/initramfs/cdboot/init +++ b/initramfs/cdboot/init @@ -39,6 +39,7 @@ echo $n devdir="/dev" mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir} NWMODULES="forcedeth e1000 e100 tg3 3c59x via-rhine r8169 pcnet32 b44 8139too" +DEBUGLEVEL=0 # create basic device files an directories in dev (for most hardware related # devices mdev should handle that) @@ -99,7 +100,9 @@ for opts in ${KCMDLINE} ; do case ${opts} in debug) DEBUGLEVEL=1;; - # ... or a specified debug level + # ... or a specified debug level (will be passed to next stage) + debug=*) + DEBUGLEVEL=${opts#debug=};; esac done # at this point a timer should be started to ensure an automated reboot @@ -154,13 +157,18 @@ ip route add default via $router # user choose what kind of SLX client he wants to get # get kernel and initramfs, if something fails start debug shell +echo "Fetching selected kernel and initial ramfs from the net ..." ( wget -q -c -O /tmp/kernel \ ftp://openslx:OpenS1X@archive.ruf.uni-freiburg.de/kernel 2>/dev/null && \ wget -q -c -O /tmp/iramfs \ ftp://openslx:OpenS1X@archive.ruf.uni-freiburg.de/iramfs 2>/dev/null ) || \ /bin/ash +# start a debug shell +[ "${DEBUGLEVEL}" -gt 0 ] && /bin/ash + # start the new kernel with initialramfs and cmdline +echo "Booting OpenSLX client ..." kexec -l /tmp/kernel --initrd=/tmp/iramfs --append="ip=$ip:$siaddr:$router:$subnet\ - file=http://132.230.4.4/default.tgz debug=3" + file=ftp://132.230.4.4/default.tgz debug=${DEBUGLEVEL}" kexec -e diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index fb44688f..f47092cc 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -405,7 +405,7 @@ sed "s,@@@serverip@@@,$serverip," -i /etc/machine-setup [ $DEBUGLEVEL -eq 20 ] && echo "** finished ip config at $(sysup)" # ... or ldap if available (in background) [ -n "$ldap" ] && ldapconf & -# ... or via tftp file get (in background) +# ... or via (t)ftp/http file get (in background) [ -n "$file" ] && fileget & runinithook '15-have-ip-config' -- cgit v1.2.3-55-g7522