1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 <refentrytitle>geninitrd</refentrytitle>
7 <manvolnum>8</manvolnum>
8 <refmiscinfo class="software">PLD</refmiscinfo>
9 <refmiscinfo class="date">$Date: 2003/04/09 11:40:39 $</refmiscinfo>
12 <refname>geninitrd</refname>
14 creates initial ramdisk images for preloading modules
19 <command>geninitrd</command>
22 <arg rep="repeat">--with=module</arg>
23 <arg rep="repeat">--preload=module</arg>
24 <arg>--fstab=fstab</arg>
25 <arg>--raidtab=raidtab</arg>
26 <arg>--lvmtoolsversion=1|2</arg>
27 <arg>--modules-conf=modules.conf</arg>
28 <arg>--fs=rom|ext2|cram</arg>
29 <arg>--with-insmod-static</arg>
30 <arg choice="req">image</arg>
31 <arg choice="req">kernel-version</arg>
34 <command>geninitrd</command>
40 <title>Description</title>
42 <application>geninitrd</application> creates filesystem images
43 which are suitable for use as Linux initial ramdisk (initrd)
44 images. Such images are often used for preloading the block
45 device modules (such as IDE, SCSI or RAID) which are needed to
46 access the root filesystem. <application>geninitrd</application>
47 automatically loads all <varname>scsi_hostadapter</varname>
48 entries in <filename>/etc/modules.conf</filename> when it finds
49 that root fs is mounted on SCSI device, which makes it simple to
50 build and use kernels using modular SCSI devices. It will also
51 load IDE and RAID modules when needed. </para>
52 <para>Any module options specified in
53 <filename>/etc/modules.conf</filename> are passed to the modules
54 as they are loaded by the initial ramdisk. </para>
55 <para>If the root filesystem is modular, initrd will automatically
56 add the filesystem's modules to the initrd image.</para>
58 <!-- <para>If the root device is on a loop device (such as
59 <filename>/dev/loop0</filename>), <application>geninitrd</application>
60 will attempt to build an initrd which sets up the loopback file
61 properly. To do this, the fstab must contain a comment of the form:
63 # LOOP0: /dev/hda1 vfat /linux/rootfs
65 LOOP0 must be the name of the loop device which needs to be configured, in
66 all capital lettes. The parameters after the color are the device which
67 contains the filesystem with the loopback image on it, the filesystem which
68 is on the device, and the full path to the loopback image.
72 <title>Options</title>
78 <para>Allows <application>geninitrd</application> to
79 overwrite an existing image file.</para>
83 <term>--fstab=<filename>fstab</filename></term>
85 <para>Use <filename>fstab</filename> to automatically
86 determine what type of filesystem the root device is on.
87 Normally, <filename>/etc/fstab</filename> is used.</para>
91 <term>--raidtab=<filename>raidtab</filename></term>
93 <para>Use <filename>raidtab</filename> to automatically
94 determine raid settings of the root device. Normally,
95 <filename>/etc/raidtab</filename> is used.</para>
99 <term>--ifneeded</term>
101 <para>Only builds the image if their are modules that need
102 to be loaded at boot time.</para>
106 <term>--image-version</term>
108 <para>Append kernel version to initrd name.</para>
112 <term>--nocompress</term>
114 <para>Don't compress initrd.</para>
118 <term>-(hack)-no-bsp</term>
120 <para>Don't use Braindamaged Script Processor (/bin/bsp) and use /bin/trash instead.</para>
124 <term>--preload=<filename>module</filename></term>
126 <para>Load the module <filename>module</filename> in the
127 initial ramdisk image. The module gets loaded before any
128 SCSI modules which are specified in
129 <filename>/etc/modules.conf</filename>. This option may be
130 used as many times as necessary.
135 <term>--with=<filename>module</filename></term>
137 <para>Alias to --preload.</para>
143 <para>Prints out verbose information while creating the
144 image (normally the <application>geninitrd</application>
150 <term>--version</term>
152 <para>Prints the version of
153 <application>geninitrd</application> that's being used and
158 <term>--initrdfs=<filename>ext2|rom|cram</filename></term>
160 <para>Filesystem type to be used for the image. Only
161 selected filesystem should always be compiled into
166 <term>--with-insmod-static</term>
168 <para>Use <filename>/sbin/insmod.static</filename> insteed of <command>bsp</command> bulitin insmod.</para>
172 <term>--lvmtoolsversion=1|2</term>
174 <para>Tell which version of LVM tools are used.</para>
180 <title>SCSI support</title>
182 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).
186 <title>ATA RAID support</title>
188 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.
190 <para>For eg. if you have Promise FastTrack controler then add "alias ataraid_hostadapter pdcraid" to /etc/modules.conf.</para>
193 <title>Linux 2.6.x support</title>
194 <para>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.
198 <title>Hardware RAID support</title>
200 geninitrd support following RAID controlers:
212 <term><filename>/etc/sysconfig/geninitrd</filename></term>
214 <para>Configuraton file with default options. Putting proper
215 options there helps in automatic creation of initrd eg. on
222 class="devicefile">/dev/loop*</filename></term>
224 <para>A block loopback device is used to create the image,
225 which makes this script useless on systems without block
226 loopback support available.
231 <term><filename>/etc/modules.conf</filename></term>
233 <para>Specified SCSI modules to be loaded and module options
240 <title>SEE ALSO</title>
242 <refentrytitle>fstab</refentrytitle>
243 <manvolnum>5</manvolnum>
246 <refentrytitle>insmod</refentrytitle>
247 <manvolnum>1</manvolnum>
250 <refentrytitle>grub</refentrytitle>
251 <manvolnum>8</manvolnum>
254 <refentrytitle>lilo</refentrytitle>
255 <manvolnum>8</manvolnum>
258 <refentrytitle>genromfs</refentrytitle>
259 <manvolnum>8</manvolnum>
264 <title>Authors</title>
265 <para><application>geninitrd</application> is based on mkinitrd by
266 Erik Troan <email>ewt(at)redhat.com</email> and contributors:
268 <member>Elliot Lee <email>sopwith(at)cuc.edu</email>, </member>
269 <member> Miguel de Icaza
270 <email>miguel(at)nuclecu.unam.mx</email>, </member>
271 <member>Christian 'Dr. Disk' Hechelmann
272 <email>drdisk(at)ds9.au.s.shuttle.de</email>, </member>
273 <member>Michael K. Johnson
274 <email>johnsonm(at)redhat.com</email>, </member>
275 <member>Pierre Habraken
276 <email>Pierre.Habraken(at)ujf-grenoble.fr</email>, </member>
277 <member>Jakub Jelinek
278 <email>jj(at)ultra.linux.cz</email>, </member>
279 <member>Carlo Arenas Belon
280 <email>carenas(at)chasqui.lared.net.pe</email>.</member>
283 <para><application>geninitrd</application> is writen by Jacek
284 Konieczny <email>jajcus(at)pld-linux.org</email> and contributors (in
285 alphabetic order): <simplelist>
286 <member>Witold Filipczyk <email>witekfl(at)poczta.onet.pl</email>, </member>
287 <member>Artur Frysiak <email>wiget(at)pld-linux.org</email>, </member>
288 <member>Dariusz Karolczak <email>inglod(at)pld-linux.org</email>, </member>
289 <member>Tomasz Kloczko <email>kloczek(at)pld.org.pl</email>, </member>
290 <member>Arkadiusz Miskiewicz <email>arekm(at)pld-linux.org</email>, </member>
291 <member>Michal Moskal <email>malekith(at)pld-linux.org</email>, </member>
292 <member>Jan Rekorajski <email>baggins(at)pld-linux.org</email>, </member>
293 <member>Sebastian Zagrodzki <email>zagrodzki(at)pld-linux.org</email>, </member>
294 <member>Michal Zawalich <email>michuz(at)pld-linux.org</email>.</member>
297 <para> Manual page for <application>geninitrd</application> is
298 based on mkinitrd.8 by Erik Troan <email>ewt(at)redhat.com</email>
299 and writen by Jacek Konieczny
300 <email>jajcus(at)pld-linux.org</email> and contributors.</para>
303 <!-- vim61: set fileencoding=utf-8 : -->