summaryrefslogtreecommitdiffstats
path: root/initramfs
diff options
context:
space:
mode:
authorDirk von Suchodoletz2008-02-28 01:30:52 +0100
committerDirk von Suchodoletz2008-02-28 01:30:52 +0100
commit452c337f95981496e38c975108a484abf1c685e8 (patch)
treeeabd337a79cba35e2df1f71a2d5385aeddd2fc5f /initramfs
parentSome changes to cdboot init. The next busybox should contain the (diff)
downloadcore-452c337f95981496e38c975108a484abf1c685e8.tar.gz
core-452c337f95981496e38c975108a484abf1c685e8.tar.xz
core-452c337f95981496e38c975108a484abf1c685e8.zip
Improved CD preboot init file ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1583 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rwxr-xr-xinitramfs/cdboot/init12
-rwxr-xr-xinitramfs/initrd-stuff/init2
2 files changed, 11 insertions, 3 deletions
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'