Commit Graph

144 Commits (75e4cbb7beeb3ccf2042f58d0e3d6f02af8ca26f)

Author SHA1 Message Date
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 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
Hannes Reinecke ee54b8404c Make logfile configurable
Add '--logfile' option to make the log file configurable during
runtime.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2013-12-05 15:13:29 +01:00
Harald Hoyer b29cb51654 dracut-functions.sh: do not force require modules.builtin* 2013-12-05 15:13:29 +01:00
Harald Hoyer 64ae4e07a4 dracut.sh: skip crypt swaps with password files 2013-12-03 16:21:04 +01:00
Harald Hoyer e41f3f9025 dracut.sh:_get_fs_type() if block device exists return early
even, if no ID_FS_TYPE was found, return if the block device exists
2013-12-03 16:21:04 +01:00
Vratislav Podzimek a3bfaa1919 Run 'xz' and 'lzma' with multiple threads
This speeds up compression a lot on multicore systems.

https://bugzilla.redhat.com/show_bug.cgi?id=1029786

[Edited-by: Harald Hoyer: use getconf for cpu_count]
2013-11-13 13:20:39 +01:00
Harald Hoyer cf3fd99e72 dracut.sh: fixed PATH shortener 2013-11-02 13:14:40 +01:00
Harald Hoyer 4d7c18c7c0 Handle crypto modules with and without modaliases
If new kernels have modules split out, handle the case, where modules
have to modalias and just install them.

Also add the crypto drivers and names to host_modalias.
2013-10-30 12:24:37 +01:00
Harald Hoyer 8d89fc6bb1 dracut.sh: no need to make subdirs in run 2013-10-16 11:39:17 +02:00
Harald Hoyer 68b736b50f dracut.sh: also mkdir /run/lock, which is copied to 2013-10-16 11:31:54 +02:00
P J P 871c8e40d1 Add lzo, lz4 compression and read INITRD_COMPRESS
This patch adds support for lzop(1) & lz4(1) compression
algorithms to compress iniramfs image file. Both are supported
by the Linux kernel.

Linux kernel exports user's choice of initramfs compression
algorithm as a shell environment variable: INITRD_COMPRESS.
This patch adds support to read this variable and duly compress
the initramfs image file.

Environment variable INITRD_COMPRESS has less precedence than the
command line options --gzip, etc. Ie. command line options could
override the compression algorithm defined by $INITRD_COMPRESS.

Signed-off-by: P J P <ppandit@redhat.com>

[Edited-by: Harald Hoyer: add documentation about lzo and lz4]
2013-10-14 09:38:06 +02:00
Harald Hoyer 05214a0bed dracut.sh: do not bail out, if kernel modules dir is missing
and only print a warning message
2013-10-08 15:05:21 +02:00
Harald Hoyer 96cf7270da dracut.sh: bail out early, if destination dir is not writeable 2013-10-02 12:48:11 +02:00
Thomas Renninger f3b14c2b6a dracut: Implement ACPI table overriding
An example config file for this feature could be:

/etc/dracut.conf.d/03-acpi-override.conf

with this content:
acpi_override="yes"
acpi_table_dir="/etc/dracut.conf.d/acpi_tables"

Then all files ending with *.aml will be put into the early cpio
(kernel/firmware/acpi) and will be used to replace the BIOS provided tables
if the kernel supports this feature.

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2013-10-02 12:47:11 +02:00
Thomas Renninger d8b04dc184 dracut: Do not create early_cpio if no suitable microcode exist in hostonly case
Intel microcodes only exist for very specific family/model/stepping CPUs.
If no microcode gets added, there is no need to create an empty
(only directories) cpio later that gets glued to the initrd.

This also fixes:

*** Constructing GenuineIntel.bin ****
cat: /lib/firmware/intel-ucode/06-3c-03: No such file or directory

in hostonly mode if there is no suitable microcode for the CPU.

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2013-10-02 12:47:11 +02:00
Thomas Renninger b5b608e44a dracut: Generlize microcode early cpio usage
ACPI early table override also may need to place files into an early cpio.
Reflect this in variable and file names.
This change is renaming only and does not introduce any real change.

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
2013-10-02 12:47:11 +02:00
Harald Hoyer f4a942783a Add option to turn on/off prelinking
--prelink, --noprelink

do_prelink=[yes|no]
2013-09-17 12:25:29 -05:00
Harald Hoyer 3b9aaaab42 dracut.sh: we don't need to read the modalias files
udev does only parse the uevent MODALIAS line, so whatever is in the
modalias files would not trigger any module load.
2013-09-13 18:05:48 +02:00
Harald Hoyer fc68c87afa dracut.sh: also search uevent's for MODALIAS 2013-09-13 17:34:18 +02:00
Harald Hoyer 57f90974f9 dracut.sh: harden host_modalias reading
Some weird PPC driver make their modulias unreadable

$ cat /sys/devices/vio/4000/modalias
cat: /sys/devices/vio/4000/modalias: No such device
2013-09-13 16:33:01 +02:00
Colin Walters 36b2e5e2c2 dracut.sh: Fixup previous commit to only read /sys and /proc in hostonly mode
The gnome-ostree build system generates dracut initramfs images on the
build server, therefore not in hostonly mode.  The build system at the
moment doesn't mount /sys, and the previous commit caused a hard
failure due to lack of /sys/devices.

Because we only want /sys/devices in hostonly mode, just move those
bits inside the hostonly conditional above.
2013-09-11 22:50:22 +02:00
Harald Hoyer 3c4315fa13 dracut-functions.sh: extend module_is_host_only()
If the currently running kernel is not present in the installer root,
fall back to modalias checking.
2013-09-11 12:53:50 +02:00
Harald Hoyer 540a5169b9 dracut.sh: reorder things to let "--print-cmdline" work 2013-09-09 16:52:19 +02:00
Harald Hoyer ffc68f357e use ${var:+val} rather than ${var+val}
${var:+val} also catches var=""
2013-08-22 11:24:01 +02:00
Harald Hoyer c82a11334d dracut-functions.sh: add expand_persistent_dev()
also fixes missing '{' for LABEL=... swaps
2013-08-20 16:03:17 +02:00
Harald Hoyer 546d5dacf5 dracut.sh: recognize swap entries in fstab with mountpoint "none" 2013-08-20 12:01:17 +02:00
Harald Hoyer 3411ad661a add persistent_policy configuration option 2013-08-20 10:28:14 +02:00
Harald Hoyer 88c86ac7f0 dracut.sh: fixed checking for FIPS mode 2013-08-20 09:02:48 +02:00
Daniel Schaal b7c770e186 dracut.sh: Fix [no-]early-microcode parameter and add documentation.
[no-]early-microcode was missing from getopt argument list.

Let arguments passed by command line override config files.
2013-08-19 11:13:04 +02:00
Harald Hoyer 324ea606da dracut.sh: add --persistent-policy option
--persistent-policy <policy>:
    Use <policy> to address disks and partitions.
    <policy> can be any directory name found in /dev/disk.
    E.g. "by-uuid", "by-label"
2013-08-16 11:52:07 +02:00
Harald Hoyer 1743473b2b add parameter --print-cmdline
This prints the kernel command line parameters for the current disk
layout.

$ dracut --print-cmdline
rd.luks.uuid=luks-e68c8906-6542-4a26-83c4-91b4dd9f0471
rd.lvm.lv=debian/root rd.lvm.lv=debian/usr root=/dev/mapper/debian-root
rootflags=rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered
rootfstype=ext4
2013-08-15 16:06:37 +02:00
Harald Hoyer 8df0b654dc rootfs-block: search all host_devs for a journal device 2013-08-15 11:14:47 +02:00
Harald Hoyer 69f7ed9610 Create initramfs without using udevadm
This enables building a hostonly image, without the udev database
populated.
2013-08-15 10:44:20 +02:00
Harald Hoyer af75a298c1 dracut.sh: always assemble /usr in the initramfs 2013-08-12 23:55:50 +02:00
Harald Hoyer 9fc144451d dracut.sh: always assemble /usr device in initramfs 2013-08-12 23:50:30 +02:00
Harald Hoyer e95b672376 dracut.sh: fixed typo 2013-08-12 12:46:35 +02:00
Harald Hoyer dadd2b698e dracut.sh: use local lsinitrd.sh for "-l" 2013-08-12 12:46:03 +02:00
Harald Hoyer aacdba2bdb dracut.sh: check the value of --kver
https://bugzilla.redhat.com/show_bug.cgi?id=993327
2013-08-07 10:33:15 +02:00
Harald Hoyer 5ae33613ab dracut.sh: do not strip in FIPS mode 2013-08-07 10:33:15 +02:00
Harald Hoyer af11946054 dracut-functions.sh: inst_multiple == dracut_install 2013-08-07 10:33:15 +02:00
Harald Hoyer a4f7b50471 dracut.sh/dracut-functions.sh: handle root on non-block device 2013-08-07 10:33:14 +02:00
Harald Hoyer 283c34fc2b dracut.sh: call find with -print0 and cpio with --null 2013-08-07 10:33:14 +02:00
Harald Hoyer dba2055979 remove "< <(" syntax
bash seems to want /dev/fd in that case. dracut is sometimes called in
environments, where /proc and /dev are not mounted.
2013-07-31 11:00:29 +02:00
Harald Hoyer 7fd850d58e dracut.sh: check for file existance before trying to read from it 2013-07-30 15:33:10 +02:00
Harald Hoyer d624f60682 dracut.sh: check for /sbin /bin /lib
use readlink to detect, if /usr has to be mounted
2013-07-24 13:43:32 +02:00
Harald Hoyer bbaa0d5917 Use systemd-cat for logging on systemd systems, if logfile is empty 2013-07-19 09:34:45 +02:00
Harald Hoyer 5bbfd48475 dracut: do not enable early microcode inclusion by default 2013-07-17 14:36:34 +02:00
Harald Hoyer 5a6a98f875 do not wait_for_dev for the root device
it's specified on the kernel command line
2013-07-17 12:03:01 +02:00