[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#283919: initrd-tools: Should warn if root device is not found



On Monday 13 of December 2004 03:34, Horms wrote:
> On Thu, Dec 02, 2004 at 11:11:42AM +0100, Piotr Roszatycki wrote:
> > Package: initrd-tools
> > Version: 0.1.74
> > Severity: wishlist
> >
> > I'd like to see some warning, if /proc/sys/kernel/real-root-dev is equal
> > 0. That means no root device was found and the message would be very
> > helpful.
> >
> > I've spend an hour trying to reboot the kernel 2.6 with
> > root=/dev/ida/c0d0p2 parameter. I didn't know the kernel doesn't
> > understand such parameter and I've found the real reason by my own
> > inspection in initrd's mini-shell.
>
> That sounds reasonable, though I am not sure where you would want
> the warning to go. Perhaps a patch would help illustrate the idea.

My proposition:

--- init.orig   2004-08-27 20:43:34 +0200
+++ init        2004-12-13 10:19:29 +0100
@@ -412,7 +412,10 @@
 rootdev=$(cat proc/sys/kernel/real-root-dev)
 cmdline=$(cat /proc/cmdline)
 umount -n proc
-if [ $rootdev != 256 ]; then
+if [ $rootdev = 0 ]; then
+    echo "Kernel can not convert a name into device number. Check the 'root=' 
argument"
+fi
+if [ $rootdev != 256 ] && [ $rootdev != 0 ]; then
        mount_root
        cd mnt
        [ $DEVFS ] && mount -nt devfs devfs dev



-- 
 .''`.    Piotr Roszatycki, Netia SA
: :' :    mailto:Piotr_Roszatycki@netia.net.pl
`. `'     mailto:dexter@debian.org
  `-



Reply to: