James Lee [Thu, 26 Mar 2015 06:17:34 +0000 (02:17 -0400)]
crypt-loop: Always include 'loop' kernel module
When the 'loop' kernel module isn't loaded in a running system, it gets
excluded from the hostonly initrd. Given that the crypt-loop dracut
module has to be loaded explicitly anyway, it makes sense to always
include the requisite loop kernel module.
Harald Hoyer [Thu, 19 Mar 2015 11:55:17 +0000 (12:55 +0100)]
dracut.sh: add support for creating a UEFI boot executable
With an EFI stub, the kernel, the initramfs and a kernel cmdline can be
glued together to a single UEFI executable, which can be booted by a
UEFI BIOS.
Harald Hoyer [Thu, 19 Mar 2015 09:02:05 +0000 (10:02 +0100)]
Split the systemd dracut module up
Basic systemd functionality is in 00systemd now.
Switching root and the initrd.target is in 00systemd-initrd.
Dracut additions to the systemd initrd are in 98dracut-systemd.
Harald Hoyer [Mon, 16 Mar 2015 10:55:13 +0000 (11:55 +0100)]
lvm: add files needed for LVM system id support
The LVM system id support is recent addition to LVM. See
https://git.fedorahosted.org/cgit/lvm2.git/tree/man/lvmsystemid.7.in for
more information (since lvm v2.02.117, currently the configuration is
ignored, but we will enable it soon in next release).
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.
Jonas Jonsson [Sun, 28 Dec 2014 00:03:29 +0000 (01:03 +0100)]
99base: Properly remove files with rd.hostonly=0
Dracut will generate systemd units for additional devices that should be
brought up during boot, e.g. swap devices. These unit files are broken
symlinks with \ in the filename, e.g.
/etc/systemd/system/initrd.target.wants/dev-disk-by\x2duuid-e6a54f99\x2da4fd\x2d4931\x2da956\x2d1c642bcfee5e.device.
Both the backslash and the broken symlink causes problems for shell
scripts, [ -e "$file" ] isn't enough and read requires the additional -r
argument to not react on the \.
The function 99shutdown/shutdown.sh:_check_shutdown() assumes that
shutdown scripts report success or failure via their return value.
However, "dmsetup remove_all" always reports success, even if some
of the device mappings could not be removed.
I submitted a patch for dmsetup but the lvm2 folks rejected it,
asserting that its behaviour is correct, that "remove_all" should
only be used by developers and that the proper solution would be
to invoke "dmsetup remove" on each device. This does report success
or failure via the return value.
Apart from fixing that issue, this commit also adds the dmsetup
option "--noudevsync". Without it, dmsetup would hang after removal
of a device while trying to communicate with systemd-udevd, which
is no longer running at this shutdown stage.
Daniel Drake [Thu, 15 Jan 2015 17:27:47 +0000 (11:27 -0600)]
kernel-modules: increase SDHCI driver inclusion
The sdhci-pci module is currently not being included in the initramfs,
even though other sdhci modules are. This breaks boot on systems that
rely on this driver to access the root filesystem.
Instead of looking for modules that use sdhci_pltfm_init, look for
sdhci_add_host. I checked 3.18 kernel sources, and this change
does not remove any of the previously-matched SDHCI drivers.
It should result in the addition of sdhci-pci, sdhci-s3c, sdhci-spear
and sdhci-acpi.
Thomas Backlund [Sun, 21 Dec 2014 10:45:30 +0000 (12:44 +0159)]
90kernel-modules: update for xhci module split in kernel 3.18
As reported in https://bugs.mageia.org/show_bug.cgi?id=14799
the xhci module got splitted up in upstream linux merged during
3.18 release cycle:
>From 29e409f0f7613f9fd2235e41f0fa33e48e94544e Mon Sep 17 00:00:00 2001
From: Andrew Bresticker <abrestic@chromium.org>
Date: Fri, 3 Oct 2014 11:35:29 +0300
Subject: xhci: Allow xHCI drivers to be built as separate modules
so we need to adjust 90kernel-modules accordingly.
Erwan Velu [Fri, 19 Dec 2014 13:49:00 +0000 (14:49 +0100)]
dracut: Ajusting variables name for --include
When reading the --include part of the script, we had the following
issues to make the code easy to read:
- src & tgt were extract for the original options
- i variable was a file or a directory from src
- s variable was the directory name in case $i was a directory
"s" sounds very close to "src" while "s" is on the "tgt" side. Very
confusing.
"s" was defined before the "if it's a directory" statement while it's
only used inside the "if".
"i" was commit from the "src" but wasn't really explicit.
Having some lines mixing "i" and "s" takes a little time to get read
properly.
This patch offer the following changes:
- "i" is renamed to "objectname" as we don't know if its a file or a
directory
- "s" is renamed to "object_destdir" as the object name becomes a
directory on the destdir
- "object_destdir" (former "s") is moved inside the "if" statement as it's
only used here
- tgt is finally renamed to "target" to be more explicit. We are not all
native english ;o)
$ make testimage
…
*** Store current command line parameters ***
Stored kernel commandline:
root=UUID=d5e53483-30bc-4119-8c0c-841d47a2f76brootflags=rw,noatime,compress=lzo,ssd,discard,space_cache,autodefrag,inode_cacherootfstype=btrfs
…
Thomas Renninger [Thu, 11 Dec 2014 14:46:33 +0000 (15:46 +0100)]
dracut: nbd: Only complain of missing binary in hostonly mode if
rootfs is on nbd
In not hostonly mode, require_binaries will still complain.
If in hostonly mode and the module is explicitly added via -a nbd, then
install() section will still complain later:
dracut-install: ERROR: installing 'nbd-client'
95rootfs-block would not terminate the commandline parameter with
a space or newline, instead it'll rely on the main routine from
dracut.sh to do this.
Which will cause unexpected problems for any modules called
after this.
So terminate the commandline parameters correctly here and remove
the newline from dracut.sh.
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Hannes Reinecke [Thu, 11 Dec 2014 14:46:27 +0000 (15:46 +0100)]
99base: Add chown binary
nvidia driver needs this via modprobe script.
Needs to do change the group after a device node got created.
Add chown instead of chgrp which can also change the owner of a file.
Ask Stefand Dirsch <sndirsch@suse.de> for details.
Hannes Reinecke [Thu, 11 Dec 2014 14:46:22 +0000 (15:46 +0100)]
95fcoe: Store current configuration in dracut cmdline
When running with --hostonly-cmdline we should be storing
the current configuration in /etc/cmdline.d so that dracut
will be configure the system automatically.
References: bnc#877288
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Thomas Renninger [Thu, 11 Dec 2014 14:46:20 +0000 (15:46 +0100)]
dracut: Do not stop installing drivers if one fails
--add-drivers and --filesystems kernel drivers are added via:
instmods -c
The check option makes the function return if one driver could not get
installed without trying to install further drivers which is bad.
The user is still informed ($_silent is by default no), but all modules
passed to instmods are tried to be loaded, even if one fails.
Thomas Renninger [Thu, 11 Dec 2014 14:46:16 +0000 (15:46 +0100)]
dracut.sh: Fix UUID= fstab parsing in case --mount option is passed
Dracut parses /etc/fstab when --mount is option is passed (e.g. kdump).
In host_devs variable the real block device must be stored, not UUID=
There are other /etc/fstab syntax possibilities we now warn that they
are not correctly parsed. This will be fixed by another patch
when there is time to test this properly.
jloeser [Thu, 11 Dec 2014 14:46:14 +0000 (15:46 +0100)]
Check for logfile (--logfile option) and create it if necessary
If a logfile is passed to dracut via --logfile option and doesn't
exist, dracut doesn't create it and logs nothing. Instead, dracut
should try to touch the file and print a warning if creating fails.
References: bnc#892191 Signed-off-by: Thomas Renninger <trenn@suse.de>
Hannes Reinecke [Thu, 11 Dec 2014 14:46:11 +0000 (15:46 +0100)]
Handle module alias properly
Some modules (like ext4) provide aliases by which the modules
can be accessed, too. But when using aliases directly dracut
fails to include the correct module. So translate the alias
into the correct module name before checking the module.
References: bnc#886839
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Hannes Reinecke [Thu, 11 Dec 2014 14:46:10 +0000 (15:46 +0100)]
99base: warn on invalid command for initqueue
When 'initqueue' is called with an invalid command it'll generate
invalid job scripts. This will lead to confusing error messages
later on.
So abort in these cases and print out a warning.
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Hannes Reinecke [Thu, 11 Dec 2014 14:46:06 +0000 (15:46 +0100)]
Do not call 'lvm' for non-LVM device-mapper devices
If a device-mapper device is not created by LVM it's pointless
to call any 'lvm' programs got extract details; they'll be
failing anyway. So check the UUID before calling 'lvm'.
This speeds up initrd creation and avoids I/O errors on
multipath devices.
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Hannes Reinecke [Thu, 11 Dec 2014 14:46:05 +0000 (15:46 +0100)]
Implement 'rd.timeout' to modify the device timeout
When generating units for devices the administrator might
want to use a different timeout than the default.
So implement a new parameter 'rd.timeout' for this.
References: bnc#878770
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Thomas Renninger [Thu, 11 Dec 2014 14:46:04 +0000 (15:46 +0100)]
iscsi: iscsi.initiator and others can and must only show up once
Make sure duplicates of iscsi.initiator vanish.
Only get one rd.iscsi.* paramter value. If getargs is used and several
parameters are parsed, one gets two values separated by whitespace in a
variable which breaks later code and is not suppported.
Hannes Reinecke [Thu, 11 Dec 2014 14:46:01 +0000 (15:46 +0100)]
95iscsi: Fixup bnx2i offload booting
bnx2i is using a separate iSCSI offload engine with a separate
MAC address. As a result, the iBFT information is displaying
a MAC address which does not relate to any MAC address from
the network interfaces.
In addition, the iSCSI offload engine works independently on
the NIC, so we do not need to enable the NIC for iSCSI offload
to work.
This patch modifies the automatic iBFT detection to not set
the 'ip=ibft' flag when bnx2i offload is detected.
References: bnc#855747
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
However this appraoch is slightly different:
"$netroot" instead of "'$netroot'", etc.
initqueue will process the arguments, assuming the first non-option
argument to be the program to be executed. Putting the entire
commandline into this argument confuses both, initqueue and the
program in question.
References: bnc#879038
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>