Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   Kernel panic: initramfs problem? (http://www.linux-archive.org/debian-user/86261-kernel-panic-initramfs-problem.html)

Bill 05-12-2008 08:14 AM

Kernel panic: initramfs problem?
 
Hi folks,

I have to compile a vanilla kernel 2.6.25 to access a new wireless
module and keep things as small as possible on this old laptop.

So far so good. Everything compiles and all but I can't reboot
with the new kernel. Everything is fine using the 2.6.18.6 stock
kernel but the new one - no joy.

Google reveals plenty of similar error messages - but no
solutions. Might it be some sort of mount or ramdisk problem?


Here's the output from the last boot screen:

Begin: running /scripts/local-premount
kinit: name_to_dev_t(/dev/hda5) = (dev3,5)
kinit: trying to resume from /dev/hda5 [aka swap, hda1 is /]
PM: starting manual resume from /dev/hda5
kinit: no resume image, doing normal boot
resume: libcrypt version 1.2.3
resume: could not read the image
Done.
ReiserFS: hda1: found ReiserFS format "3.6" with standard journal
ReiserFS: hda1: using ordered Data mode
ReiserFS: hda1: journal params: device hda1, size 8192, journal
first block 18, max. trans len 1024, max. batch 900, max.
committ age 30, max. trans. age 30
ReiserFS: checking transactions log (hda1)
ReiserFS: using r5 hash to sort names
Begin: Running /scripts/local-bottom
Done.
Done.
Begin: Running /scripts/init-bottom
mount: mounting /dev on /root/dev failed: Invalid argument
Done.
run-init: making initramfs contents: Directory not empty
kernel-panic: not syncing : attempted to kill init!

Can anyone be of help diagnosing this problem. Any pointers
links or suggestions as to the cause much appreciated.

tia,

b.




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Hugo Vanwoerkom 05-12-2008 02:01 PM

Kernel panic: initramfs problem?
 
Bill wrote:

Hi folks,

I have to compile a vanilla kernel 2.6.25 to access a new wireless
module and keep things as small as possible on this old laptop.

So far so good. Everything compiles and all but I can't reboot
with the new kernel. Everything is fine using the 2.6.18.6 stock
kernel but the new one - no joy.

Google reveals plenty of similar error messages - but no
solutions. Might it be some sort of mount or ramdisk problem?



Here's the output from the last boot screen:

Begin: running /scripts/local-premount
kinit: name_to_dev_t(/dev/hda5) = (dev3,5)
kinit: trying to resume from /dev/hda5 [aka swap, hda1 is /]
PM: starting manual resume from /dev/hda5
kinit: no resume image, doing normal boot
resume: libcrypt version 1.2.3
resume: could not read the image
Done.
ReiserFS: hda1: found ReiserFS format "3.6" with standard journal
ReiserFS: hda1: using ordered Data mode
ReiserFS: hda1: journal params: device hda1, size 8192, journal
first block 18, max. trans len 1024, max. batch 900, max.
committ age 30, max. trans. age 30
ReiserFS: checking transactions log (hda1)
ReiserFS: using r5 hash to sort names
Begin: Running /scripts/local-bottom
Done.
Done.
Begin: Running /scripts/init-bottom
mount: mounting /dev on /root/dev failed: Invalid argument
Done.
run-init: making initramfs contents: Directory not empty
kernel-panic: not syncing : attempted to kill init!

Can anyone be of help diagnosing this problem. Any pointers
links or suggestions as to the cause much appreciated.



Sid, Etch, Lenny?
2.6.25 is out in Sid.

Hugo




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Mike Bird 05-12-2008 03:18 PM

Kernel panic: initramfs problem?
 
On Mon May 12 2008 01:14:04 Bill wrote:
> run-init: making initramfs contents: Directory not empty
> kernel-panic: not syncing : attempted to kill init!
>
> Can anyone be of help diagnosing this problem. Any pointers
> links or suggestions as to the cause much appreciated.

First thing I'd check is that the initramfs built successfully.
We've had a number of failures over the years where the /boot
partition became full and the resulting initramfs was corrupt.
Check, for example, that the initramfs is about the same size
as other initramfs's in /boot or on similar systems.

--Mike Bird


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Andrew Sackville-West 05-12-2008 04:49 PM

Kernel panic: initramfs problem?
 
On Mon, May 12, 2008 at 01:14:04AM -0700, Bill wrote:
> Hi folks,

> Begin: Running /scripts/init-bottom
> mount: mounting /dev on /root/dev failed: Invalid argument
> Done.
> run-init: making initramfs contents: Directory not empty
> kernel-panic: not syncing : attempted to kill init!

I would focus on that failed mount command. Look in
/usr/share/initramfs-tool/scripts/init-bottom/ and you will find some
scripts. Pick through the sh code looking for the appropriate mount
statement. See if you can debug that thing.

I've mentioned this before, but I don't have clear evidence that it's
not my fault and so haven't pursued it closely (time is a factor as
well). Namely, several of the commands appear to be broken or at
least "different" in the current crop of initrds. I see this cropping
up in my custom boot scripts that unlock luks partitions in
particular. at least mount and sed aren't working properly (as I'd
expect anyway). There may be others.

A

Alex Samad 05-12-2008 09:57 PM

Kernel panic: initramfs problem?
 
On Mon, May 12, 2008 at 09:49:17AM -0700, Andrew Sackville-West wrote:
> On Mon, May 12, 2008 at 01:14:04AM -0700, Bill wrote:
> > Hi folks,
>
> > Begin: Running /scripts/init-bottom
> > mount: mounting /dev on /root/dev failed: Invalid argument
> > Done.
> > run-init: making initramfs contents: Directory not empty
> > kernel-panic: not syncing : attempted to kill init!
>
> I would focus on that failed mount command. Look in
> /usr/share/initramfs-tool/scripts/init-bottom/ and you will find some
> scripts. Pick through the sh code looking for the appropriate mount
> statement. See if you can debug that thing.
>
> I've mentioned this before, but I don't have clear evidence that it's
> not my fault and so haven't pursued it closely (time is a factor as
> well). Namely, several of the commands appear to be broken or at
> least "different" in the current crop of initrds. I see this cropping
> up in my custom boot scripts that unlock luks partitions in
> particular. at least mount and sed aren't working properly (as I'd
> expect anyway). There may be others.
>
> A
I found it helpful to place busbox entries in certain places (rebuild
the initramfs) and work through the scripts by hand then you can see
what is happening and maybe fix on the fly



--
I know not with what weapons World War III will be fought, but World
War IV will be fought with sticks and stones.
-- Albert Einstein

Bill 05-12-2008 10:06 PM

Kernel panic: initramfs problem?
 
On Mon, 2008-12-05 at 09:01 -0500, Hugo Vanwoerkom wrote:
> Sid, Etch, Lenny?
> 2.6.25 is out in Sid.

Etch. Production.

b.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Bill 05-13-2008 08:57 AM

Kernel panic: initramfs problem?
 
On Mon, 2008-12-05 at 08:18 -0700, Mike Bird wrote:
> First thing I'd check is that the initramfs built successfully.
> We've had a number of failures over the years where the /boot
> partition became full and the resulting initramfs was corrupt.
> Check, for example, that the initramfs is about the same size
> as other initramfs's in /boot or on similar systems.

OK.

The root (boot) partition has 500Mib unused.

initrd.img-2.6.18-6-686 is 4899969 bytes in size (generic kernel)
initrd.img-2.6.25-ath5k is 2362874 bytes in size (vanilla kernel)
intird.img-2.6.17-smp1a is 1232896 bytes in size (different system)

So it looks like this built large enough.
But did it build correctly? How to find out?

Might I be compiling too much or too little in the new kernel?
Following up on the initrd idea....

.../src/linux/Documentation/initrd.txt says....
<snip>
Second, the kernel has to be compiled with RAM disk support and
with support for the initial RAM disk enabled. Also, at least
all components needed to execute programs from initrd (e.g.
executable format and file system) must be compiled into the
kernel.
</snip>


Help info available through make menuconfig for
General Setup/Initial Ram Filesystem says.....
<snip>
CONFIG_BLK_DEV_INITRD:
The initial RAM filesystem is a ramfs which is loaded by the
boot loader (loadlin or lilo) and that is mounted as root
before the normal boot procedure. It is typically used to
load modules needed to mount the "real" root file system,
etc. See <file:Documentation/initrd.txt> for
details.
If RAM disk support (BLK_DEV_RAM) is also included, this
also enables initial RAM disk (initrd) support and adds
15 Kbytes (more on some other architectures) to the kernel size.
If unsure say Y.
</snip>


And again the make menucofig help info for
Device Drivers/Block Devices/Ram Disk Support says....
<snip>
CONFIG_BLK_DEV_RAM:
Saying Y here will allow you to use a portion of your RAM memory
as a block device, so that you can make file systems on it,
read and write to it and do all the other things that you can
do with normal block devices (such as hard drives). It is
usually used to load and store a copy of a minimal root file
system off of a floppy into RAM during the initial install of
Linux.
...
Most normal users won't need the RAM disk functionality, and can
thus say N here.
</snip>

Confusing eh?

So the first kernel was with BDI configured and BDR not.
I made a second attempt with both configured. This also failed
with the same error messages. The third attempt was with
both options not set and no --initrd option on the make-kpkg
command. This succeeded. The kernel booted and the system
came up past the desktop login. The mouse is frozen but that's
a second problem I think. I am able to log into a console and
have a functional command line system.

It would indeed seem to be some sort of initrd problem,
although I have no idea what. I know millions use
initrd without a problem but ..... If anyone wants to look
at the kernels, .config files or initrd.img files drop me
a line in the next few days before I delete them. My next
task is to get the desktop up and the new module working.
Perhaps I can fine tune things later.

Thanks for the help everyone.

b.




--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Andrew Sackville-West 05-15-2008 03:01 AM

Kernel panic: initramfs problem?
 
On Tue, May 13, 2008 at 07:57:30AM +1000, Alex Samad wrote:
> On Mon, May 12, 2008 at 09:49:17AM -0700, Andrew Sackville-West wrote:
> > On Mon, May 12, 2008 at 01:14:04AM -0700, Bill wrote:
> > > Hi folks,
> >
> > > Begin: Running /scripts/init-bottom
> > > mount: mounting /dev on /root/dev failed: Invalid argument
> > > Done.
> > > run-init: making initramfs contents: Directory not empty
> > > kernel-panic: not syncing : attempted to kill init!
> >
> > I would focus on that failed mount command. Look in
> > /usr/share/initramfs-tool/scripts/init-bottom/ and you will find some
> > scripts. Pick through the sh code looking for the appropriate mount
> > statement. See if you can debug that thing.
> >
> > I've mentioned this before, but I don't have clear evidence that it's
> > not my fault and so haven't pursued it closely (time is a factor as
> > well). Namely, several of the commands appear to be broken or at
> > least "different" in the current crop of initrds. I see this cropping
> > up in my custom boot scripts that unlock luks partitions in
> > particular. at least mount and sed aren't working properly (as I'd
> > expect anyway). There may be others.
> >
> > A
> I found it helpful to place busbox entries in certain places (rebuild
> the initramfs) and work through the scripts by hand then you can see
> what is happening and maybe fix on the fly

++ that

very helpful. I need to dig into mine again and see if anything has
been fixed by updates. I've been running crippled versions of some of
my scripts because of weird bits with mount not working properly...

A


All times are GMT. The time now is 05:26 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.