From 087dc49f30e7d94db10c0f0cd89020a56a04a918 Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 20 Jun 2007 20:58:41 +0200 Subject: scripts/local: add a q&d crude method to warn about renamed root dev maybe this will reduce ration of bug reports, as further device renaming is in the pipes. :) --- scripts/local | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'scripts') diff --git a/scripts/local b/scripts/local index 429d1f6..10e2f73 100644 --- a/scripts/local +++ b/scripts/local @@ -66,6 +66,25 @@ mountroot () # We've given up, but we'll let the user fix matters if they can while [ ! -e "${ROOT}" ]; do + # give hint about renamed root + case "${ROOT}" in + /dev/hd*) + suffix="${ROOT#/dev/hd}" + major="${suffix%[[:digit:]]}" + major="${major%[[:digit:]]}" + if [ -d "/sys/block/sd${major}" ]; then + echo "WARNING bootdevice may be renamed. Try root=/dev/sd${suffix}" + fi + ;; + /dev/sd*) + suffix="${ROOT#/dev/sd}" + major="${suffix%[[:digit:]]}" + major="${major%[[:digit:]]}" + if [ -d "/sys/block/hd${major}" ]; then + echo "WARNING bootdevice may be renamed. Try root=/dev/hd${suffix}" + fi + ;; + esac echo "ALERT! ${ROOT} does not exist. Dropping to a shell!" echo " Check your root= boot argument (cat /proc/cmdline)" panic " Check for missing modules (cat /proc/modules), or device files (ls /dev)" -- cgit v1.2.3