From: Darren Hart <dvhart@linux.intel.com>
To: Yocto Project <yocto@yoctoproject.org>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
"Ashfield, Bruce" <Bruce.Ashfield@windriver.com>
Subject: [PATCH][linux-yocto] mount_root: clarify error messages for when no rootfs found (V2)
Date: Tue, 15 Nov 2011 12:19:26 -0800 [thread overview]
Message-ID: <4EC2C94E.6000202@linux.intel.com> (raw)
The following is a modified version the patch at:
meta/cfg/kernel-cache/patches/boot/mount_root-clarify-error-messages-for-when-no-rootfs.patch
in the linux-yocto-3.0 git repository. This version adds KERN_EMERG
so that even using loglevel=1 at boot, the end user will see:
[ 0.217462] VFS: Unable to mount root fs on unknown-block(8,2)
[ 0.223457] User configuration error - no valid root filesystem found
[ 0.230057] Kernel panic - not syncing: Invalid configuration from end user preg
[ 0.238992] Pid: 1, comm: swapper Not tainted 3.0.4-yocto-standard+ #2
[ 0.245691] Call Trace:
[ 0.248218] [<c04eddbc>] ? 0xc04eddbc
[ 0.252071] [<c05549ad>] ? 0xc05549ad
[ 0.255928] [<c05549fa>] ? 0xc05549fa
[ 0.259790] [<c0554623>] ? 0xc0554623
[ 0.263650] [<c0554b1c>] ? 0xc0554b1c
[ 0.267497] [<c055472a>] ? 0xc055472a
[ 0.271344] [<c04f0df6>] ? 0xc04f0df6
Instead of just:
[ 0.230057] Kernel panic - not syncing: Invalid configuration from end user preg
...
Which is arguably no better than what this patch originally attempted to address.
Paul, has this patch been sent upstream for inclusion? I don't see it in Linus' tree.
Thanks,
Darren
----------------------
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.
V2: Use KERN_EMERG so the printk context isn't lost when using loglevel
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
init/do_mounts.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index bb008d0..d24b8c7 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -270,7 +270,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");
}
printk("List of all partitions:\n");
@@ -282,7 +284,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:
putname(fs_names);
}
--
1.6.5.2
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
next reply other threads:[~2011-11-15 20:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-15 20:19 Darren Hart [this message]
2011-11-15 20:56 ` [PATCH][linux-yocto] mount_root: clarify error messages for when no rootfs found (V2) Paul Gortmaker
2011-11-15 21:01 ` Darren Hart
2011-11-16 5:36 ` Bruce Ashfield
2011-11-16 15:45 ` Darren Hart
2011-11-16 15:51 ` Bruce Ashfield
2011-11-16 16:00 ` Darren Hart
2011-11-16 16:46 ` Bruce Ashfield
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EC2C94E.6000202@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=Bruce.Ashfield@windriver.com \
--cc=paul.gortmaker@windriver.com \
--cc=yocto@yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.