Harald Hoyer [Fri, 3 Jul 2015 12:24:50 +0000 (14:24 +0200)]
multipath: install all multipath path selector kernel modules
By default, dracut only builds in dm-service-time into the initramfs as
that is the default multipath.conf path selector. If the user changes
the path selector to "round robin" on the fly and runs dracut, multipath
does not find any paths on boot and the user will be dropped into a
shell.
Apparently, in RHEL7 dracut defaults to "hostonly" mode, i.e. modules
not currently in use at the time dracut runs do not get built into
initramfs. This is definitely one case where this doesn't work. A change
to reconfigure multipath probably should not render the system
unbootable.
Harald Hoyer [Tue, 25 Nov 2014 12:44:54 +0000 (13:44 +0100)]
dmsquash-live: do not abort, if user pressed ESC on checkisomd5
If the user pressed ESC while checkisomd5 runs the media check, it will
exit with "2". Previously that would mean, that the media check was not
successful.
Colin Guthrie [Fri, 15 May 2015 13:53:40 +0000 (14:53 +0100)]
base: Don't wait for swap devices in host-only mode.
The only reason we add swap devices to host-only mode (added in dd5875499ece9dbc90e10eafd0073ee15d0c86a4) is to allow us to process
resume= arguments passed on the kernel command line when the swap
partition lives on something slightly more complex than a normal
partion (e.g. in an LVM or RAID setup).
By adding the device to host_devs, the necessary LVM and RAID hooks
are added and thus the underlying storage will be initialised OK, and
the 95resume module handles the waiting for the device (via udev rules
creating the /dev/resume symlink).
So ultimately, we do not need to hard-code the waiting for the swap
devices into the initramfs at build time as the waiting part can be
dynamic.
This makes things more resiliant to swap partitions disappearing and
being reformatted etc.
Inspired by a patch by Martin Whitaker on Mageia bug:
https://bugs.mageia.org/show_bug.cgi?id=12305
Hannes Reinecke [Mon, 23 Mar 2015 16:12:18 +0000 (17:12 +0100)]
95fcoe-uefi: Test for EFI firmware
The fcoe-uefi module should test for EFI firmware when called
in 'hostonly' mode; of no EFI firmware is found then the module
doesn't need to be included.
References: bnc#882412
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
(cherry picked from commit 6755c208556be7a85c76e731de48a56f56e81c4c)
Fabian Deutsch [Thu, 19 Feb 2015 09:09:14 +0000 (10:09 +0100)]
dmsquash: Add squashfs support to rd.live.fsimg
Previously rd.live.fsimg only supported filesystems residing in
(compressed) archives.
Now rd.live.fsimg can also be used when a squashfs image is used.
This is achieved by extracting the rootfs image from the squashfs and
then continue with the default routines for rd.live.fsimg.
In addition some code duplication got removed and some documentation
got added.
Fabian Deutsch [Wed, 18 Feb 2015 13:31:40 +0000 (14:31 +0100)]
dmsquash: Add rd.live.overlay.thin
This option changes the underlying mechanism for the overlay in the
dmsquash module.
Instead of a plain dm snapshot a dm thin snapshot is used. The advantage
of the thin snapshot is, that the TRIM command is recognized, which
means that at runtime, only the occupied blocks will be claimed from
memory, and freed blocks will really be freed in ram.
Major Hayden [Mon, 4 Aug 2014 15:27:36 +0000 (10:27 -0500)]
Adding support for read/write filesystem images
A user can provide a filesystem image (rootfs.img) inside a compressed
tarball and that filesystem image will be mounted read/write. This provides
some benefits over a device mapper snapshot overlay, especially when the
live system becomes full. The boot command line simple needs
"rd.writable.fsimg" added to utilize this feature.
Additional documentation for this option as well as other live boot
options is included.
Chao Fan [Wed, 20 May 2015 10:07:14 +0000 (18:07 +0800)]
Change the fs_passno of nfs to 0
There is a bug that kdump-initrd contains entry requesting nfs dump
filesystem to get filesystemchecked. And there is an erro message said
that nfs need be checked. But there's no fsck for nfs utility, e.g
fsck.nfs like other file system. Whatever fs_passno 0 or 2 are passed,
no fsck is executed at all for nfs mount.But in dracut, set it to be 2
always, so the erro message appear and it should be set to 0.
In the fstab,the sixth variable fs_passno stands for that the device need
checked or not,and dracut set it to "2".To fix this issue, it should
be "0" when the device is nfs.The third variable stands for the type of
the filesystem and we can use it to judge whether the device is nfs.
So when the third variable of fstab contains "nfs", the sixth variable
fs_passno should be set to "0".
Harald Hoyer [Thu, 6 Feb 2014 15:45:20 +0000 (16:45 +0100)]
Factor out all the "type -V" commands
Add new functions require_binaries() and require_any_binary() to be used
in the check() section of module-setup.sh.
These functions print a warning line telling the user, which binary is
missing for the specific dracut module.
This unifies the way of checking for binaries and makes the life of an
initramfs creator easier, if he wants to find out why a specific dracut
module is not included in the initramfs.
Harald Hoyer [Mon, 1 Dec 2014 11:36:20 +0000 (12:36 +0100)]
do not symlink /var/log to /run/log
some programs e.g. systemd-journald expect a directory in /var/log as
the marker to do some actions. Here journald tries to flush
/run/log/journal to /var/log/journal, if the directory is seen.
Alex Harpin [Sat, 2 Aug 2014 19:08:25 +0000 (20:08 +0100)]
bridging: update the ifcfg files generated for bridge slaves
Update the ifcfg files generated for bridge slaves so they reference
the bridge they are part of. Related to early patch submitted as a
fix for Bug #1123552.
Hari Bathini [Thu, 16 Jan 2014 06:41:27 +0000 (12:11 +0530)]
Dracut: Add a new argument "--rebuild"
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'.
Hari Bathini [Mon, 2 Jun 2014 10:57:37 +0000 (16:27 +0530)]
lsinird: Adding option "-m|--mod" to list dracut modules in the image
This patch adds option "-m|--mod" to lsinitrd to list dracut
modules in the image because sometimes having an option to
only list the dracut modules in the image could be handy.
Installing an OS with VLAN enabled to an ISCSI LUN (from ibft)
When installing OS to a VLAN enabled iscsi LUN (extracted from iBFT), "/tmp/net.{xyz}.has_ibft_config" is not being set properly.
Then anaconda installer requires 'BOOTPROTO="ibft"' populated in ifcfg of the vlan interface (ex: ibft0.20), for it to properly populate the kernel parameters post installation. The setting 'BOOTPROTO="ibft"' is populated by write-ifcfg.sh script only if the corresponding interface has a file /tmp/net.{xyz}.has_inft_config
To get around this issue, in ibft_to_cmdline() function in net-lib.sh file, I made the following changes to populate the has_ibft_config file for the vlan interface(ex: ibft0.20):