From 582579c6700ed9034b8e17c0d08d935447a661f9 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Thu, 23 Jun 2016 00:50:35 +0200 Subject: 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. --- liveinit | 16 +++++++++++----- 1 file 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} -- cgit v1.2.3