Commit Graph

4176 Commits (c97209fe69dbbacb1f87acf5ec8a0e558e553ddc)

Author SHA1 Message Date
Ville Skyttä ee84640963 Use lbzip2 instead of bzip2 if available 2015-05-24 22:29:20 +03:00
Ville Skyttä f8139a8b28 Fix stale comment about required bash version 2015-05-24 22:26:20 +03:00
Fabian Deutsch cfa365a32d lvm: Don't activate LVs with activationskip set
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1186854
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2015-05-21 12:38:05 +02:00
Fabian Deutsch a1b4efe6a7 doc: Add a minimal rd.live.overlay documentation
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
2015-05-21 12:37:38 +02:00
Chao Fan 3586a7aa77 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".

Signed-off-by: Chao Fan <cfan@redhat.com>
2015-05-20 12:07:57 +02:00
Harald Hoyer 81b67232dc 50drm: add hyperv_fb kernel module
https://bugzilla.redhat.com/show_bug.cgi?id=1192035
2015-05-18 13:43:26 +02:00
Harald Hoyer 27c9d1f20f Merge remote-tracking branch 'github/master' 2015-05-18 13:28:00 +02:00
Harald Hoyer 10e59202c7 51-dracut-rescue.install: fix kernel cmdline parsing
filter out any "initrd=" option
2015-05-18 13:27:16 +02:00
Colin Guthrie 7b56b90582 resume: Ensure we actually wait for the /dev/resume 'device'
Although various bits are in place to cancel waiting for the /dev/resume
device (actually a symlink), we don't actually ever wait for it.

Also as the udev rule may create the symlink, silence any errors from
our manual ln -s call from the settled job.
2015-05-15 16:01:41 +02:00
Colin Guthrie 3e3ed34f03 base: Don't wait for swap devices in host-only mode.
The only reason we add swap devices to host-only mode (added in
dd5875499e) 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
2015-05-15 16:01:41 +02:00
Harald Hoyer 50f8ae457c dmraid/dmraid.sh: call udevsettle after activating all raids
otherwise a uevent loop will happen and the initqueue main loop counter
will not be incremented
2015-05-13 12:31:07 +02:00
Harald Hoyer a601870064 5?-dracut*.install: better parsing of /proc/cmdline
"read -r -d '' -a" does, what we want.
2015-05-13 12:02:14 +02:00
Harald Hoyer 8cd8820547 use cp --reflink=auto
saves some space, if the destination is on the same filesystem on some
filesystems
2015-05-13 12:02:10 +02:00
Harald Hoyer 471439f564 add dracut.pc pkg-config file 2015-05-13 11:47:23 +02:00
Harald Hoyer e668f3bc36 .dir-locals.el: correct syntax 2015-05-13 11:44:00 +02:00
Harald Hoyer 351de47882 README.testsuite: add bridge-utils to list of rpms 2015-05-07 18:15:57 +02:00
Harald Hoyer 07d9319d54 network/net-lib.sh:iface_has_link() wait 5s for the carrier to appear
https://bugzilla.redhat.com/show_bug.cgi?id=1088808
2015-05-07 14:49:06 +02:00
Harald Hoyer 7c5ec0f5be network:dhcp:wait_for_ipv6_dad() in PREINIT6 2015-05-07 14:43:26 +02:00
Harald Hoyer 79bc77d2f4 Merge pull request #61 from cmorty/pull/plymouth
Add plymouth-set-default-theme to the plymouth dependencies
2015-04-30 11:28:49 +02:00
Moritz 'Morty' Strübe 874b013573 Add plymouth-set-default-theme to the plymouth dependencies
plymouth-set-default-theme is not shipped with ubuntu and therefore
causes errors.
2015-04-30 11:20:27 +02:00
Harald Hoyer ffa0ee5d16 Merge pull request #59 from lnykryn/master
dracut-functions: use [[ ]] with -n and no quotes
2015-04-30 09:29:06 +02:00
Harald Hoyer a742c80778 Merge pull request #60 from rustybird/master
Fix ask_for_password bug breaking bash without plymouth
2015-04-30 09:28:50 +02:00
Rusty Bird 04ba461045
Fix ask_for_password bug breaking bash without plymouth
If crypt-lib.sh is sourced from any #!/bin/sh script, a POSIX shell
quirk is in effect that causes variable assignments to "special
builtins" (such as "shift") to leak to their context. So the buggy
code works even despite the missing semicolons.

But if it is sourced by "bash acting under its own name", i.e. from
any #!/bin/bash script, the quirk is disabled, tty_cmd/tty_prompt are
undefined, and ask_for_password doesn't do anything if plymouth is not
present.
2015-04-30 03:25:14 +00:00
Harald Hoyer 6d58fa27a4 change "while read x" to cope with EOF without newline
while read x || [ -n "$x" ]

should do the trick
2015-04-28 11:39:15 +02:00
Harald Hoyer 822a7ae504 fips: add some s390 kernel modules 2015-04-28 10:46:33 +02:00
Lukas Nykryn b0b60c8e05 dracut-functions: use [[ ]] with -n and no quotes 2015-04-27 11:40:54 +02:00
Harald Hoyer 4851deca54 dmsquash-live/apply-live-updates.sh: needs 'find'
also add /run/initramfs/live/updates as a directory, where to pull
the updates from

https://bugzilla.redhat.com/show_bug.cgi?id=1213736
2015-04-24 12:18:53 +02:00
Harald Hoyer 437dad70e9 Defer modprobe of HW modules, until udev is running
Also honor blacklisting
2015-04-24 11:59:37 +02:00
Harald Hoyer a3e464ca43 drm/module-setup.sh: radeon needs amdkfd
AMD's HSA Linux kernel driver (amdkfd) has been merged into the mainline
kernel since kernel 3.19.

However, for the driver to work, it needs to be included in the default
initramfs image, together with the amd_iommu_v2 driver.

The radeon driver (AMD's kernel graphic driver) calls amdkfd during its
initialization and probing stages. Because radeon is included in the
initramfs image, it tries to initialize amdkfd during the early boot
stages. However, as amdkfd is not present there, it fails.

That doesn't harm radeon operation. However, it disables the HSA
abilities in the machine.

Because of the current design, if you later try to "modprobe amdkfd",
you won't be able to run HSA applications, even though the driver will
be loaded.

https://bugzilla.redhat.com/show_bug.cgi?id=1205222
2015-04-23 16:11:53 +02:00
Harald Hoyer be82884d35 Makefile: turn off hostonly excplicitely for testimage target 2015-04-23 16:11:26 +02:00
Harald Hoyer 180e9d7851 kernel-modules: install all HID drivers
Instead of hardcoding a list of useful drivers, which has to be curated
all the time, just include all HID drivers.
2015-04-23 13:46:52 +02:00
Harald Hoyer d3d52b20e9 dracut-systemd/rootfs-generator.sh: use strstr rather than grep
grep on /proc/cmdline is overkill and would add a requirement for grep
2015-04-21 16:35:34 +02:00
Harald Hoyer 23446ef1e0 ifcfg/write-ifcfg.sh: unset vlan
clear the vlan flag, if a previous interface in the loop
was a vlan interface
2015-04-21 15:10:49 +02:00
Harald Hoyer ec06c5d3b5 Merge pull request #55 from dracut-mailing-devs/1427202794-18834-1-git-send-email-aidecoe@aidecoe.name
Take into account lib64 dirs when detecting version, modules and params
2015-03-26 18:34:49 +01:00
Amadeusz Żołnowski d3be9275c7 Take into account lib64 dirs when detecting version, modules and params 2015-03-26 16:38:42 +01:00
Alexander Tsoy 13efce5d1b base/dracut-lib.sh: remove bashism 2015-03-26 16:38:38 +01:00
NeilBrown f53ede36fb dracut-systemd/rootfs-generator.sh: always create generated files.
When 'systemctl daemon-reload' is run, systemd will clean out
/run/systemd/generator and re-run all the generators.
So it is important that the generators always create the required
files.

rootfs-generator.sh currently does *not* create the desired files
if $hookdir/initqueue/finished/devexists-${_name}.sh
exists.

This is not removed by "systectl daemon-reload" so the first time this
generator is run it will do the right thing.  Subsequent times it
won't.

This results in incorrect timeouts after "daemon-reload" is run.

So let the existence of each file only guard the creation that file.

Signed-off-by: NeilBrown <neilb@suse.de>
2015-03-26 16:38:36 +01:00
NeilBrown 97cb17c792 systemd/dracut-iniqueue - continue waiting if any timeout script makes progress
A number of timeout scripts can be registered.  If any one of them
makes progress - e.g. assembles a degraded md array - then
the main loop should wait a bit longer rather than pressing forward.

This is particularly important is resume-from-hibernate requires a
degraded md array.  Both the script to forcibly assemble the md array
and the script to abort hibernation if the device doesn't appear
are 'timeout' scripts.  There needs to be a reasonable delay between
these running.

So: if any script has indicated that progress was made, break of out
the loop and go back to normal waiting.

Signed-off-by: NeilBrown <neilb@suse.de>
2015-03-26 16:38:36 +01:00
NeilBrown 3b82ac1696 mdraid/mdraid_start.sh: tell mainloop if we make progress.
mdraid_start is a number of scripts which run after a timeout.
If it makes progress, it should tell the main loop so that it
knows that it is worth waiting a bit longer.

So in that case, create the initqueue/work file which the main loop
checks for.

Signed-off-by: NeilBrown <neilb@suse.de>
2015-03-26 16:38:36 +01:00
Gerd von Egidy 99ccbc30df Add support for ethernet point-to-point connections configured via DHCP
When current dracut receives an ip with netmask of 255.255.255.255 via DHCP,
setting the also supplied default gateway fails (because it is obviously not
within the netmask).

The setup with a netmask of /32 is quite common in colocation datacenters
where you don't want the machines of two different customers to directly talk
to each other. At least two of the biggest colocation providers in Germany
(1&1 and Strato) do it that way. NetworkManager supports this kind of setup
and the dhclient-scripts of several distributions too.

In this patch I have implemented a simple approach very similar to what is
found in Debian. The dhclient-script from Fedora uses a more sophisticated
approach, but that relies on the ipcalc utility which would introduce a
dependency on Fedora-initscripts for dracut.

Signed-off-by: Gerd von Egidy <gerd.von.egidy@intra2net.com>
2015-03-26 16:38:33 +01:00
Harald Hoyer e93d0bea38 test: include kernel-network-modules for network tests 2015-03-26 10:57:58 +01:00
James Lee 833e0f9e83 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.
2015-03-26 02:17:34 -04:00
James Lee c902aba0d4 crypt-loop: Fix decrypt when running at info log level
When booting with 'rd.info', the 'info' statements in the crypt-loop
module's 'loop_decrypt' function are output to stdout along with the key
that gets piped into the 'cryptsetup' command, which causes the crypt
device unlocking to fail.

There are two possible simple solutions to this problem:

1. Redirect the info messages to stderr (just add '>&2' at the end of
the info statements).

or

2. Remove the info statements altogether.

I have tested both and they both work, but this commit implements #2.
The existing info messages are long (they overflow 80 characters
easily) and redundant (the password prompt clearly indicates what is
happening), and just generally not useful.  Given that no one has
reported or fixed this bug in the three years that this module has
existed, no one will miss these info messages.

The commit also changes an error message in the same function to be more
descriptive.
2015-03-25 23:31:24 -04:00
Harald Hoyer 2bc5054a64 Merge pull request #35 from enovance/fix_include_variables_name
dracut: Ajusting variables name for --include
2015-03-24 20:46:06 +01:00
Harald Hoyer b67d810785 dracut.spec: add new modules 2015-03-24 16:10:45 +01:00
Harald Hoyer bbbdba2ec3 fcoe/lldpad.sh: add executable flags 2015-03-24 16:03:47 +01:00
Harald Hoyer 863e18b4cd crypt-loop/module-setup.sh: make module-setup.sh executable 2015-03-24 16:03:47 +01:00
Harald Hoyer a18d5494eb dracut-systemd/module-setup.sh: make module-setup.sh executable 2015-03-24 16:03:47 +01:00
Harald Hoyer cbb4b50e02 systemd-networkd: add experimental systemd-networkd support 2015-03-24 16:03:47 +01:00
Harald Hoyer ae43adb70d network: split out kernel-network-modules 2015-03-24 16:03:47 +01:00