GENINITRD(8)

NAME
geninitrd - creates initial ramdisk images for preloading modules

SYNOPSIS

geninitrd [-f] [-v] [--with=module...] [--preload=module...] [--fstab=fstab] [--lvmtoolsversion=1|2] [--modules-conf=modules.conf] [--fs=rom|ext2|cram] [--with-insmod-static] {image} {kernel-version}

geninitrd [--version]

DESCRIPTION

 geninitrd creates filesystem images which are suitable for use as Linux initial ramdisk (initrd) images. Such images are often used for preloading the block device modules (such as IDE, SCSI or RAID) which are needed to access the root filesystem. geninitrd automatically loads all scsi_hostadapter entries in /etc/modules.conf when it finds that root fs is mounted on SCSI device, which makes it simple to build and use kernels using modular SCSI devices. It will also load IDE and RAID modules when needed.

Any module options specified in /etc/modules.conf are passed to the modules as they are loaded by the initial ramdisk.

If the root filesystem is modular, initrd will automatically add the filesystem's modules to the initrd image.

OPTIONS

-f  Allows geninitrd to overwrite an existing image file.

--fstab=fstab
    Use fstab to automatically determine what type of filesystem the root device is on. Normally, /etc/fstab is used.

--ifneeded
    Only builds the image if their are modules that need to be loaded at boot time.

--image-version
    Append kernel version to initrd name.

--nocompress
    Don't compress initrd.

--preload=module
    Load the module module in the initial ramdisk image. The module gets loaded before any SCSI modules which are specified in /etc/modules.conf. This option may be used as many times as necessary.

--with=module
    Alias to --preload.

-v  Prints out verbose information while creating the image (normally the geninitrd runs silently).

--version
    Prints the version of geninitrd that's being used and then exits.

--initrdfs=ext2|rom|cram
    Filesystem type to be used for the image. Only selected filesystem should always be compiled into kernel.

--with-insmod-static
    Use /sbin/insmod.static insteed of bsp bulitin insmod.

--lvmtoolsversion=1|2
    Tell which version of LVM tools are used.

SCSI SUPPORT

If geninitrd detect rootfs on SCSI disk then lookup for "scsi_hostadapter" alias in /etc/modules.conf file and use it to load proper SCSI low-level driver(s).

ATA RAID SUPPORT

If geninitrd detect rootfs on ATA RAID then lookup for "ataraid_hostadapter" alias in /etc/modules.conf and use it to load proper ATA RAID low level driver.

For eg. if you have Promise FastTrack controler then add "alias ataraid_hostadapter pdcraid" to /etc/modules.conf.

LINUX 2.6.X SUPPORT

To bulild initrd for Linux 2.6.x kernels you must have module-init-tools and use --with-insmod-static switch or use initrd version of recent busybox that comes in busybox-initrd package.

FILES

/etc/sysconfig/geninitrd
    Configuraton file with default options. Putting proper options there helps in automatic creation of initrd eg. on kernel upgrade.

/dev/loop*
    A block loopback device is used to create the image, which makes this script useless on systems without block loopback support available.

/etc/modules.conf
    Specified SCSI modules to be loaded and module options to be used.

SEE ALSO

fstab(5) insmod(1) grub(8) lilo(8) genromfs(8)

AUTHORS

geninitrd is based on mkinitrd by Erik Troan <ewt(at)redhat.com> and contributors: Elliot Lee <sopwith(at)cuc.edu>, Miguel de Icaza <miguel(at)nuclecu.unam.mx>, Christian 'Dr. Disk' Hechelmann <drdisk(at)ds9.au.s.shuttle.de>, Michael K. Johnson <johnsonm(at)redhat.com>, Pierre Habraken <Pierre.Habraken(at)ujf-grenoble.fr>, Jakub Jelinek <jj(at)ultra.linux.cz>, Carlo Arenas Belon <carenas(at)chasqui.lared.net.pe>.

geninitrd is written by Jacek Konieczny <jajcus(at)pld-linux.org> and contributors (in alphabetic order): Witold Filipczyk <witekfl(at)poczta.onet.pl>, Artur Frysiak <wiget(at)pld-linux.org>, Dariusz Karolczak <inglod(at)pld-linux.org>, Tomasz Kloczko <kloczek(at)pld.org.pl>, Arkadiusz Miskiewicz <arekm(at)pld-linux.org>, Michal Moskal <malekith(at)pld-linux.org>, Jan Rekorajski <baggins(at)pld-linux.org>, Sebastian Zagrodzki <zagrodzki(at)pld-linux.org>, Michal Zawalich <michuz(at)pld-linux.org>.

Manual page for geninitrd is based on mkinitrd.8 by Erik Troan <ewt(at)redhat.com> and written by Jacek Konieczny <jajcus(at)pld-linux.org> and contributors.