mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
mk-pxelinux-ramfs: improve console output
Currently for a user the pxe boot seems unclear and it is hard to follow what is going on. - Report on when (re-)starting the bootscript. - Report configs fetched (Without e.g. on a virsh console one only sees a loop of timeouts.) - Report which config is missing on the PXE_CONF check - Report kexec calls made GitHub-ID: #16 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com> Acked-by: Viktor Mihajlovski <mihajlov@linux.vnet.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
This commit is contained in:
committed by
Michael Holzheu
parent
778292e771
commit
9c2a0649f2
@@ -164,6 +164,7 @@ echo "$cmd: Making init script"
|
||||
# --- begin init script
|
||||
cat <<'EOF' > $builddir/init
|
||||
#!/bin/sh
|
||||
script="/sbin/pxeboot.script"
|
||||
/bin/mount -t devtmpfs none /dev
|
||||
/bin/mount -t proc none /proc
|
||||
/bin/mount -t sysfs none /sys
|
||||
@@ -174,8 +175,9 @@ cat <<'EOF' > $builddir/init
|
||||
|
||||
while true
|
||||
do
|
||||
/sbin/pxeboot.script
|
||||
${script}
|
||||
/bin/sleep 1
|
||||
echo "retry ${script}"
|
||||
done
|
||||
EOF
|
||||
# --- end init script
|
||||
@@ -310,7 +312,7 @@ if [ -f $PXE_CONF ]
|
||||
then
|
||||
. $PXE_CONF
|
||||
else
|
||||
echo waiting for PXE configuration
|
||||
echo waiting for PXE configuration from DHCP
|
||||
exit
|
||||
fi
|
||||
|
||||
@@ -347,6 +349,7 @@ then
|
||||
set +e
|
||||
for c in $CONFIGS
|
||||
do
|
||||
echo "fetching config pxelinux.cfg/$c from $siaddr"
|
||||
if /usr/bin/tftp -g -l /tmp/config -r pxelinux.cfg/$c $siaddr
|
||||
then
|
||||
break
|
||||
@@ -370,11 +373,13 @@ then
|
||||
echo no kernel statement found in config
|
||||
exit
|
||||
else
|
||||
echo fetch kernel $kernel from $siaddr
|
||||
/usr/bin/tftp -g -l /tmp/kernel -r $kernel $siaddr
|
||||
fi
|
||||
|
||||
if [ -n "$initrd" ]
|
||||
then
|
||||
echo fetch initrd $initrd from $siaddr
|
||||
/usr/bin/tftp -g -l /tmp/initrd -r $initrd $siaddr
|
||||
INITRD="--initrd=/tmp/initrd"
|
||||
else
|
||||
@@ -388,6 +393,7 @@ else
|
||||
APPEND=""
|
||||
fi
|
||||
|
||||
echo "Kexec load: kexec -l /tmp/kernel $INITRD $APPEND"
|
||||
kexec -l /tmp/kernel $INITRD $APPEND
|
||||
kexec -e
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user