Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 437080 - Default linuxrc uses hardcoded path for init instead of kernel parameter while checking root disk
Summary: Default linuxrc uses hardcoded path for init instead of kernel parameter whil...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2012-10-03 15:47 UTC by Dustin Frisch
Modified: 2012-10-03 18:18 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch (linuxrc_real_init.patch,426 bytes, patch)
2012-10-03 15:53 UTC, Dustin Frisch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dustin Frisch 2012-10-03 15:47:14 UTC
genkernel uses the hardcoded path to /sbin/init instead of the 'real_init' kernel parameter while checking the mounted root partition. The caused the mount.

genkernel should use the real_init option instead of the hard coded path.

Reproducible: Always

Steps to Reproduce:
1. Rename /sbin/init to /sbin/init_ouch
2. Append kernel option real_init=/sbin/init_ouch
3. Reeboot
Actual Results:  
genkernel says "The filesystem mounted at ${REAL_ROOT} does not appear to be a valid /, try again"

Expected Results:  
Continue booting after mounting the filesystem.
Comment 1 Dustin Frisch 2012-10-03 15:53:59 UTC
Created attachment 325598 [details, diff]
patch

Patch to use rel_init kernel parameter instead of hard coded path during root check.
Comment 2 Sebastian Pipping gentoo-dev 2012-10-03 15:57:42 UTC
Thanks for the patch.  If I am not mistaken, we cannot rely on Bash features here but on POSIX shell, only.
Comment 3 Dustin Frisch 2012-10-03 16:02:09 UTC
The same syntax is used later in the script, too. I've just copied it...
I'm not an bash expert, but as far as I can see, there are some more parts of the script which are not POSIX compatible.
Comment 4 Sebastian Pipping gentoo-dev 2012-10-03 16:25:02 UTC
Fair enough.

Patch applied to master:
http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=d89f3d59e8e0ee31b228d28888b302031838a672
Comment 5 Sebastian Pipping gentoo-dev 2012-10-03 16:58:42 UTC
+*genkernel-3.4.43 (03 Oct 2012)
+
+  03 Oct 2012; Sebastian Pipping <sping@gentoo.org> +genkernel-3.4.43.ebuild:
+  Bump to 3.4.43
+
Comment 6 Dustin Frisch 2012-10-03 18:18:33 UTC
Thank you.