mount_root: clarify error messages for when no rootfs found

To an end user who doesn't really know linux that well, a
message like:

  Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

may just look like cryptic computer speak indicating some
deep and complex problem, instead of the reality that they
have a simple local configuration problem.  Ideally it would
be nice to not use the misleading "panic" at all, but since
various panic notifiers are historically expecting to be
called when there is no valid rootfs, we can't change that.

So instead, this tries to make it 100% clear to folks of
any background that it is an end user configuration issue.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
This commit is contained in:
Paul Gortmaker 2009-11-26 07:32:09 -08:00 committed by Bruce Ashfield
parent 55c916f14f
commit 796b3b9759

View File

@ -417,7 +417,9 @@ retry:
printk("DEBUG_BLOCK_EXT_DEVT is enabled, you need to specify "
"explicit textual name for \"root=\" boot option.\n");
#endif
panic("VFS: Unable to mount root fs on %s", b);
printk(KERN_EMERG "VFS: Unable to mount root fs on %s\n", b);
printk(KERN_EMERG "User configuration error - no valid root filesystem found\n");
panic("Invalid configuration from end user prevents continuing");
}
if (!(flags & SB_RDONLY)) {
flags |= SB_RDONLY;
@ -433,7 +435,9 @@ retry:
#ifdef CONFIG_BLOCK
__bdevname(ROOT_DEV, b);
#endif
panic("VFS: Unable to mount root fs on %s", b);
printk(KERN_EMERG "VFS: Unable to mount root fs on %s\n", b);
printk(KERN_EMERG "User configuration error - no valid root filesystem found\n");
panic("Invalid configuration from end user prevents continuing");
out:
put_page(page);
}