# Initrd generator for RedHat Linux # (c) Murty Rompalli # # This document is a computer program and is licensed to you under # GNU General Public License. # # By using this document in any way, you agree to abide by the license # agreement. If you do not agree, this document and all copies of this document # in your direct/indirect posession must be destroyed immediately. # If you do not completely agree, you should not access this document by any # means and should not store or use this document in any form. # # A complete copy of the GNU General Public License agreement may be obtained # by accessing Internet Website Address: http://www.gnu.org/licenses/gpl.txt # or by writing to: Free Software Foundation, Inc., 59 Temple Place - # Suite 330, Boston, MA 02111-1307, USA # # Permission to use, copy, distribute this document for any purpose is hereby # granted, provided that the author's name ( Murty Rompalli ) and this notice # appear in all copies and/or supporting documents; and that an unmodified # version of this document is made freely available. This document is # distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, # either expressed or implied. While every effort has been taken to ensure the # accuracy of the information documented herein, the author assumes NO # RESPONSIBILITY for any errors, or for any damages, direct or consequential, # as a result of the use of the information documented herein. INITRD=initrdsmp.img # Choose a valid version number for which kernel exists # in /boot directory # To check what version kernel you are in, type: uname -r KERNELVERSION=2.4.18-3smp #Uncomment the following line ONLY if you are booted into # RAMDISK, i.e., at the end of installing RedHat, your root is # mounted on /mnt/sysimage instead of / # #PREFIX=/mnt/sysimage if [ "x$PREFIX" = "x" ] then PREFIXCOMMAND=" " else PREFIXCOMMAND="/mnt/sysimage/usr/sbin/chroot /mnt/sysimage" fi if [ -f $PREFIX/boot/vmlinuz-$KERNELVERSION ] then # --preload loads the module BEFORE loading scsi_host_adapter,raid # modules if listed in /etc/modules.conf # --with loads the module AFTER loading scsi_host_adapter,raid # modules if listed in /etc/modules.conf # Use --omit-scsi-modules to force omiting loading # scsi_host_adapter,raid modules if listed in /etc/modules.conf [ -f $PREFIX/boot/$INITRD ] || echo Creating $PREFIX/boot/$INITRD for $KERNELVERSION kernel $PREFIXCOMMAND /sbin/mkinitrd \ --preload jbd \ --preload ext3 \ --preload scsi_mod \ --with ft \ /boot/$INITRD $KERNELVERSION else echo Invalid Kernel $PREFIX/boot/vmlinuz-$KERNELVERSION exit fi