PDA

View Full Version : How do you recreate initrd?



hbomb
04-09-2004, 06:36 PM
I accidentally removed my /boot/initrd.gz and now my Knoppix install won't boot.

The error I get at boot time is:

kmod: failed to exec /sbin/modprobe -s -k block-major-8, errno = 2
VFS: Cannot open root device "802" or 08:02
Pelase append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 08:02

This is the stock 2.4.24-xfs kernel and I tried recreating it by running "mkinitrd -o /boot/initrd /lib/modules/2.4.24-xfs" but that doesn't appear to be the same way the original initrd was created.

Does anyone know how the original /boot/initrd was created?

Thanx

Durand Hicks
04-09-2004, 07:51 PM
Did you run lilo? I have a feeling lilo is missing, thus it can't find the boot block. As for initrd.gz, you could copy the one from the cd to your hard drive, but I don't know if that'll work. I think it's the same or failing that, boot with your cd, mount your hd install partition, and chroot to it. Then try the mkinitrd command that way. I've never used that command, as I've always complied my kernels the debian way.

HTH,

Durand

hbomb
04-09-2004, 08:44 PM
Did you run lilo? I have a feeling lilo is missing, thus it can't find the boot block. As for initrd.gz, you could copy the one from the cd to your hard drive, but I don't know if that'll work. I think it's the same or failing that, boot with your cd, mount your hd install partition, and chroot to it. Then try the mkinitrd command that way. I've never used that command, as I've always complied my kernels the debian way.


Thanks for the reply,

Yes, I've rerun lilo and with the initrd not there, you obviously have to remove the 'initrd' line in that stanza for lilo to run successfully. But without that line, it kernel panics and with it in there and pointing to the new initrd that I created, it still causes a kernel panic.

I've compiled kernels hundreds of times, but don't have a clue as to why the mkinitrd process I've used in the past isn't working now (which is why I'm wondering just how the stock initrd was created). :/

fingers99
04-11-2004, 12:25 AM
Never done it. Does this help?

http://www.edseek.com/archives/000042.html