Bug 73133

Summary: initrd assisted bootup fails if no /initrd directory
Product: [Retired] Red Hat Linux Reporter: Hans Ecke <hansecke>
Component: mkinitrdAssignee: Erik Troan <ewt>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: medium    
Version: 8.0CC: emilio.riva
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
URL: http://www.unixgods.org/~tilo/redhat_72_problems.html
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-06 04:44:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hans Ecke 2002-08-31 00:10:07 UTC
From Bugzilla Helper: 
User-Agent: Mozilla/5.0 (compatible; Konqueror/3; Linux; , en_US, en) 
 
Description of problem: 
If a RH 7.2, 7.3 or 8.0beta system boots using an init ramdisk, the bootup 
will fail if no /initrd directory exists. This is bad for several reasons: 
 
* the boot process should not die because of such a simple problem 
 
* most sysadmins will not know about this fact. upon encountering an empty 
directory /initrd they might just delete it, figuring it to be some random 
directory a runaway program created. the next time they reboot - weeks later - 
how is anybody to know what the reason for the sudden failure is? 
 
* the error message "pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 
2" is absolutely unhelpful and cryptic. It rather suggests that mounting root 
does not work, the initramdisk is outdated or something like that. 
 
I filed this bugreport under "mkinitrd" since the error occurs inside its 
bootup script. 
 
Version-Release number of selected component (if applicable): 
 
 
How reproducible: 
Always 
 
Steps to Reproduce: 
1.set up a system to boot using an initramdisk  
2.test that it boots correctly 
3.rmdir /initrd 
4.reboot 
	 
 
Actual Results:  the boot process stops with error messages like this: 
 
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2 
Freeing unused kernel memory: 220k freed 
Kernel panic: No init found.  Try passing init= option to kernel. 
 
 
Expected Results:  it should boot without a problem 
 
Additional info:

Comment 1 Emilio Riva 2002-09-25 12:39:12 UTC
I've just discovered this same solution by myself after 4-hours of fear!!!
the problem seems to be simple, but it should be fixed soon please!!

Comment 2 Hans Ecke 2002-10-17 00:05:49 UTC
Changed version to 8.0. Maybe this will increase visibility.

Comment 3 Jeremy Katz 2003-01-06 04:44:32 UTC
Your system will also fail to boot if you do 'rm -rf /etc' but people don't tend
to go around doing that.  There isn't anything that can be done at this point
because the root filesystem isn't mounted read-write yet and so we can't create
the directory we need if it fails to exist.