summaryrefslogtreecommitdiffstats
path: root/boot-env/preboot
diff options
context:
space:
mode:
authorOliver Tappe2009-01-28 19:37:29 +0100
committerOliver Tappe2009-01-28 19:37:29 +0100
commit0aec2fce7171cd0d9bba87d6e5dafd7a8f34d21b (patch)
tree19f2cf57577715e365898a237cf4ba0706488134 /boot-env/preboot
parent* pick first system as default for bootmenu (diff)
downloadcore-0aec2fce7171cd0d9bba87d6e5dafd7a8f34d21b.tar.gz
core-0aec2fce7171cd0d9bba87d6e5dafd7a8f34d21b.tar.xz
core-0aec2fce7171cd0d9bba87d6e5dafd7a8f34d21b.zip
* worked simple WAN-booting into a working state
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2546 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'boot-env/preboot')
-rwxr-xr-xboot-env/preboot/init7
-rwxr-xr-xboot-env/preboot/preboot.sh17
2 files changed, 13 insertions, 11 deletions
diff --git a/boot-env/preboot/init b/boot-env/preboot/init
index fa40630d..7b908ea5 100755
--- a/boot-env/preboot/init
+++ b/boot-env/preboot/init
@@ -129,9 +129,9 @@ ip route add default via $router
# 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 ..."
-wget -q -c -O $boot_uri/bootloader/${prebootid}.env /tmp/
+wget -q -c -O /tmp/preboot.env $boot_uri/bootloader/${preboot_id}.env
mkdir /preboot
-tar -xzf /tmp/${prebootid}.env -C /preboot
+tar -xzf /tmp/preboot.env -C /preboot
# start a debug shell if needed, else set quiet kernel parameter
if [ "${DEBUGLEVEL}" -gt 0 ] ; then
/bin/ash
@@ -140,7 +140,8 @@ else
echo -e "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
fi
# run the preboot interactive part which finally will execute kexec
-exec /preboot/preboot.sh
+cd /preboot
+exec ./preboot.sh
# we will never return from that one ...
diff --git a/boot-env/preboot/preboot.sh b/boot-env/preboot/preboot.sh
index 98a2c61e..1d7c77fb 100755
--- a/boot-env/preboot/preboot.sh
+++ b/boot-env/preboot/preboot.sh
@@ -12,18 +12,19 @@
# preboot script for user interaction with OpenSLX preloading environment for
# Linux stateless clients
-# we expect to have a system selection dialog file in /preboot/syssel.dialog
-dialog --file syssel.dialog 2>result
+# get configuration
+. /etc/initramfs-setup
+
+# we expect to have a system selection dialog file in /preboot/bootmenu.dialog
+dialog --file bootmenu.dialog 2>result
# source the system to boot configuration ($kernel, $initramfs, $append,
# $label)
-. $(cat result)
+. ./$(cat result)
echo $kernel
-wget ftp://openslx:OpenS1X@archive.ruf.uni-freiburg.de/$kernel \
- -o /tmp/kernel
-wget ftp://openslx:OpenS1X@archive.ruf.uni-freiburg.de/$initramfs \
- -o initramfs
+wget -O /tmp/kernel $boot_uri/$kernel
+wget -O /tmp/initramfs $boot_uri/$initramfs
# read primary IP configuration to pass it on
. /tmp/ipstuff
@@ -31,5 +32,5 @@ wget ftp://openslx:OpenS1X@archive.ruf.uni-freiburg.de/$initramfs \
# start the new kernel with initialramfs and cmdline
echo "Booting OpenSLX client $label ..."
kexec -l /tmp/kernel --initrd=/tmp/initramfs \
- --append="ip=$ip:$siaddr:$router:$subnet $append $quiet"
+ --append="$append file=$boot_uri debug=3"
kexec -e