Commit Graph

3842 Commits (040)

Author SHA1 Message Date
Harald Hoyer 247d6d4270 network/dhclient-script.sh: set lease time
The dracut dhclient-script.sh should set address lifetimes to the DHCP
lease time, so that other stuff (like NetworkManager!) knows that the
address is temporary and was created by DHCP.

https://bugzilla.redhat.com/show_bug.cgi?id=1058519
2014-01-28 12:12:43 +01:00
Harald Hoyer 93f44f28a2 dracut-install.c: "make indent" 2014-01-24 15:31:26 +01:00
Harald Hoyer b208aad51c lsinitrd.sh: make use of the skipcpio utility
With the skipcpio utility, the whole contents of an initramfs with an
early cpio image can be displayed.
2014-01-24 15:30:22 +01:00
Harald Hoyer b9909e3341 dracut.sh: add early_cpio marker file to the early cpio 2014-01-24 15:29:24 +01:00
Harald Hoyer 9ea68421f6 add skipcpio utility
skipcpio skips a cpio archive at the beginning of a file.

It is used for skipping an early cpio archive for lsinitrd.
2014-01-24 15:27:51 +01:00
Harald Hoyer 8e5db363e8 dracut.sh: set file owners of early cpio files to 0:0 2014-01-24 15:27:15 +01:00
Harald Hoyer cd08059f49 dracut.sh: create early cpio dir for acpi tables 2014-01-24 15:26:43 +01:00
Harald Hoyer dade93b4eb Revert "dmraid: let dmraid setup the partitions"
This reverts commit fbf717086e.

dmraid seems to use "p" as a seperator by default.

Reverting to kpartx, until this is fixed.
2014-01-24 12:49:17 +01:00
Harald Hoyer f49ec88a3f dracut.sh: s#\"#'# for error messages 2014-01-24 12:49:17 +01:00
Harald Hoyer ae01bd1808 lsinitrd.sh: also print out the arguments used to create the initramfs 2014-01-24 12:49:17 +01:00
Hari Bathini 659dc319d9 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'.
2014-01-24 12:49:17 +01:00
Colin Guthrie e3469d76c7 crypt: Prevent asking for password multiple times if non-default crypt name is used.
If a non-default device mapper name is used for an encrypted partion is
used, (i.e. not luks-$UUID) due to parsing of /etc/crypttab, then the
short-circuits put in place to prevent asking the password twice do not
work.

This would not normally be an issue as the settled job itself should be
removed after it has run and thus cannot be run again. Sadly, due to
the corresponding udev rule using ACTION="add|changed", and the fact
that trying to unlock the device (whether successful or not) seems to
trigger a changed event, it means the settled job is recreated with
each itteration thus causing the whole loop to run again.

It is this situation that the short-circuit exits would normally come
into play but sadly do not work when non-standard names are used.

By the time the /tmp/cryptroot-asked-$2 file is written near the end of
the script, the value of $2 has already been lost due to the argument
parsing code's use of 'shift'. So while on systems where the default
name is used are protected by checking /dev/mapper/xxxx, the
/tmp/cryptroot-asked-$2 file didn't help on systems where this was not
used due to this bug.

So this commit shuffles things around somewhat such that:

 1. The /dev/mapper/xxxx device is checked *after* resolving $2 (which
    contains the default name) to whatever /etc/crypttab specifies.
 2. The cryptroot-asked-xxxx file also uses the translated name both
    for the initial check and to flag when it's written.

As a separate fix, it might make sense to change the udev rule to only
act on add events rather than add|change events, but I'm not sure of the
ramifications of such a change and there may be cases where the add
event is missed and thus the change event needs to be included.
2014-01-24 12:49:17 +01:00
Koen Kooi 149965bd13 dracut-initramfs-restore,lsinitrd: add LZ4 support
Dracut claims to have LZ4 support, but trying to use it will result in an xzcat failure at the end due to missing CAT support.

The lz4 command chokes on '--', so abstract that out into the CAT select.

Something similar will need to be done for LZO.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
2014-01-24 12:49:16 +01:00
Koen Kooi a76a22b779 Use builtin xz/lzma option to use all cores for multihreaded compression
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>
2014-01-24 12:49:16 +01:00
Alexander Tsoy 64fb0900cb udev-rules: add eudev rules
eudev configured with "--enable-modules --disable-libkmod" installs
80-drivers-modprobe.rules instead of 80-drivers.rules

https://bugs.gentoo.org/show_bug.cgi?id=494188
2014-01-24 12:49:16 +01:00
Cristian Rodríguez 314929920f systemd: ensure autofs4 and ipv6 are included
Systemd tries to load this modules very early.
Even though they are not strictly required it it is a good
thing to have them around.

[Edited-by: Harald Hoyer: moved to installkernel() ]
2014-01-24 12:48:08 +01:00
Harald Hoyer c7e15f0891 iscsi: more iscsiroot fixes
handle iscsiroot with firmware more gracefully
2014-01-22 17:40:10 +01:00
Harald Hoyer 856d659016 dracut-logger.sh: systemd-cat only understands prio 0-7 2014-01-22 11:48:45 +01:00
Harald Hoyer 80525318b7 TODO: update 2014-01-22 11:27:09 +01:00
Harald Hoyer e2ecc2d8c6 base/dracut-lib.sh: "halt" the machine in systemd mode for die()
and only go in emergency shell if "rd.debug" is specified

https://bugzilla.redhat.com/show_bug.cgi?id=1053655
2014-01-22 11:18:47 +01:00
Harald Hoyer b40e38db98 dracut.spec: add --without doc feature 2014-01-17 14:52:11 +01:00
Harald Hoyer 21a3aab720 iscsi: call "iscsistart -b" until it succeeds 2014-01-17 14:52:01 +01:00
Harald Hoyer ee9938572e network: add rd.bootif=0 to ignore BOOTIF
https://bugzilla.redhat.com/show_bug.cgi?id=1044623
2014-01-17 14:52:01 +01:00
Harald Hoyer 256c91f837 systemd/module-setup.sh: make use of "ln_r" 2014-01-17 14:52:01 +01:00
Harald Hoyer 8229d06b05 systemd: add seat udev rules and mask loginctl 2014-01-17 14:52:01 +01:00
Harald Hoyer a0cab31ab8 systemd: add 71-seat.rules 73-seat-late.rules
otherwise plymouth does not work
2014-01-17 14:52:01 +01:00
Harald Hoyer d0d61e44be systemd/rootfs-generator.sh: ignore legacy root=/dev/nfs 2014-01-17 14:52:01 +01:00
Harald Hoyer 75e4cbb7be systemd/rootfs-generator.sh: exit 0 2014-01-17 14:52:01 +01:00
Harald Hoyer 45404a2ad8 dracut-install,dracut: fix ldd output parsing
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
2014-01-17 14:52:01 +01:00
Harald Hoyer 7e916ae4e0 network: include all ethernet drivers 2014-01-15 14:40:12 +01:00
Harald Hoyer ef9ddb915b documentation: line wrap 2014-01-13 09:51:04 +01:00
Harald Hoyer a956a464ef dracut.sh: add /boot/efi to device paths
Add /boot/efi to device paths, so the filesystem driver is included
and it can be repaired in the initramfs.
2014-01-13 09:51:04 +01:00
Harald Hoyer 87483405a0 dracut.sh: add missing piece for option --add-device 2014-01-13 09:51:04 +01:00
Harald Hoyer 8c828f329b iscsi/iscsiroot.sh: do not trust iscsistart return value 2014-01-13 09:51:04 +01:00
Harald Hoyer 9a3676a88f systemd/dracut-initqueue.sh: fstab is not a directory 2014-01-13 09:51:04 +01:00
Harald Hoyer 53cf50e00f fcoe-uefi: do not include, if fcoe utils not installed 2014-01-13 09:51:04 +01:00
Harald Hoyer 53c1e4834f TODO: update 2014-01-13 09:51:04 +01:00
Harald Hoyer df6e79bfd2 resume/parse-resume.sh: fixed printf formatting
https://bugzilla.redhat.com/show_bug.cgi?id=1045704
2014-01-13 09:51:03 +01:00
Harald Hoyer 5db9c5c1d9 change dracut tarball compression to xz 2014-01-07 12:21:39 +01:00
Harald Hoyer bb1ba3a1ca resume: fixed udev rule for /dev/resume instead of /dev/dev/resume
https://bugzilla.redhat.com/show_bug.cgi?id=1045116
2013-12-19 17:09:55 +01:00
Harald Hoyer 3ad42552ca network: include usbnet drivers 2013-12-19 17:06:48 +01:00
Harald Hoyer 2f461da2a0 install: install all PATH binaries found
This should fix the issues with symlinks in /bin pointing to /usr/bin on
some distributions.
2013-12-19 17:00:18 +01:00
Harald Hoyer 3aa35b727f kernel-modules: add more block driver
e.g. nvme
2013-12-19 12:37:47 +01:00
Harald Hoyer ac5bff2b6f dracut-lib/wait_for_dev(): prevent systemd daemon-reload
prevent a systemd daemon-reload, if it is not necessary to do.
2013-12-18 15:22:27 +01:00
Harald Hoyer ab6f4a825e iscsi: do iscsi_firmware regardless of network
Do the iscsi_firmware iscsistart at least once, even if the network is
not up, to activate offload HBA iSCSI.

https://bugzilla.redhat.com/show_bug.cgi?id=1031160
2013-12-18 15:22:24 +01:00
Harald Hoyer 859e3a77d0 test/TEST-17-LVM-THIN: remove .testdir 2013-12-17 13:36:55 +01:00
Harald Hoyer 61a02caca4 test/TEST-17-LVM-THIN: add test case for lvm thin pools 2013-12-16 13:15:48 +01:00
Harald Hoyer 08f06c9341 dracut.spec: add 95fcoe-uefi and 99uefi-lib 2013-12-16 12:30:43 +01:00
Harald Hoyer 831625d29e lvm: fixed lvm thin check 2013-12-13 11:13:40 +01:00
Harald Hoyer 89031be373 move uefi-lib to a seperate module 2013-12-12 09:49:06 +01:00