summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xliveinit21
1 files changed, 21 insertions, 0 deletions
diff --git a/liveinit b/liveinit
index 53ac8f5..0c32d33 100755
--- a/liveinit
+++ b/liveinit
@@ -41,6 +41,9 @@ PERSISTENCE="@PERSISTENCE@"
# By default, let the media determine if we can write persistent changes:
VIRGIN=0
+# Used for debugging the init; set to '1' to enable explicit pauses>
+DEBUG=0
+
INITRD=$(cat /initrd-name)
WAIT=$(cat /wait-for-root)
KEYMAP=$(cat /keymap)
@@ -64,6 +67,9 @@ for ARG in $(cat /proc/cmdline); do
0|1|2|3|4|5|6|S|s|single)
RUNLEVEL=$ARG
;;
+ debug)
+ DEBUG=1
+ ;;
hostname=*)
LIVE_HOSTNAME=$(echo $ARG | cut -f2 -d=)
;;
@@ -112,6 +118,17 @@ for ARG in $(cat /proc/cmdline); do
esac
done
+debugit () {
+ [ $DEBUG -eq 0 ] && 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
+ echo "DEBUG>> -- Press ENTER to continue -- : "
+ read JUNK
+ return
+}
+
# If udevd is available, use it to generate block devices
# else use mdev to read sysfs and generate the needed devices
if [ -x /sbin/udevd -a -x /sbin/udevadm ]; then
@@ -227,6 +244,8 @@ if [ "$RESCUE" = "" ]; then
echo "${INITRD}: Try adding \"rootdelay=20\" to the boot command."
fi
+ debugit
+
# Start assembling our live system components below /mnt/live :
mkdir /mnt/live
@@ -309,6 +328,8 @@ if [ "$RESCUE" = "" ]; then
mkdir -p /mnt/overlay
mount -t overlay -o workdir=${OVLWORK},upperdir=${UPPERDIR},lowerdir=${RODIRS} overlay /mnt/overlay
+ debugit
+
# Make the underpinning RAM fs accessible in the live system (for fun):
mkdir -p /mnt/overlay/mnt/live
mount --bind /mnt/live /mnt/overlay/mnt/live