Customizing the sample initrd.gz

Instead of finding out yourself, what you have to copy to /root/USBHD, you can make it the other way round. Download my sample initrd.gz to /root and unpack it to have an initrd file.

cd /root

wget http://www.linurs.org/download/initrd.gz

gunzip initrd.gz

Mount this file:

mount -t ext2 -o loop /root/initrd /mnt/initrd

Edit the files directly in /mnt/initrd. Then unmount /mnt/initrd and gzip -9 initrd. Now you find a customized initrd.gz.

Alternatively you can do

cp -R /mnt/initrd/* /root/USBHD

umount /mnt/initrd

and customize the files in /root/USBHD. Then start and do /root/mkinitrd to create a customized initrd.gz.

The following samples files will give you a good start for your customization:

initrd.gz

mkinitrd

Sample code for grub.conf one entry boots the system the other one ends up in a bash shell and is meant for debugging reasons.

default 0
timeout 5
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux <ver> linuxrc
root (hd0,0)
kernel /kernel-<ver>-gentoo root=/dev/ram0 init=/linuxrc rw
initrd /boot/initrd.gz

title=Gentoo Linux <ver> /bin/sh
root (hd0,0)
kernel /kernel-<ver>-gentoo root=/dev/ram0 init=/bin/sh rw
initrd /boot/initrd.gz

Linurs Servernest startpage