* [PATCH 0/2] fix error handling in initramfs-framework
@ 2015-09-18 11:49 Patrick Ohly
2015-09-18 11:49 ` [PATCH 1/2] initramfs-framework: fix "support dropping into shell on failure" Patrick Ohly
2015-09-18 11:49 ` [PATCH 2/2] initramfs-framework: better error reporting for invalid root boot parameter Patrick Ohly
0 siblings, 2 replies; 5+ messages in thread
From: Patrick Ohly @ 2015-09-18 11:49 UTC (permalink / raw)
To: openembedded-core
While debugging the root=UUID failure when using IDE disks I noticed
that the error messages from initramfs-module did not really explain
the problem, and that my "drop to shell" patch was faulty. Here are the
improvement respectively fix.
The following changes since commit 72682d72b52355c3fed947167ca3c6064340ead1:
autotools.bbclass: mkdir ${B} -> mkdir -p ${B} (2015-09-16 22:17:19 +0100)
are available in the git repository at:
git://github.com/pohly/openembedded-core initramfs-rootfs-failure
https://github.com/pohly/openembedded-core/tree/initramfs-rootfs-failure
Patrick Ohly (2):
initramfs-framework: fix "support dropping into shell on failure"
initramfs-framework: better error reporting for invalid root boot
parameter
meta/recipes-core/initrdscripts/initramfs-framework/finish | 2 +-
meta/recipes-core/initrdscripts/initramfs-framework/init | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/2] initramfs-framework: fix "support dropping into shell on failure"
2015-09-18 11:49 [PATCH 0/2] fix error handling in initramfs-framework Patrick Ohly
@ 2015-09-18 11:49 ` Patrick Ohly
2015-09-18 17:41 ` Otavio Salvador
2015-09-18 11:49 ` [PATCH 2/2] initramfs-framework: better error reporting for invalid root boot parameter Patrick Ohly
1 sibling, 1 reply; 5+ messages in thread
From: Patrick Ohly @ 2015-09-18 11:49 UTC (permalink / raw)
To: openembedded-core
Due to a missing $ before the variable name, all fatal errors ended up
invoking a shell, instead of only doing that when init_fatal_sh is set
as boot parameter.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
meta/recipes-core/initrdscripts/initramfs-framework/init | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/init b/meta/recipes-core/initrdscripts/initramfs-framework/init
index 9291ad5..204f237 100755
--- a/meta/recipes-core/initrdscripts/initramfs-framework/init
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/init
@@ -58,7 +58,7 @@ fatal() {
echo $1 >/dev/console
echo >/dev/console
- if [ -n "bootparam_init_fatal_sh" ]; then
+ if [ -n "$bootparam_init_fatal_sh" ]; then
sh
else
while [ "true" ]; do
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] initramfs-framework: better error reporting for invalid root boot parameter
2015-09-18 11:49 [PATCH 0/2] fix error handling in initramfs-framework Patrick Ohly
2015-09-18 11:49 ` [PATCH 1/2] initramfs-framework: fix "support dropping into shell on failure" Patrick Ohly
@ 2015-09-18 11:49 ` Patrick Ohly
2015-09-18 17:41 ` Otavio Salvador
1 sibling, 1 reply; 5+ messages in thread
From: Patrick Ohly @ 2015-09-18 11:49 UTC (permalink / raw)
To: openembedded-core
When the "boot" parameter refers to a non-existent device, the only
visible output at normal log levels was a rather confusing:
ERROR: There's no '/dev' on rootfs.
That's because the actual error, not being able to find the root
device, was only a debug message, which gets ignored in the default
mode.
Promoting the "root '$bootparam_root' doesn't exist." message from
"debug" to "msg" gives sufficient context to understand the error. A
more intrusive change would be to change also the control flow.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
---
meta/recipes-core/initrdscripts/initramfs-framework/finish | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/finish b/meta/recipes-core/initrdscripts/initramfs-framework/finish
index e712ff0..d09bbb8 100755
--- a/meta/recipes-core/initrdscripts/initramfs-framework/finish
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/finish
@@ -37,7 +37,7 @@ finish_run() {
fi
mount $flags $bootparam_root $ROOTFS_DIR
else
- debug "root '$bootparam_root' doesn't exist."
+ msg "root '$bootparam_root' doesn't exist."
fi
fi
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-18 17:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-18 11:49 [PATCH 0/2] fix error handling in initramfs-framework Patrick Ohly
2015-09-18 11:49 ` [PATCH 1/2] initramfs-framework: fix "support dropping into shell on failure" Patrick Ohly
2015-09-18 17:41 ` Otavio Salvador
2015-09-18 11:49 ` [PATCH 2/2] initramfs-framework: better error reporting for invalid root boot parameter Patrick Ohly
2015-09-18 17:41 ` Otavio Salvador
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox