The global var setting was happening in a pipe and did not have an
effect.
Use <<<$() instead.
< <() cannot be used, because dracut is called in chroot's environments,
where /dev/fd does not point to /proc/self/fd, but bash wants
/dev/fd/<num> for this construct.
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]
parse-resume.sh already contains all the code from resume-genrules.sh.
Also parse-resume.sh is executed before resume-genrules.sh, so there is
no point to keep the latter.
This fixes the following error messages:
dracut-initqueue: ln: failed to create symbolic link '/dev/resume': File exists
dracut-initqueue: rm: cannot remove '/lib/dracut/hooks/initqueue/settled/resume.sh': No such file or directory
dracut-initqueue: rm: cannot remove '/lib/dracut/hooks/initqueue/timeout/resume.sh': No such file or directory
Check for other possible fs types. This fixes swap detection when using
TuxOnIce kernel.
Note that parse-resume.sh generate udev rules with support for
ID_FS_TYPE=suspend, but we do not include it here, because it is
libvolume_id thing and host_fs_types is populated using blkid.
This is similar to the reason for adding the
/run/initramfs/live-baseloop symlink -- access to the original live
image without overlays.
livemedia-creator does not create a osmin.img, so there is no mountable
device for it to use when rsyncing the live image to the target. It
needs a device that points to the original live image without overlays.
Note that lmc won't be creating osmin.img, since really isn't needed any
longer. Its purpose was to provide a minimal image that could be dd'd to
the target. Now that we use rsync this is no longer necessary.
The included patch adds a /dev/mapper/live-base device that Anaconda can
use whether or not there is an osmin present.
default_kernel_images and -i/-k paths are new (SuSE) code paths and
would have resulted in usage errors before.
There we want to build host only images for faster building and
smaller images.
Also force creation (overriding) of initrd images in these code paths.
Signed-off-by: Thomas Renninger <trenn@suse.de>
-d is the SUSE mkinitrd version option to pass the rootfs.
-s is to enable splash which may not be needed, but some callers rely on it,
not to return an error.
Make this wrapper compatible to it.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Before this gave a "usage" error.
Now boot_dir (by default /boot) is scanned for available kernels and sane
initrd default targets get defined and the corresponding initramfs files
are generated.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Dracut is rather verbose. This optional parameter is to limit the output
to the essential: For each generated initrd show the kernel, target and
possibly additional options passed to dracut.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Currently --with parameter had to be passed as: --with="mod1 mod2".
Now one can pass: --with "mod1 mod2" or even --with mod1 mod2.
Signed-off-by: Thomas Renninger <trenn@suse.de>
In SUSE, one can pass a list of kernel files via -k parameter.
For each an initrd is generated as passed via -i parameters.
Make the dracut mkinitrd wrapper compatible to those.
For now only one kernel file and initrd target can be specified.
This will get enhanced with a follow-up patch.
Signed-off-by: Thomas Renninger <trenn@suse.de>
mdadm-3.2.6+:
Incremental assembly rule contains "--offroot" arg. Update
regexp to catch this variant.
mdadm-3.3+:
Rules was splitted into two files: 63-md-raid-arrays.rules
and 64-md-raid-assembly.rules. Install them both and edit
the latter.
The 69-dm-lvm-metad.rules set some udev env. variables that makes it
possible to detect the right time to activate LVM on MD. The MD is very
similar to DM during activation - it's usable only after proper device
activation - the CHANGE event. We need to make a difference between a
CHANGE event that comes from this activation and CHANGE event that is
the outcome of the WATCH udev rule (otherwise we'd end up with LVM
activation done on each CHANGE event - which is wrong).
So we need the udev databse to be persistent during pivot to root fs
even for MD devices.
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>
Configure cmdline to:
ip=br0:dhcp bridge=br0:bond0 bond=bond0:eth0
By default ifup bond0 will run dhcp on bond0, which is wrong. bond0
isn't the top interface. we should really run dhcp on br0.
So if we ifup an network interface on secondary stack, we should not
dhcp. Fix this issue with this patch.
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.