--lzma Compress the generated initramfs using lzma.
Make sure your kernel has lzma support compiled in,
otherwise you will not be able to boot.
+ --xz Compress the generated initramfs using xz.
+ Make sure that your kernel has xz support compiled
+ in, otherwise you will not be able to boot.
+ --compress [COMPRESSION] Compress the generated initramfs with the
+ passed compression program. Make sure your kernel
+ knows how to decompress the generated initramfs,
+ otherwise you will not be able to boot.
--no-compress Do not compress the generated initramfs. This will
override any other compression options.
--list-modules List all available dracut modules.
-c|--conf) read_arg conffile "$@" || shift;;
--confdir) read_arg confdir "$@" || shift;;
-L|--stdlog) read_arg stdloglvl_l "$@" || shift;;
+ -I|--install) read_arg install_items "$@" || shift;;
+ --fwdir) read_arg fw_dir_l "$@" || shift;;
+ --compress) read_arg compress "$@" || shift;;
-f|--force) force=yes;;
--kernel-only) kernel_only="yes"; no_kernel="no";;
--no-kernel) kernel_only="no"; no_kernel="yes";;
--fstab) use_fstab_l="yes" ;;
-h|--help) usage; exit 1 ;;
-i|--include) push include_src "$2"; push include_target "$3"; shift 2;;
- --bzip2) [[ $compress != cat ]] && compress="bzip2 -9";;
- --lzma) [[ $compress != cat ]] && compress="lzma -9";;
- --xz) [[ $compress != cat ]] && compress="xz --check=crc32";;
- --no-compress) compress="cat";;
- --gzip) if [[ $compress != cat ]]; then
- type pigz > /dev/null 2>&1 && compress="pigz -9" || \
- compress="gzip -9"
- fi;;
+ --bzip2) compress="bzip2";;
+ --lzma) compress="lzma";;
+ --xz) compress="xz";;
+ --no-compress) _no_compress="cat";;
+ --gzip) compress="gzip";;
--list-modules)
do_list="yes";
;;
fi
[[ $outfile ]] || outfile="/boot/initramfs-$kernel.img"
+case $compress in
+ bzip2) compress="bzip -9";;
+ lzma) compress="lzma -9";;
+ xz) compress="xz --check=crc32 --lzma2=dict=1MiB";;
+ gzip) type pigz > /dev/null 2>&1 && compress="pigz -9" || \
+ compress="gzip -9";;
+esac
+if [[ $_no_compress = "cat" ]]; then
+ compress="cat"
+fi
+
PATH=/sbin:/bin:/usr/sbin:/usr/bin
export PATH
</term>
<listitem>
<para>Compress the generated initramfs using gzip.
- This will be done by default, unless another compression option or --no-compress is passed.</para>
+ This will be done by default, unless another compression option or --no-compress is passed. Equivalent to "--compress=gzip -9"</para>
</listitem>
</varlistentry>
<varlistentry>
<listitem>
<para>Compress the generated initramfs using bzip2.
<warning>
- <para>Make sure your kernel has bzip2 decompression support compiled in, otherwise you will not be able to boot.</para>
+ <para>Make sure your kernel has bzip2 decompression support compiled in, otherwise you will not be able to boot. Equivalent to "--compress=bzip2"</para>
</warning></para>
</listitem>
</varlistentry>
<listitem>
<para>Compress the generated initramfs using lzma.
<warning>
- <para>Make sure your kernel has lzma decompression support compiled in, otherwise you will not be able to boot.</para>
+ <para>Make sure your kernel has lzma decompression support compiled in, otherwise you will not be able to boot. Equivalent to "--compress=lzma -9"</para>
</warning></para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>
+ <option>--xz</option>
+ </term>
+ <listitem>
+ <para>Compress the generated initramfs using xz.
+ <warning>
+ <para>Make sure your kernel has xz decompression support compiled in, otherwise you will not be able to boot. Equivalent to "--compress=xz --check=crc32 --lzma2=dict=1MiB"</para>
+ </warning></para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>
+ <option>--compress <replaceable><compressor></replaceable></option>
+ </term>
+ <listitem>
+ <para>Compress the generated initramfs using the passed compression program. If you pass it just the name of a compression program, it will call that program with known-working arguments. If you pass a quoted string with arguments, it will be called with exactly those arguments. Depending on what you pass, this may result in an initramfs that the kernel cannot decompress.</para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term>
<option>--no-compress</option>