Developer's Daily Unix by Example
  main | java | perl | unix | dev directory | web log
 
 
Main
Unix
Man Pages
   

MKINITRD

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
FILES
SEE ALSO
AUTHOR

NAME

mkinitrd ? creates initial ramdisk images for preloading modules

SYNOPSIS

mkinitrd [-fv] [--with=module] [--preload=module] [--omit-scsi-modules] [--omit-raid-modules] [--version] [--fstab=fstab] image kernel-version

DESCRIPTION

mkinitrd 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 SCSI or RAID) which are needed to access the root filesystem. mkinitrd automatically loads all scsi_hostadapter entries in /etc/conf.modules, which makes it simple to build and use kernels using moduler SCSI devices.

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

If the root device is on a loop device (such as /dev/loop0), mkinitrd will attempt to build an initrd which sets up the loopback file properly. To do this, the fstab must contain a comment of the form:

# LOOP0: /dev/hda1 vfat /linux/rootfs

LOOP0 must be the name of the loop device which needs to be configured, in all capital lettes. The parameters after the color are the device which contains the filesystem with the loopback image on it, the filesystem which is on the device, and the full path to the loopback image. If the filesystem is modular, initrd will automatically add the filesystem’s modules to the initrd image.

OPTIONS

-f

Allows mkinitrd 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.

-?omit-scsi-modules

Do not load any scsi modules, including ’scsi_mod’ and ’sd_mod’ modules, even if they are present.

-?omit-raid-modules

Do not load any raid modules, even if /etc/fstab and /etc/raidtab expect them.

-?preload=module

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

-v

Prints out verbose information while creating the image (normally the mkinitrd runs silently).

-?version

Prints the version of mkinitrd that’s being used and then exits.

-?with=module

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

FILES

/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/conf.modules

Specified SCSI modules to be loaded and module options to be used.

SEE ALSO

fstab(5), insmod(1), kerneld(8), lilo(8)

AUTHOR

Erik Troan <ewt@redhat.com>

copyright 1998-2007, devdaily.com, all rights reserved.
devdaily.com, an alvin j. alexander production.