summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2016-06-23 00:50:35 +0200
committer Eric Hameleers <alien@slackware.com>2016-06-23 00:50:35 +0200
commit582579c6700ed9034b8e17c0d08d935447a661f9 (patch)
treece0535654e7882036b0ca8eddc1d848b23b6a5d9
parent6d2d94ad580fe2c6bde855447498851dd00f0910 (diff)
downloadliveslak-582579c6700ed9034b8e17c0d08d935447a661f9.tar.gz
liveslak-582579c6700ed9034b8e17c0d08d935447a661f9.tar.xz
liveslak: enhance the boot debug a bit.
Some explanation about what the 'debug' boot parameter does: 'debug=1' => enable some strategic pauses during boot while showing 'mount' and 'blkid' output, so you can scroll back and inspect the proceedings (just 'debug' also enables level 1). 'debug=2' => enable verbose script execution in addition to the above pause moments. 'debug=3' => verbose script execution but without the mount/blkid info during the strategically placed pauses. 'debug=4' => dumps you into a debug shell right before the switch_root. No other pauses other debugging aids are offered like with levels 1, 2 or 3. But you can check the health of your Live system before Slackware boots up.
-rwxr-xr-xliveinit16
1 files changed, 11 insertions, 5 deletions
diff --git a/liveinit b/liveinit
index d42b9ce..cbac798 100755
--- a/liveinit
+++ b/liveinit
@@ -220,14 +220,18 @@ for ARG in $(cat /proc/cmdline); do
esac
done
+# Verbose boot script execution:
[ $DEBUG -ge 2 ] && set -x
debugit () {
- [ $DEBUG -eq 0 -o $DEBUG -gt 3 ] && return
- echo "DEBUG>> -- blkid info -- :"
- blkid | while read LINE ; do echo "DEBUG>> $LINE" ; done
- echo "DEBUG>> -- mount info -- :"
- mount | while read LINE ; do echo "DEBUG>> $LINE" ; done
+ if [ $DEBUG -eq 0 -o $DEBUG -gt 3 ]; then
+ return
+ elif [ $DEBUG -le 2 ]; then
+ echo "DEBUG>> -- blkid info -- :"
+ blkid | while read LINE ; do echo "DEBUG>> $LINE" ; done
+ echo "DEBUG>> -- mount info -- :"
+ mount | while read LINE ; do echo "DEBUG>> $LINE" ; done
+ fi
echo "DEBUG>> -- Press ENTER to continue -- : "
read JUNK
return
@@ -730,6 +734,8 @@ if [ "$RESCUE" = "" ]; then
fi
fi
+ debugit
+
# Create the writable upper directory, plus the workdir which is required
# for overlay to function (the two must be in the same POSIX filesystem):
[ ! -d ${UPPERDIR} ] && mkdir -p ${UPPERDIR}