summaryrefslogtreecommitdiffstats
path: root/initramfs/cdboot
diff options
context:
space:
mode:
authorDirk von Suchodoletz2008-02-27 21:57:50 +0100
committerDirk von Suchodoletz2008-02-27 21:57:50 +0100
commitae97bf79d9bd01b7862ffea05efd0cc10ea941be (patch)
treee27e13ba7a0499e71936bdcd7e8f0eeec21b11c6 /initramfs/cdboot
parentScript for creation of a simple remote boot CD ... (diff)
downloadcore-ae97bf79d9bd01b7862ffea05efd0cc10ea941be.tar.gz
core-ae97bf79d9bd01b7862ffea05efd0cc10ea941be.tar.xz
core-ae97bf79d9bd01b7862ffea05efd0cc10ea941be.zip
Updated stuff for CD preboot ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1578 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/cdboot')
-rwxr-xr-xinitramfs/cdboot/init29
-rwxr-xr-xinitramfs/cdboot/mkcdboot12
2 files changed, 20 insertions, 21 deletions
diff --git a/initramfs/cdboot/init b/initramfs/cdboot/init
index fbd7bdbf..ca6f6c96 100755
--- a/initramfs/cdboot/init
+++ b/initramfs/cdboot/init
@@ -37,6 +37,7 @@ echo $n
# device files get their own filesystem (to be move mounted later)
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"
# create basic device files an directories in dev (for most hardware related
# devices mdev should handle that)
@@ -62,10 +63,6 @@ mkdir -p ${devdir}/pts ${devdir}/shm ${devdir}/.udevdb ${devdir}/.udev
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin
-export DEBUGLEVEL=0
-export KERNEL="${ramfs_kernver}"
-export NWMODULES="${ramfs_nicmods}"
-
# set a default LAN interface, might be modified for WLAN or on machines with
# more than one ethernet card built in
nwif="eth0"
@@ -96,9 +93,8 @@ done
# read kernel commandline
read KCMDLINE < /proc/cmdline
-export KCMDLINE
# read the system wide machine-setup and then the kernel commandline
-for opts in $(sed "s/#.*//" /etc/initramfs-setup) ${KCMDLINE} ; do
+for opts in ${KCMDLINE} ; do
case ${opts} in
debug)
DEBUGLEVEL=1;;
@@ -132,18 +128,21 @@ fi
# set up loopback networking and power up ethernet
ip link set dev lo up
ip addr add 127.0.0.1/8 dev lo
-ip link set dev $nwif up || echo "noeth"
+ip link set dev $nwif up || echo "I did not find any usable network adaptor."
# start udhcpc here
mkdir -p /usr/share/udhcpc
-echo -e '#!/bin/ash\nunset infomsg HOME IFS mask lease interface DEBUGLEVEL\n
-set >/tmp/ipstuff' >/usr/share/udhcpc/default.script
+echo -e "#!/bin/ash\nunset infomsg HOME IFS mask lease interface DEBUGLEVEL \
+BOOT_IMAGE\nset >/tmp/ipstuff" >/usr/share/udhcpc/default.script
chmod u+x /usr/share/udhcpc/default.script
-[ -f /lib/modules/@@@KERNVER@@@/kernel/net/packet/af_packet.ko ] && \
- modprobe -q af_packet
+modprobe -q af_packet
[ -n $vci ] && vci="-V $vci"
udhcpc -b -q $vci -s /usr/share/udhcpc/default.script -i $nwif #2>/dev/null
-. /tmp/ipstuff || echo "no ip config"
+if test -e /tmp/ipstuff ; then
+ . /tmp/ipstuff
+else
+ echo "Did not get any proper IP configuration"
+fi
ip addr add $ip/$(nm2pref $subnet) dev $nwif
ip route add default via $router
@@ -151,11 +150,11 @@ ip route add default via $router
# user choose what kind of SLX client he wants to get
# get kernel and initramfs
-wget -c -O /tmp/kernel http://132.230.4.73/trac/kdefault
-wget -c -O /tmp/iramfs http://132.230.4.73/trac/idefault
+wget -q -c -O /tmp/kernel ftp://openslx:OpenS1X@archive.ruf.uni-freiburg.de/kernel
+wget -q -c -O /tmp/iramfs ftp://openslx:OpenS1X@archive.ruf.uni-freiburg.de/iramfs
/bin/ash
# start the new kernel with initialramfs and cmdline
kexec -l /tmp/kernel --initrd=/tmp/iramfs --append="ip=$ip:$siaddr:$router:$subnet\
- file=http://132.230.4.73/trac/default.tgz debug=3"
+ file=http://132.230.4.4/default.tgz debug=3"
kexec -e
diff --git a/initramfs/cdboot/mkcdboot b/initramfs/cdboot/mkcdboot
index ceeaf814..c23f6094 100755
--- a/initramfs/cdboot/mkcdboot
+++ b/initramfs/cdboot/mkcdboot
@@ -51,11 +51,11 @@ done
mkdir -p ${BUILDDIR}/iso/isolinux
cp ${SLX_SHARE_PATH}/cdboot/isolinux.bin ${BUILDDIR}/iso/isolinux
cp ${SLX_SHARE_PATH}/tftpboot/menu.c32 ${BUILDDIR}/iso/isolinux
-cp /boot/vmlinuz-${KERNVER} ${BUILDDIR}/iso/isolinux
+cp /boot/vmlinuz-${KERNVER} ${BUILDDIR}/iso/isolinux/vmlinuz
pushd . > /dev/null 2>&1
cd ${BUILDDIR}
- find . ! -name "*~" | cpio -H newc --create | gzip -9 \
- > ${BUILDDIR}/iso/isolinux/cd-initramfs
+ find . ! -name "*~" ! -path "./iso/*" | cpio -H newc --create | gzip -9 \
+ > ${BUILDDIR}/iso/isolinux/cdirfs
popd > /dev/null 2>&1
# starting to setup the menu driven boot chooser
@@ -64,11 +64,11 @@ MENU ROWS 9\nMENU TABMSGROW 15\nMENU CMDLINEROW 15\nMENU ENDROW -1\n\
MENU TIMEOUTROW 15\nMENU HELPMSGROW 15\nMENU HELPMSGENDROW -1\n\
MENU HSHIFT 0\nMENU VSHIFT 5\n\nMENU TITLE OpenSLX PreBoot ISO\
" > ${BUILDDIR}/iso/isolinux/isolinux.cfg
-echo -e "\nTest to boot an OpenSLX Client" \
+echo -e "LABEL OpenSLX\n\tMENU LABEL Test to boot an OpenSLX Client" \
>> ${BUILDDIR}/iso/isolinux/isolinux.cfg
echo -e "\tTEXT HELP\n\tYou should have DHCP running ...\n\tENDTEXT" \
>> ${BUILDDIR}/iso/isolinux/isolinux.cfg
-echo -e "\tKERNEL vmlinuz-${KERNVER}\n\tAPPEND initrd=cd-initramfs" \
+echo -e "\tKERNEL vmlinuz\n\tAPPEND initrd=cdirfs quiet" \
>> ${BUILDDIR}/iso/isolinux/isolinux.cfg
# produce the iso image
@@ -77,4 +77,4 @@ mkisofs -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -r -J -l \
Project - http://www.openslx.org" -p "OpenSLX Project - \
openslx-devel@openslx.org" -relaxed-filenames -V "OpenSLX BootCD" \
-volset "OpenSLX Project - PreBoot CD for non PXE/TFTP start of a \
-Linux Stateless Client" ${BUILDDIR}/iso
+Linux Stateless Client" -c isolinux/boot.cat ${BUILDDIR}/iso