cancel
Showing results for 
Search instead for 
Did you mean: 

LINUX initrd

SOLVED
Go to solution
Dan Beeler_2
Occasional Advisor

LINUX initrd

This is what happened.

Current configuration:

Hardware: DL380
OS: Redhat 7.2
Kernel Release 2.4.7-10
Boot loader: GRUB

Problem: I'm trying to install a new kernel (2.4.22) and I keep getting errors when I attempt to boot. I think it is failing on the initrd.

Errors: unresolved symbol, mount error 19, pivotroot: pivot_root (/sysroot/sysroot/initrd) failed, kernel panic no init found.

I built the kernel without errors. Can someone please clue me in on what is going wrong.

I built a new initrd with the following:

mkinitrd /boot/initrd-2.4.22.img 2.4.22

Any help would be greatly appreciated.

Thanks,

---dan
15 REPLIES
Paulo A G Fessel
Trusted Contributor

Re: LINUX initrd

When creating the initrd, use the options "-v" to see which modules are going into your initrd. Compare this list with the modules in use by your 2.4.7 kernel - all modules that are present and related to storage/SCSI/filesystems should be on your ramdisk.

Could you send the output of mkinitrd -v and your list of modules?

TIA,
Paulo Fessel
L'employé propose, le boss dispose.
Dan Beeler_2
Occasional Advisor

Re: LINUX initrd

This the output from the mkinitrd -v

[root@datprod1 boot]#mkinitrd -v /boot/initrd-2.4.22.img 2.4.22
Using modules: ./kernel/drivers/block/cciss.o
Using loopback device /dev/loop0
/sbin/nash -> /tmp/initrd.lE5C4G/bin/nash
/sbin/insmod.static -> /tmp/initrd.lE5C4G/bin/insmod
`/lib/modules/2.4.22/./kernel/drivers/block/cciss.o' -> `/tmp/initrd.lE5C4G/lib/cciss.o'
Loading module cciss with options

Contents of /etc/modules.conf


[root@datprod1 boot]#cat /etc/modules.conf
#probeall bond0 eth0 eth2 bonding
#options bonding mode=1 miimon=100
alias parport_lowlevel parport_pc
alias scsi_hostadapter cciss
alias eth0 e1000
alias eth1 bcm5700
alias eth2 bcm5700
#alias bond0 bonding
Stuart Browne
Honored Contributor

Re: LINUX initrd

Alrighty then.. Show us your grub.conf.
One long-haired git at your service...
Alexander Chuzhoy
Honored Contributor

Re: LINUX initrd

maybe there were errors during compilation.
Try to recompile the kernel again
Stuart Browne
Honored Contributor

Re: LINUX initrd

Nope.. the PivotRoot stuff is where it's trying to mount the root filesystem.

This usually means that the kernel's 'initrd' isn't being addressed correctly, or wasn't created with the correct file-system modules (i.e. if it's an ext3 filesystem, initrd didn't include the ext3.0 module etc. etc.).

Thus why I asked for the contents of 'grub.conf' to ensure that the initrd is being used properly.
One long-haired git at your service...
Dan Beeler_2
Occasional Advisor

Re: LINUX initrd

Here's the /etc/grub.conf

[root@datprod1 boot]#cat /etc/grub.conf
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/cciss/c0d0p2
# initrd /initrd-version.img
#boot=/dev/cciss/c0d0
default=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.7-10enterprise)
root (hd0,0)
kernel /vmlinuz-2.4.7-10enterprise ro root=/dev/cciss/c0d0p2
initrd /initrd-2.4.7-10enterprise.img
title Red Hat Linux-smp (2.4.7-10smp)
root (hd0,0)
kernel /vmlinuz-2.4.7-10smp ro root=/dev/cciss/c0d0p2
initrd /initrd-2.4.7-10smp.img
title Red Hat Linux-up (2.4.7-10)
root (hd0,0)
kernel /vmlinuz-2.4.7-10 ro root=/dev/cciss/c0d0p2
initrd /initrd-2.4.7-10.img
title Red Hat Linux-smp (danzkernel smp)
root (hd0,0)
kernel /bzImage.danzkernel ro root=/dev/cciss/c0d0p2
initrd /initrd-2.4.7-10smp.img
Dan Beeler_2
Occasional Advisor

Re: LINUX initrd

Sorry,

I this is what the /etc/grub.conf looked like during boot. I also tried to boot the initrd from the kernel that I'm currently using (which is the last line of my previous post).

Again thanks for you help....

--dan


title Red Hat Linux-smp (danzkernel smp)
root (hd0,0)
kernel /bzImage.danzkernel ro root=/dev/cciss/c0d0p2
initrd /initrd-2.4.22.img
Paulo A G Fessel
Trusted Contributor

Re: LINUX initrd

Try to create your initrd adding the option
"--with=ext3" in your initrd.

Also, take a look at your modules.dep to see the dependency list both for cciss and ext3. If there is any, add them to the initrd with the same "--with=" option.

Don't forget to assign the points!

[]'s
Paulo Fessel
L'employé propose, le boss dispose.
Steven E. Protter
Exalted Contributor

Re: LINUX initrd

General recommendation:

Red Hat 7.3 upgrade.

Its the latest, the greatest and the most stable.

Specifically, this could be a problem with grub.conf and it might be an issue between the kernel and 7.x

I've had problems and had to freeze the Kernel on my 7.3 box seemingly because of the way I did software mirroring.

I'm going to have to move my business to the backup box and upgrade it to 9 anyway.

It is also possible that you've had a disk error at a critical place and the initrd file is corrupted.

Does it work when you boot off the prior kernel?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dan Beeler_2
Occasional Advisor

Re: LINUX initrd

The previous kernel boots just fine. No issues whatsoever.

When I try the --with=efs switch to mkinitrd I get the following:

mkinitrd --with=efs3 /boot/initrd-2.4.22 2.4.22
No module efs3 found for kernel 2.4.22

--dan
Paulo A G Fessel
Trusted Contributor

Re: LINUX initrd

Dan, four things:

* The module is called "ext3", not "efs";

* Please include the output of "lsmod" in the 2.4.7 kernel;

* Try also include the option "--with=cciss" BEFORE "--with=ext3". It's possible that the cciss is not being included into the initrd as it's not a SCSI device (from the kernel point of view) but a BLOCK device;

* Don't forget to assign the points!

HTH
Paulo Fessel
L'employé propose, le boss dispose.
Dan Beeler_2
Occasional Advisor

Re: LINUX initrd

Below is the output as you requested. I haven't got a clue about jbd...

Thanks for you help. I promise I will give points as soon as I get this resolved.

--dan

[root@datprod1 root]#mkinitrd --with=cciss --with=ext3 /boot/initrd-2.4.22 2.4.22
No module jbd found for kernel 2.4.22


[root@datprod1 root]#lsmod
Module Size Used by
ide-cd 27136 0 (autoclean)
cdrom 28736 0 (autoclean) [ide-cd]
loop 9648 0 (autoclean)
pcmcia_core 42688 0
autofs 12096 0 (autoclean) (unused)
nfs 83680 1 (autoclean)
lockd 53744 1 (autoclean) [nfs]
sunrpc 70000 1 (autoclean) [nfs lockd]
bcm5700 104416 1
e1000 67440 1
ipchains 41600 0
ext3 67728 3
jbd 44480 3 [ext3]
cciss 17712 4
sd_mod 11584 0 (unused)
scsi_mod 98512 1 [sd_mod]
[root@datprod1 root]#
Paulo A G Fessel
Trusted Contributor

Re: LINUX initrd

I think we're getting close. Try these switches on mkinitrd in this order:

"--with=cciss --with=jbd --with=ext3"

jbd is a module that is neccessary in order to ext3 works correctly. Make sure that it gets compiled when you make your kernel.

HTH
Paulo Fessel
L'employé propose, le boss dispose.
Dan Beeler_2
Occasional Advisor

Re: LINUX initrd

You can see I get an error that there is no module for jbd. Do I have to have this? Can I get this kernel to boot without having the ramdisk.

#mkinitrd --with=cciss --with=jbd --with ext3 /boot/initrd-2.4.22 2.4.22
No module jbd found for kernel 2.4.22
[root@datprod1 root]#


My situation is that I need to build support for the bonding drivers, but they don't appear to be supported on my kernel. I have to run 7.2 because it is the latest OS supported by BEA Weblogic.

Thanks again for you help!
--dan
Paulo A G Fessel
Trusted Contributor
Solution

Re: LINUX initrd

Dan,

Unless you're not using ext3 yes, jbd is neccessary. If it's not available on your system, then something hasn't been compiled correctly.

Here's part of lsmod for my firewall system, running Mandrake for PPC:

ext3 76272 3 (autoclean)
jbd 53808 3 (autoclean) [ext3]

Here you can see ext3 is loaded "on top" of jbd. As you can't copy jbd to your initrd as it doesn't exist, the ext3 can't be loaded as well and your file system will not mount.

Before rebooting, edit your fstab and change all your file system types which are "ext3" to "ext2". Then, use your original initrd and try to boot. I'm almost certain that your system will come online. If it's the case, then double-check your kernel parameters and ensure that both jbd and ext3 modules compile successfully.

To change your newly ext2 file systems converted back to ext3, make sure that jbd and ext3 are loaded and issue this command:

# tune2fs -j /dev/cciss/c0d0p2

HTH
Paulo Fessel
L'employé propose, le boss dispose.