Bug 79982 - Panics upon boot when /initrd is missing.
Summary: Panics upon boot when /initrd is missing.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 8.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-12-18 12:24 UTC by Andy Herrero
Modified: 2014-03-17 02:33 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-12-19 02:23:34 UTC
Embargoed:


Attachments (Terms of Use)

Description Andy Herrero 2002-12-18 12:24:29 UTC
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:
Always

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-19 02:23:34 UTC
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 08:44:16 UTC
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?

Thanks.

Comment 3 Bill Nottingham 2002-12-19 15:46:07 UTC
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.