Commit Graph

17 Commits (b80ee080937ce364f7324c297f23e40af6d88892)

Author SHA1 Message Date
Harald Hoyer 95013ffce9 fix: shellcheck for 50-dracut.install 2021-02-15 11:00:37 +01:00
Zbigniew Jędrzejewski-Szmek b1c5cae63f 50-dracut: synchronize option reading code with 51-dracut.install
initrd= option should also be dropped here. There is not reason
for the code to be different in the two places.
2019-08-27 18:33:13 +02:00
Zbigniew Jędrzejewski-Szmek 38b4f4b21c Do not require non-empty kernel cmdline
When booting with Fedora-Server-dvd-x86_64-30-20190411.n.0.iso,
/proc/cmdline is empty (libvirt, qemu host with bios, not sure if that
matters), after installation to disk, anaconda would "crash" in kernel-core
%posttrans, after calling kernel-install, because dracut would fail
with
> Could not determine the kernel command line parameters.
> Please specify the kernel command line in /etc/kernel/cmdline!

I guess it's legitimate, even if unusual, to have no cmdline parameters.
Two changes are done in this patch:
1. do not fail if the cmdline is empty.
2. if /usr/lib/kernel/cmdline or /etc/kernel/cmdline are present, but
   empty, ignore /proc/cmdline. If there's explicit configuration to
   have empty cmdline, don't ignore it.
2019-08-27 18:33:13 +02:00
Lukas Nykryn 48c283a296 dracut.install: call dracut with --force
The kernel-install is called even if you run make install.
Since we don't call dracut with -f a second make install will fail
because initrd with same version is already there.
This makes kernel developers feel miserable.

https://bugzilla.redhat.com/show_bug.cgi?id=1642402
2018-10-25 16:14:05 +02:00
Javier Martinez Canillas b39b8452d2 5?-dracut*.install: Allow scripts to install the initramfs in /boot dir
The GRUB 2 bootloaders expect the initrd to be installed in /boot instead
of /boot/$MACHINE_ID/$KERNEL_VERSION/{linux,initrd}, so if that directory
doesn't exists, install the initramfs images on the /boot directory.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2018-03-01 14:50:30 +01:00
Yu Watanabe b71d162a7a kernel-install: Skip to create initrd if /etc/machine-id is missing or empty
From systemd-234, kernel-install plugins are called even if /etc/machine-id
is missing or empty, and in that case BOOT_DIR_ABS is a fake directory.
So, let's skip to create initrd in that case.
2017-06-02 18:07:25 +09:00
Mike Gilbert 69395a528a 50-dracut.install: use /bin/bash shebang
This script utilizes several bash-specific constructs.
2016-11-04 13:09:28 -04: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
Dimitri John Ledkov a7d3ad67c7 Support /usr/lib/kernel/cmdline fallback path for /etc/kernel/cmdline. 2015-02-19 10:50:58 +01:00
Harald Hoyer 967cc19ab1 remove all vim and emacs code format comments 2014-08-29 13:38:47 +02:00
Harald Hoyer bc140a0b29 50-dracut.install: install pregenerated initrd
If there is an already pregenerated initrd at the same location as the
kernel install that and do not generate a new one.
2014-08-15 14:58:34 +02:00
Harald Hoyer ccb8ce0403 50-dracut.install: fixed /proc/cmdline reading
and beautified the code a bit
2014-08-15 14:58:02 +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 32bd2fbb4c use "rm --" to guard against filenames beginning with "-" 2013-06-28 10:31:18 +02:00
Harald Hoyer 83bb0893ed dracut.sh: Add --noimageifnotneeded parameter
Do not create an image in host-only mode, if no kernel driver is needed
and no $initdir/etc/cmdline/*.conf is generated.
2013-03-13 14:49:20 +01:00
Harald Hoyer 9dd9d81fc6 add 50-dracut.install 2013-03-07 10:08:35 +01:00