summaryrefslogtreecommitdiffstats
path: root/boot-env/preboot
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-05-23 20:59:35 +0200
committerDirk von Suchodoletz2009-05-23 20:59:35 +0200
commit3da5200d713ce060ce981e98813a4bc5be71b342 (patch)
treef5635a06b538a0d3a72223a2086a330c23053617 /boot-env/preboot
parentMoved clear to a place where it makes sense (libraries present) and removed (diff)
downloadcore-3da5200d713ce060ce981e98813a4bc5be71b342.tar.gz
core-3da5200d713ce060ce981e98813a4bc5be71b342.tar.xz
core-3da5200d713ce060ce981e98813a4bc5be71b342.zip
Some enhancements for PreBoot ...
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2879 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'boot-env/preboot')
-rw-r--r--boot-env/preboot/cd/iso/LICENSE3
-rwxr-xr-xboot-env/preboot/preboot.sh20
-rwxr-xr-xboot-env/preboot/uclib-rootfs/init24
3 files changed, 28 insertions, 19 deletions
diff --git a/boot-env/preboot/cd/iso/LICENSE b/boot-env/preboot/cd/iso/LICENSE
index 0dd34fa8..ad3c3c57 100644
--- a/boot-env/preboot/cd/iso/LICENSE
+++ b/boot-env/preboot/cd/iso/LICENSE
@@ -1,2 +1,3 @@
This package is free software distributed under the GPL version 2.
-See http://openslx.org/COPYING
+See http://openslx.org/COPYING. For additional information on the
+SYSLINUX component by H.P. Anwin check http://syslinux.zytor.com!
diff --git a/boot-env/preboot/preboot.sh b/boot-env/preboot/preboot.sh
index 795522c8..7b5c2be0 100755
--- a/boot-env/preboot/preboot.sh
+++ b/boot-env/preboot/preboot.sh
@@ -10,7 +10,7 @@
# General information about OpenSLX can be found at http://openslx.org
#
# preboot script for user interaction with OpenSLX preloading environment for
-# Linux stateless clients
+# Linux stateless clients (fetched by Preboot init over the net)
# get configuration
. /etc/initramfs-setup
@@ -25,10 +25,11 @@ sysname=$(cat result)
. ./$sysname
sysname=$(readlink $sysname)
+# ask for desired debug level in stage3 if debug!=0 in preboot
echo "0" >result
-dialog --no-cancel --menu "Choose Debug Level:" 20 65 10 \
- "0" "no debug output" \
- "3" "standard debug output" 2>result
+[ x$debuglevel != x0 ] && dialog --no-cancel --menu "Choose Debug Level:" \
+ 20 65 10 "0" "no debug output" \
+ "3" "standard debug output" 2>result
debuglevel=$(cat result)
if [ x$debuglevel != x0 ]; then
@@ -45,18 +46,17 @@ w3m -o confirm_qq=no \
chvt 1
# fetch kernel and initramfs of selected system
-wget -O /tmp/kernel $boot_uri/$kernel
-wget -O /tmp/initramfs $boot_uri/$initramfs
+wget -O /tmp/kernel $boot_uri/$kernel | dialog --progressbox 3 65
+wget -O /tmp/initramfs $boot_uri/$initramfs | dialog --progressbox 3 65
# read primary IP configuration to pass it on (behaviour like IPAPPEND=1 of
# PXElinux)
. /tmp/ipstuff
-clear
-ash
+[ "x$debuglevel" != x0 ] && { clear; ash; }
# start the new kernel with initialramfs and composed cmdline
-echo "Booting OpenSLX client $label ..."
+dialog --infobox "Booting OpenSLX client $label ..." 3 65
kexec -l /tmp/kernel --initrd=/tmp/initramfs \
- --append="$append file=$boot_uri/${preboot_id}/client-config/${sysname}/${client}.tgz $quiet ip=$ip:$siaddr:$router:$subnet:$dnssrv $debug"
+ --append="$append file=$boot_uri/${preboot_id}/client-config/${sysname}/${client}.tgz $quiet ip=$ip:$siaddr:$router:$subnet:$dnssrv $debug" 2>/dev/null
kexec -e
diff --git a/boot-env/preboot/uclib-rootfs/init b/boot-env/preboot/uclib-rootfs/init
index 7a879987..62223de4 100755
--- a/boot-env/preboot/uclib-rootfs/init
+++ b/boot-env/preboot/uclib-rootfs/init
@@ -10,7 +10,7 @@
# General information about OpenSLX can be found at http://openslx.org
#
# Main script for preboot initial ramfs - preloading environment for running
-# OpenSLX linux stateless clients version 5 for testing
+# OpenSLX linux stateless clients version 5.
fetchip () {
# we expect to get an ip address within 10++ seconds
@@ -30,20 +30,25 @@ for i in 1 2 ; do
if [ $i -eq 1 ] ; then
sleep 1
else
- echo "Did not get any proper IP configuration"; /bin/ash
+ dialog --msgbox "Did not get any proper IP configuration: Please check \
+that your Ethernet card is supported, the machine is connected to the network \
+and a DHCP server is answering your requests." 7 65
+ ash
+ echo "o" >/proc/sysrq-trigger
fi
fi
done
}
#############################################################################
+# PreBoot init main part
+
# device files get their own filesystem
devdir="/dev"
mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir}
DEBUGLEVEL=0
-# create basic device files an directories in dev (for most hardware related
-# devices mdev should handle that)
+# create basic device files an directories in dev
for i in "/dev/mem c 1 1" "/dev/null c 1 3" "/dev/zero c 1 5" \
"/dev/urandom c 1 9" "/dev/kmsg c 1 11" "/dev/tty0 c 4 0" \
"/dev/tty1 c 4 1" "/dev/tty2 c 4 2" "/dev/tty3 c 4 3" \
@@ -54,7 +59,9 @@ for i in "/dev/mem c 1 1" "/dev/null c 1 3" "/dev/zero c 1 5" \
"/dev/fb0 c 29 0" "/dev/bootsplash p" "/dev/xconsole p"; do
mknod $i
done
-mkdir -p ${devdir}/pts ${devdir}/shm ${devdir}/.udevdb ${devdir}/.udev
+mkdir -p ${devdir}/pts ${devdir}/shm
+
+dialog --infobox "Starting OpenSLX preboot environment ..." 3 65
# initramfs-setup configuration (common settings for all clients using a
# certain InitRamFS generated by slxmkramfs/mkdxsinitrd)
@@ -138,7 +145,8 @@ echo "macaddr=$macaddr" >>/etc/initramfs-setup
# at this point a little selection script could be downloaded, which lets the
# user choose what kind of SLX client he wants to get
-echo "Fetching preboot interactive part and configuration from the net ..."
+dialog --infobox "Fetching preboot interactive part and configuration from \
+the net ..." 4 65
wget -q -c -O /tmp/preboot.env $boot_uri/bootloader/${preboot_id}.env
mkdir /preboot
tar -xzf /tmp/preboot.env -C /preboot
@@ -154,8 +162,8 @@ fi
cd /preboot
exec ./preboot.sh
# we should never return from that one ...
-echo "The execution of the main preboot environment failed. Please check"
-echo "network access of your box. Is $boot_uri reachable!?"
+dialog --msgbox "The execution of the main preboot component failed. Please \
+check network access of your box. Is $boot_uri reachable!?" 6 65
# ping -c 1 $boot_uri
sleep 20 && echo "o" > /proc/sysrq-trigger