cancel
Showing results for 
Search instead for 
Did you mean: 

LINUX initrd

 
SOLVED
Go to solution
Highlighted
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 15
Highlighted
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.
Highlighted
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
Highlighted
Honored Contributor

Re: LINUX initrd

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

Re: LINUX initrd

maybe there were errors during compilation.
Try to recompile the kernel again
Highlighted
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...
Highlighted
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
Highlighted
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
Highlighted
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.
Highlighted
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