231 lines
5.3 KiB
HTML
231 lines
5.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of MKINITRAMFS</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>MKINITRAMFS</H1>
|
|
Section: System Administration (8)<BR>Updated: 2018/07/18<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<P>
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
mkinitramfs - low-level tool for generating an initramfs image
|
|
<P>
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>mkinitramfs</B>
|
|
|
|
[<I>option</I>]...
|
|
|
|
<B>-o</B>
|
|
|
|
<I>outfile</I>
|
|
|
|
[<I>version</I>]
|
|
|
|
<BR>
|
|
|
|
<B>mkinitramfs</B> <B>-h</B>
|
|
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The
|
|
<B>mkinitramfs</B>
|
|
|
|
script generates an initramfs image.
|
|
The initramfs is a compressed cpio archive. The archive can be used on a
|
|
different box of the same arch with the corresponding Linux kernel.
|
|
<B>mkinitramfs</B>
|
|
|
|
is meant for advanced usage. On your local box
|
|
<B>update-initramfs</B>
|
|
|
|
calls
|
|
<B>mkinitramfs</B>
|
|
|
|
with the relevant parameters.
|
|
<B>update-initramfs</B>
|
|
|
|
keeps sha1sum of generated initramfs. It takes care to generate backups
|
|
and eventually runs the bootloader.
|
|
<P>
|
|
At boot time, the kernel unpacks that archive into RAM disk, mounts and
|
|
uses it as initial root file system. All finding of the root device
|
|
happens in this early userspace.
|
|
<P>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-c </B><I> compress<DD>
|
|
Override the
|
|
</I><B>COMPRESS</B>
|
|
|
|
setting in
|
|
<I>initramfs.conf</I>.
|
|
|
|
<P>
|
|
<DT id="2"><B>-d </B><I> confdir<DD>
|
|
Set an alternate configuration directory.
|
|
<P>
|
|
<DT id="3"></I><B>-k<DD>
|
|
Keep the temporary directory used to make the image.
|
|
<P>
|
|
<DT id="4">-o </B><I> outfile<DD>
|
|
Write the image to
|
|
outfile</I>.
|
|
|
|
<P>
|
|
<DT id="5"><B>-r </B><I> root<DD>
|
|
Override the
|
|
</I><B>ROOT</B>
|
|
|
|
setting in
|
|
<I>initramfs.conf</I>.
|
|
|
|
<P>
|
|
<DT id="6"><B>-v<DD>
|
|
Set the verbose mode output.
|
|
<P>
|
|
<DT id="7"></B><I>version<DD>
|
|
Set the kernel version of the initramfs image
|
|
(defaults to the running kernel).
|
|
<P>
|
|
<DT id="8"></I><B>-h</B>, <B>--help</B><DD>
|
|
Display usage information and exit.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>ENVIRONMENT</H2>
|
|
|
|
<B>mkinitramfs</B>
|
|
|
|
honours the
|
|
<B>TMPDIR</B>
|
|
|
|
environment variable. If set, it uses subdirectories in the given
|
|
directory to create its temporary working directories. Else it uses
|
|
<I>/var/tmp</I>
|
|
|
|
as default value for that purpose. The given directory should be on a
|
|
filesystem which allows the execution of files stored there, i.e.
|
|
should not be mounted with the
|
|
<B>noexec</B>
|
|
|
|
mount option.
|
|
<P>
|
|
If
|
|
<B>SOURCE_DATE_EPOCH</B>
|
|
|
|
is set,
|
|
<B>mkinitramfs</B>
|
|
|
|
attempts to generate a reproducible initramfs image.
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="9"><I>/etc/initramfs-tools/initramfs.conf</I>
|
|
|
|
<DD>
|
|
The default configuration file for the script. See
|
|
<B><A HREF="/cgi-bin/man/man2html?5+initramfs.conf">initramfs.conf</A></B>(5)
|
|
|
|
for a description of the available configuration parameter.
|
|
<P>
|
|
<DT id="10"><I>/etc/initramfs-tools/modules</I>
|
|
|
|
<DD>
|
|
Specified modules will be put in the generated image and loaded when the system boots. The format - one per line - is identical to that of
|
|
<I>/etc/modules,</I>
|
|
|
|
which is described in
|
|
<B><A HREF="/cgi-bin/man/man2html?5+modules">modules</A></B>(5).
|
|
|
|
<P>
|
|
<DT id="11"><I>/etc/initramfs-tools/conf.d</I>
|
|
|
|
<DD>
|
|
The conf.d directory allows one to hardcode bootargs at initramfs build time
|
|
via config snippets. This allows one to set ROOT or RESUME.
|
|
This is especially useful for bootloaders, which do not pass an root bootarg.
|
|
<P>
|
|
<DT id="12"><I>/etc/initramfs-tools/DSDT.aml</I>
|
|
|
|
<DD>
|
|
If this file exists, it will be appended to the initramfs in a way that causes
|
|
it to be loaded by ACPI.
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAH"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
Create an initramfs for current running kernel:
|
|
<P>
|
|
<P>
|
|
|
|
<B>mkinitramfs -o ~/tmp/initramfs-$(uname -r)</B>
|
|
|
|
<P>
|
|
Create an initramfs for specific kernel and keep builddirs:
|
|
<P>
|
|
<P>
|
|
|
|
<B>mkinitramfs -k -o ~/tmp/initramfs-2.6.21-686 2.6.21-686</B>
|
|
|
|
<P>
|
|
Debug initramfs creation (check out written logfile)
|
|
<P>
|
|
|
|
<B>sh -x mkinitramfs -o ~/tmp/initramfs-$(uname -r) 2> ~/tmp/log</B>
|
|
|
|
<P>
|
|
<A NAME="lbAI"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
The initramfs-tools are written by Maximilian Attems <<A HREF="mailto:maks@debian.org">maks@debian.org</A>>,
|
|
Jeff Bailey <<A HREF="mailto:jbailey@raspberryginger.com">jbailey@raspberryginger.com</A>> and numerous others.
|
|
<P>
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
<I><A HREF="/cgi-bin/man/man2html?5+initramfs.conf">initramfs.conf</A></I>(5),
|
|
|
|
<I><A HREF="/cgi-bin/man/man2html?7+initramfs-tools">initramfs-tools</A></I>(7),
|
|
|
|
<I><A HREF="/cgi-bin/man/man2html?8+update-initramfs">update-initramfs</A></I>(8),
|
|
|
|
<I><A HREF="/cgi-bin/man/man2html?8+lsinitramfs">lsinitramfs</A></I>(8),
|
|
|
|
<I><A HREF="/cgi-bin/man/man2html?8+unmkinitramfs">unmkinitramfs</A></I>(8).
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="13"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="14"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="15"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="16"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="17"><A HREF="#lbAF">ENVIRONMENT</A><DD>
|
|
<DT id="18"><A HREF="#lbAG">FILES</A><DD>
|
|
<DT id="19"><A HREF="#lbAH">EXAMPLES</A><DD>
|
|
<DT id="20"><A HREF="#lbAI">AUTHOR</A><DD>
|
|
<DT id="21"><A HREF="#lbAJ">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:13 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|