From 0b2de1f895c73fecfd996e6b419bd4cf3b2fab80 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 9 Sep 2009 17:13:02 +0200 Subject: [PATCH] 99base/init: output more info() --- modules.d/99base/init | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules.d/99base/init b/modules.d/99base/init index 04990a84c..1797bf896 100755 --- a/modules.d/99base/init +++ b/modules.d/99base/init @@ -190,6 +190,11 @@ while :; do && { flock -s 9 ; emergency_shell "Can't mount root filesystem"; } 9>/.console_lock done +{ + echo -n "Mounted root filesystem " + while read dev mp rest; do [ "$mp" = "$NEWROOT" ] && echo $dev; done < /proc/mounts +} | vinfo + # pre pivot scripts are sourced just before we switch over to the new root. getarg 'rdbreak=pre-pivot' && emergency_shell "Break pre-pivot" source_all pre-pivot @@ -199,6 +204,7 @@ source_all pre-pivot for i in "$(getarg init=)" /sbin/init /etc/init /init /bin/sh; do [ -f "$NEWROOT$i" -a -x "$NEWROOT$i" ] && { INIT="$i"; break; } done + [ "$INIT" ] || { echo "Cannot find init!" echo "Please check to make sure you passed a valid root filesystem!" @@ -248,6 +254,8 @@ if getarg rdcopystate; then cp /tmp/* /dev/.initramfs/ >/dev/null 2>&1 fi +info "Switching root" + exec switch_root "$NEWROOT" "$INIT" $initargs || { # davej doesn't like initrd bugs echo "Something went very badly wrong in the initrd. Please " -- 2.47.3