Bug 79982 - Panics upon boot when /initrd is missing.
Panics upon boot when /initrd is missing.
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2002-12-18 07:24 EST by Andy Herrero
Modified: 2014-03-16 22:33 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-12-18 21:23:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Andy Herrero 2002-12-18 07:24:29 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461)

Description of problem:
I removed the empty directory /initrd during post-install configuration and 
during the following boot, RH8.0 refused to boot.

The console-output was something similar to the following text:
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
Freeing unused kernel memory: 216k freed
Kernel panic: No init found. Try passing init= option to kernel.

I found this very confusing as all the initrd's are located under /boot, and it 
had apparently found the kernel, so why not the initrd.

I booted into rescue-mode via the install-CD 1, and re-created /initrd. It 
retried to boot and it worked great. _NOTHING_ else was done during the rescue-
operation, which isolates this as the source to the problem.

I am surprised and very unpleased to see that the removal of a single, empty 
directory can cause kernel-panics upon boot.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. # rm -rf /initrd
2. # reboot


Actual Results:  Kernel panic.

Expected Results:  Nothing, the scripts should be able to handle this.

Additional info:
Comment 1 Bill Nottingham 2002-12-18 21:23:34 EST
Don't Do That.

The directory is there for a reason; it's required for booting from an initrd.
Comment 2 Andy Herrero 2002-12-19 03:44:16 EST
I've mostly used RH7.0 which also boots off the ramdisk, but there was no directory called /initrd on that version. I could of course just accept that it's needed and so on, but I'm having a real hard time accepting the justification "The directory is there for a reason".

Could someone at least point me in the right direction when it comes to finding information regarding where the entire boot-procedure is documented for RH8.0?

Comment 3 Bill Nottingham 2002-12-19 10:46:07 EST
mkinitrd uses the pivot_root syscall to switch the root filesystem from the
initrd to the real root filesystem. To do this, it needs a place to move the
mount of the initrd to; that's what /initrd is for. If it's not there, the
changing of the root
FS fails.

Note You need to log in before you can comment on or make changes to this bug.