This caused the root_dev variable not to be set which in turn meant that
the root device was not whitelisted in 99base/module-setup.sh when injecting
compile-time devexists hooks in hostonly initrds. This ties the generated
initrd to the root fs device (typically the UUID) rather than relying solely
only the root= kernel command line.
While it is hostonly, not hardcoding e.g. UUIDs is still desirable. Any
swap partition on the host device is still added however.
If the root user generates the initramfs image, preserve the ownership
of the files. This of course cannot be done for non-root users
generating an initramfs image.
Add "rebuild" option to dracut to append the current arguments
to those with which the input initramfs image was built. This
option helps in incrementally building initramfs for testing.
Usage: dracut [output_file] --rebuild input_file
If optional output file is not provided, input file provided to
rebuild will be used as output file.
This patch alters the creation of the initramfs image by adding
the file "/tmp/params.txt" to the image. Command line parameters
excluding "--rebuild", input & output image names and "kernel
version" are stored in this file. In case "--rebuild" parameter
is specified, "/tmp/params.txt" file, if present in input image,
is read and its contents "prepend"ed to the current command line
parameters, that is if such a file is already present. Also, it
stores the cumulative parameters to the file "/tmp/params.txt",
in the new image. This patch has been tested successfully on a
PowerBox with f19. It does not alter the behaviour of any of the
existing options.
Signed-off-by: Manik Bajpai <manibajp@linux.vnet.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
[Edited-by: Harald Hoyer]
Simplified the cpio extraction process by using 'lsinitrd'.
This removes the dependency on 'getconf' as well, which is not installed by default on my embedded systems.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
dracut-install could not handle output like:
/lib/$LIB/liblsp.so => /lib/lib64/liblsp.so (0x00007faf00727000)
also unset LD_PRELOAD, so we get a clean environment
If new kernels have modules split out, handle the case, where modules
have to modalias and just install them.
Also add the crypto drivers and names to host_modalias.
This patch adds support for lzop(1) & lz4(1) compression
algorithms to compress iniramfs image file. Both are supported
by the Linux kernel.
Linux kernel exports user's choice of initramfs compression
algorithm as a shell environment variable: INITRD_COMPRESS.
This patch adds support to read this variable and duly compress
the initramfs image file.
Environment variable INITRD_COMPRESS has less precedence than the
command line options --gzip, etc. Ie. command line options could
override the compression algorithm defined by $INITRD_COMPRESS.
Signed-off-by: P J P <ppandit@redhat.com>
[Edited-by: Harald Hoyer: add documentation about lzo and lz4]
An example config file for this feature could be:
/etc/dracut.conf.d/03-acpi-override.conf
with this content:
acpi_override="yes"
acpi_table_dir="/etc/dracut.conf.d/acpi_tables"
Then all files ending with *.aml will be put into the early cpio
(kernel/firmware/acpi) and will be used to replace the BIOS provided tables
if the kernel supports this feature.
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Intel microcodes only exist for very specific family/model/stepping CPUs.
If no microcode gets added, there is no need to create an empty
(only directories) cpio later that gets glued to the initrd.
This also fixes:
*** Constructing GenuineIntel.bin ****
cat: /lib/firmware/intel-ucode/06-3c-03: No such file or directory
in hostonly mode if there is no suitable microcode for the CPU.
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
ACPI early table override also may need to place files into an early cpio.
Reflect this in variable and file names.
This change is renaming only and does not introduce any real change.
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
The gnome-ostree build system generates dracut initramfs images on the
build server, therefore not in hostonly mode. The build system at the
moment doesn't mount /sys, and the previous commit caused a hard
failure due to lack of /sys/devices.
Because we only want /sys/devices in hostonly mode, just move those
bits inside the hostonly conditional above.
--persistent-policy <policy>:
Use <policy> to address disks and partitions.
<policy> can be any directory name found in /dev/disk.
E.g. "by-uuid", "by-label"
This prints the kernel command line parameters for the current disk
layout.
$ dracut --print-cmdline
rd.luks.uuid=luks-e68c8906-6542-4a26-83c4-91b4dd9f0471
rd.lvm.lv=debian/root rd.lvm.lv=debian/usr root=/dev/mapper/debian-root
rootflags=rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered
rootfstype=ext4