#!/bin/sh # # Creating an /boot/initrd-custom.gz # ----------------------------------- # # Original Script # ---------------- # http://Linux-Boot.net/InitRD/Scripts/initrd-howto.sh # # # Other URLs # ---------- # http://Linux-Boot.net/InitRD/HOWTO # http://www.tLDP.org/HOWTO/Kernel-HOWTO-11.html # http://www.opennet.ru/docs/HOWTO/Kernel-HOWTO-11.html # # # 21-Jan-05 amo Date-of-Birth # # # # mkinitrd Method: # --------------- # # < initrd.img > < kernel > # mkinitrd /boot/initrd-2.4.29.img 2.4.29 # # # # ======================================== # Directory Tree for the initrd # ======================================== # mkdir /tmp/initrd # cd /tmp # # KERNEL=`uname -r` # # # a little clearer for initrd's temporary directories tree # mkdir initrd/bin mkdir initrd/etc mkdir -p initrd/lib/modules mkdir initrd/dev mkdir initrd/loopfs # # # sash is standalone shell # bash is bigger and needs additional libraries # cp -dapr /bin/*mod* /bin/sash initrd/bin cp -dpar /dev/console /dev/null initrd/dev cp -dapr /dev/ram /dev/ram? initrd/dev # cp -dpar /dev/systty initrd/dev cp -dpar /dev/tty? initrd/dev # # # # Fill the initrd with the desired modules # ======================================== # # # # the required modules you specify are loaded by initrd/linuxrc # # cp -dpar /lib/modules/$KERNEL/scsi/aic7xxx.o initrd/lib # # # the entire modules tree for the kernel # cp -dpar /lib/modules/$KERNEL initrd/lib/modules # # # ===================== # Create the /linurc # ===================== # cat initrd/linuxrc < /boot/initrd-2.4.29.custom.gz # # # ================================================================= # Now Fix LILO to use the new initrd and install the custom initrd # ================================================================= # # root# vi /etc/lilo.conf # # # boot=/dev/sda # # # prompt # timeout = 50 # # compact # # # # vga = extended # # # lba32 # read-only # # # image = /boot/vmlinuz-2.4.29 # initrd = /boot/initrd-2.4.29.custom.gz # label = Linux-2.4.29 # root = /dev/sda1 # # # # root# lilo # # End of file