Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 131195 - Mkinitrd hangs after "Switching to new root"
Mkinitrd hangs after "Switching to new root"
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
powerpc Linux
medium Severity high
: ---
: ---
Assigned To: Jeremy Katz
Depends On:
Blocks: FC3Target
  Show dependency treegraph
Reported: 2004-08-28 17:32 EDT by W. Michael Petullo
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: mkinitrd-4.1.11-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-11 22:38:41 EDT
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 W. Michael Petullo 2004-08-28 17:32:00 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.2)
Gecko/20040809 Epiphany/1.3.5

Description of problem:
After using mkinitrd-4.1.8-1 to create an initrd, my system hangs
following "Switching to new root" message.

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

How reproducible:

Steps to Reproduce:
1.  Install mkinitrd-4.1.8-1.
2.  Regenerate my initrd.
3.  Reboot.

Actual Results:  System hangs.  I added some printfs to nash and the
hang seems to happen inside the getKernelCmdLine() function that is
called by switchrootCommand().  The hang happens immediately following
"buf = malloc(CMDLINESIZE);"

The getKernelCmdLine() function is also called earlier by the
mkrootdevCommand(), which does not have any trouble.

Perhaps there is some type of heap corruption that is causing "buf =
malloc(CMDLINESIZE);" to die.

I would love to run nash through valgrind but I don't have an x86 machine.

Additional info:
Comment 1 W. Michael Petullo 2004-08-28 17:39:32 EDT
I should have been more clear that I am having this problem on a
PowerPC-based iBook.
Comment 2 W. Michael Petullo 2004-09-03 17:55:30 EDT
It seems that the definition of CMDLINESIZE may cause this.  Nash.c
defines CMDLINESIZE like this:

#ifdef __powerpc__
#define CMDLINESIZE 256
#define CMDLINESIZE 1024

However, the kernel's include/asm-ppc/setup.h defines

When I change CMDLINESIZE from 256 to 512, I don't have any trouble.  

The odd thing is that the read call only reads 31 bytes of command
line on my system.  I don't see why changing CMDLINESIZE from 256 to
512 would fix things but it seems to.  I'm still not convinced there
isn't some memory issue elsewhere.
Comment 3 Jeremy Katz 2004-09-10 17:30:54 EDT
Found one little thing with valgrind, it's in 4.1.11 (maybe it'll help...)

Could you try with 4.1.11 (http://people.redhat.com/~katzj/mkinitrd/
will have the package when it's done) and see if that helps?
Comment 4 W. Michael Petullo 2004-09-11 22:38:41 EDT
4.1.11's nash no longer hangs as described above.

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