Commit Graph

3770 Commits (038)

Author SHA1 Message Date
Colin Guthrie 8da51857f0 dracut.sh: Fix variable name typo.
This caused the root_dev variable not to be set which in turn meant that
the root device was not whitelisted in 99base/module-setup.sh when injecting
compile-time devexists hooks in hostonly initrds. This ties the generated
initrd to the root fs device (typically the UUID) rather than relying solely
only the root= kernel command line.

While it is hostonly, not hardcoding e.g. UUIDs is still desirable. Any
swap partition on the host device is still added however.
2014-02-07 18:05:48 +01:00
Brian C. Lane 460cddffa1 new_dhcp_next_server is really new_next_server
The variable that dhclient sets doesn't have dhcp in the name. This
could cause problems with setups where the server is not the same as the
dhcp server.
2014-02-07 18:05:48 +01:00
Harald Hoyer fac3275a43 network:fix dns parsing in ip= parameter 2014-02-07 15:41:50 +01:00
Harald Hoyer 30e6e809ed 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.
2014-02-06 16:45:20 +01:00
Harald Hoyer 8d21728942 systemd: add sys-kernel-config.mount 2014-02-05 13:58:33 +01:00
Harald Hoyer 352d557d4d Do not reload systemd with wait_for_dev 2014-02-05 13:12:29 +01:00
Harald Hoyer 751c7de98a systemd/dracut-pre-pivot: run for /dev/{nfs,root} and cleanup /dev/nfs
dracut-pre-pivot was not cleaning up /dev/nfs and did not run to clean
up /dev/root.
2014-02-05 13:08:54 +01:00
Harald Hoyer 81aed4f28e nfs/nfsroot: symlink /dev/null to /dev/nfs, as a marker for root=/dev/nfs 2014-02-05 13:06:29 +01:00
Harald Hoyer c84618d7ac network/ifup: do not run dhclient twice on the same interface 2014-02-04 12:02:34 +01:00
Harald Hoyer d61a423f7c network/ifup: do not ifup an already setup network interface 2014-02-04 12:02:05 +01:00
Harald Hoyer f52759131b test: include the same Makefile.testdir 2014-02-04 12:01:11 +01:00
Harald Hoyer c860837303 base/rdsosreport.sh: add dracut version to rdsosreport 2014-01-31 15:33:41 +01:00
Harald Hoyer 1982098e00 network/ifup.sh: handle $dns1 and $dns2 from "ip=" settings 2014-01-30 17:38:27 +01:00
Harald Hoyer e95e48c6ee network/net-lib.sh: parse ibft nameserver settings 2014-01-30 17:38:27 +01:00
Harald Hoyer f57850d7e8 dracut-functions.sh: also search in the updates directory 2014-01-30 17:38:27 +01:00
Harald Hoyer c8a9a6b4a7 dracut.sh: only set the owner of files to 0:0, if generated as non-root
If the root user generates the initramfs image, preserve the ownership
of the files. This of course cannot be done for non-root users
generating an initramfs image.
2014-01-30 16:18:04 +01:00
Harald Hoyer 66bfe863f5 network: understand ip=.....:<dns1>:<dns2> 2014-01-30 13:50:02 +01:00
Harald Hoyer d50a99c5ce NEWS: update for version 036 2014-01-29 08:37:43 +01:00
Harald Hoyer a7316ae4f7 skipcpio: fixed signatured check 2014-01-29 08:35:47 +01:00
Cristian Rodríguez 6b449e8a6d skipcpio: return something at end of program
Otherwise the compiler emits a warning and the return vale is
in theory undefined.
2014-01-29 08:32:17 +01:00
Harald Hoyer ba9368fa4f dmsquash-live/dmsquash-liveiso-genrules.sh: s/loop0/loop-control/
If loop is a kernel module, /dev/loop0 will never show up as a udev
event, if the loop module is not manually loaded somewhere.
2014-01-28 18:33:36 +01:00
Stig Telfer 1f28dfb2e4 url-lib: extend to enable TFTP support
Libcurl has wider capabilities than those assigned to it by Dracut.
In this patch to url-lib I've added registration for TFTP URLs,
which I've found to be useful.

Enjoy,
Stig Telfer
2014-01-28 15:43:40 +01:00
Harald Hoyer 41351164f8 NEWS: dracut-035 2014-01-28 15:33:29 +01:00
Harald Hoyer 855a549660 Makefile: make dracut.html.sign depend on dracut.html 2014-01-28 15:07:21 +01:00
Harald Hoyer 5c5350b30b dracut.spec: add skipcpio 2014-01-28 12:21:33 +01:00
Stig Telfer 6cc8f694b5 dracut-lib.sh: bugfix for pidof function
In follow-up, the patch requires a second mod: kernel tasks have a /proc/.../exe that links to nothing and derails the for loop:
2014-01-28 12:19:27 +01:00
Stig Telfer abdf191b64 dracut-lib.sh: bugfix for pidof function
It appears there is a simple substitution error in the pidof shell function which causes it to fail to find processes.  In my case, processes started by 95nfs are not terminated in the cleanup hook.  This causes knock-on effects disturbing the root filesystem service dependencies.

Enjoy,
Stig Telfer
2014-01-28 12:19:26 +01:00
Harald Hoyer b5b31c9589 iscsi/iscsiroot.sh: beautify warning 2014-01-28 12:14:07 +01:00
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