Additional modules to pass to mkinitrd, separated by colons (:)\&.
.RE
.PP
\fB\-l | \-\-lilo\fR
.RS4
Only show lilo\&.conf section (requires a kernel_filename)\&.
.RE
.PP
\fB\-r | \-\-run\fR
.RS4
Only show
\fImkinitrd\fR
command\&.
.RE
.SH"DESCRIPTION"
.sp
This script is useful in situations where you require an initrd image to boot your computer\&.
.sp
For instance, when booting a kernel that does not have support for your storage or root filesystem built in (such as the Slackware \fIgeneric\fR kernels)\&.
.sp
When you run the script without parameters, it will examine your running system, your current kernel version and will output an example of a \fImkinitrd\fR commandline that you can use to generate an initrd image containing enough driver support to boot the computer\&.
.sp
You can make it more specific: when you add the filename of a kernel as parameter to the script, it will determine the kernel version from that kernel, and also give an example of the lines that you should add to your \fI/etc/lilo\&.conf\fR file\&.
.sp
If you want your initrd image to have a custom name instead of the default \fI/boot/initrd\&.gz\fR you can add it as another parameter to the script, as follows:
The arguments to the \fI\-a\fR parameter will be used as additional arguments to the \fImkinitrd\fR command\&.
.sp
If you need additional modules in the initrd image, apart from what the script determines, you can pass then to the script using the \fI\-m\fR parameter as follows:
The above example adds support for USB keyboards to the initrd \- you may need that if you have encrypted your root partition and need to enter a passphrase using a USB keyboard\&.
.sp
Instead of copying and pasting the script\(cqs output, you can create an initrd by directly executing the output, like in this example:
That used the \fI\-r\fR or \fI\-\-run\fR switch to make the script only write the \fImkinitrd\fR commandline to the terminal\&.
.sp
When you want to add a section for a specific kernel to \fI/etc/lilo\&.conf\fR directly, use the \fI\-l\fR or \fI\-\-lilo\fR switch and use a command like in this example:
That command will result in the following lines being added to your \fI/etc/lilo\&.conf\fR file (example for my hardware):
.sp
.ifn\{\
.RS4
.\}
.nf
\fI# Linux bootable partition config begins\fR
\fI# initrd created with \*(Aqmkinitrd \-c \-k 4\&.4\&.1 \-m mbcache:jbd2:ext4 \-f ext4 \-r /dev/sda7 \-u \-o /boot/initrd\&.gz\fR\*(Aq
image = /boot/vmlinuz\-generic\-4\&.4\&.1
initrd = /boot/initrd\&.gz
root = /dev/sda7
label = 4\&.4\&.1
read\-only
\fI# Linux bootable partition config ends\fR
.fi
.ifn\{\
.RE
.\}
.sp
The last two examples show how easy it is to configure your computer for the use of an initrd if you need one\&. The only thing left to do afterwards is running \fIlilo\fR\&.