diff options
author | maximilian attems <maks@debian.org> | 2007-06-20 20:58:41 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2007-06-20 20:58:41 +0200 |
commit | 087dc49f30e7d94db10c0f0cd89020a56a04a918 (patch) | |
tree | f1c16d61333af01ade53e782ec404e9063ed6109 | |
parent | ddef7d56a60dd4602f513450581d65a9def58920 (diff) | |
download | initramfs-tools-087dc49f30e7d94db10c0f0cd89020a56a04a918.tar.gz initramfs-tools-087dc49f30e7d94db10c0f0cd89020a56a04a918.zip |
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. :)
-rw-r--r-- | debian/changelog | 5 | ||||
-rw-r--r-- | scripts/local | 19 |
2 files changed, 23 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog index b1bacac..d506d71 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,7 +7,10 @@ initramfs-tools (0.89) unstable; urgency=low * initramfs-tools.8, initramfs.conf.5: Fix typos. (closes: #427837, #427838) Thanks "A. Costa" <agcosta@gis.net> for the patch. - -- maximilian attems <maks@debian.org> Wed, 20 Jun 2007 20:01:20 +0200 + * scripts/local: Try to warn for renamed root dev. (closes: #374611) + + + -- maximilian attems <maks@debian.org> Wed, 20 Jun 2007 20:56:14 +0200 initramfs-tools (0.88) unstable; urgency=low 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)" |