Changing initrd contents and grub

Richard Michael rmichael-fedora at edgeofthenet.org
Mon Jun 23 15:35:33 UTC 2008


Hello list,

I've changed my RAID and LVM configuration and need to modify the
respective commands in the /init of my initrd.

I made those changes by decompressing and extracting the cpio archive,
editting the init script (add a couple lines for mdadm, changed the
activated volume group name), rebuilt a cpio archive (using the correct
"-c"/"-H newc" SVR4 format) and fed it back through gzip (max
compression), then I just moved aside the old initrd, replacing it with
my new one:

mkdir /boot/tmp
cd !$
gzip -dc ../initrd-<version> | cpio -id
vi init
find . -depth -print | cpio -oc | gzip -9 > ../initrd-<version>.new 
cd ..
mv initrd-<version> initrd-<version>.orig
mv initrd-<version>.new initrd-<version>

The kernel now panics (paraphrase) "can't find /init".

It does not do this if I restore the original initrd.

I have not changed the name of the initrd, filenames match grub.conf and
grub's boot menu, etc.  I have done this type of modification
successfully in the past, but only changing a single character in /init.

So, it appears the kernel is not using my use initrd.  Perhaps it is not
prepared correctly (file magic for both new and old initrd files
suggests they are the same, however)?  Is grub involved somehow?
Perhaps it can't find my new initrd?

/boot is on a raid1 partition, ext2fs.  Grub knows about this, and the
system used to boot without problem.

Any advice?

Thanks,
Richard




More information about the fedora-list mailing list