diff options
-rw-r--r-- | boot-env/OpenSLX/BootEnvironment/PrebootCD.pm | 11 | ||||
-rw-r--r-- | boot-env/preboot/cd/iso/LICENSE | 3 | ||||
-rwxr-xr-x | boot-env/preboot/preboot.sh | 20 | ||||
-rwxr-xr-x | boot-env/preboot/uclib-rootfs/init | 24 |
4 files changed, 34 insertions, 24 deletions
diff --git a/boot-env/OpenSLX/BootEnvironment/PrebootCD.pm b/boot-env/OpenSLX/BootEnvironment/PrebootCD.pm index 6e95b7e2..ae71bf8d 100644 --- a/boot-env/OpenSLX/BootEnvironment/PrebootCD.pm +++ b/boot-env/OpenSLX/BootEnvironment/PrebootCD.pm @@ -62,15 +62,16 @@ sub _createImage PROMPT 0 TIMEOUT 100 DEFAULT menu.c32 - MENU TITLE Welcome to OpenSLX PreBoot CD + MENU TITLE Welcome to OpenSLX PreBoot ISO/CD LABEL OpenSLX - MENU LABEL OpenSLX PreBoot + MENU LABEL OpenSLX PreBoot Environment (Mini Linux/Kexec) SAY Now loading OpenSLX preboot environment ... KERNEL vmlinuz APPEND initrd=initramfs debug=3 vga=0x317 TEXT HELP - Your chance to edit the kernel commandline ... + Your chance to edit the kernel commandline by hitting the + TAB key (e.g. for adding debug=3 to it for bug hunting) ... ENDTEXT End-of-Here spitFile("$imageDir/iso/isolinux/isolinux.cfg", $isolinuxConfig); @@ -82,8 +83,8 @@ sub _createImage -r -J -l -boot-info-table -joliet-long -publisher "OpenSLX Project - http://www.openslx.org" -p "OpenSLX Project - openslx-devel\@openslx.org" - -V "OpenSLX BootCD" - -volset "OpenSLX Project - PreBoot CD for non PXE/TFTP start of a Linux Stateless Client" + -V "OpenSLX BootISO" + -volset "OpenSLX Project - PreBoot ISO/CD for non PXE/TFTP start of a Linux Stateless Client" -c isolinux/boot.cat "$imageDir/iso" End-of-Here $mkisoCmd =~ s{\n\s*}{ }gms; 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 |