Commit Graph

62 Commits (053)

Author SHA1 Message Date
Zoltán Böszörményi 767fbf81b6 fix(network-manager): allow override network manager version
With dracutsysrootdir set and foreign binaries in sysroot,
running NetworkManager --version is not possible and it may be
different than the one installed on the host.
NM_VERSION can be used to override it.

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
2021-02-09 07:09:28 +00:00
Zoltán Böszörményi 18d36fabf5 feat(dracut.sh): allow overriding the systemctl command for sysroot
Allow overriding the systemctl command for sysroot with $SYSTEMCTL
Modified every modules' module-setup.sh to use the envvar instead
of the hardcoded command name.

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
2021-02-09 07:09:28 +00:00
Vladius25 f3cbff1113 feat(cli): add --no-uefi option
To be able to turn off UEFI mode, when it's enabled in config.
2021-01-18 08:30:00 +00:00
Daniel Molkentin e473057ae1 Update AUTHORS, NEWS 2020-12-14 15:34:35 +01:00
Daniel Molkentin 3a12309c0d Revert "Add --uefi-output for custom output filename"
This reverts commit f8f3b0f358.
2020-12-02 00:25:20 +01:00
leo-lb f8f3b0f358 Add --uefi-output for custom output filename
Closes #921
2020-11-24 19:38:30 +01:00
Daniel Molkentin a5372b8ba8 Add --version to man page 2020-08-28 23:28:25 +02:00
Donovan Tremura 4237aeb040 Support the EFI Stub loader's splash image feature.
Checks if `uefi_splash_image` exists in `dracutsysroot` if not unset
`uefi_splash_image`. Alternate Value parameter expansion adds section-vma
for splash image to EFI stub loader when the path to image is valid and
not an empty file.

I did not test on other distributions, but on Arch Linux the `systemd`
package includes a splash image at the path
`/usr/share/systemd/bootctl/splash-arch.bmp`. Perhaps, if this is a
common practice, a default image could be gathered from that directory.

It is required that the image be in bitmap (`.bmp`) format according to
`splash.c`.

The code for `stub.c` and `splash.c` can be found at:
https://github.com/systemd/systemd/blob/master/src/boot/efi/stub.c
https://github.com/systemd/systemd/blob/master/src/boot/efi/splash.c
2020-02-20 11:03:30 +01:00
Daniel Molkentin 50057af19c Documentation: dynamically set current version
Fixes #369
2019-11-12 13:24:41 +01:00
Böszörményi Zoltán 4efcd19a4e Add documentation and Yocto examples
Signed-off-by: Böszörményi Zoltán <zboszor@pr.hu>
2019-10-25 11:58:58 +02:00
Daniel Molkentin d00cfc2a7b Remove obsolete prelinking functionality 2018-06-14 12:58:59 +02:00
tpgxyz 7dbadcc749 add support for Zstandard 2017-09-05 01:23:38 +02:00
Xunlei Pang 37f2fe55d1 dracut.sh: introduce "--no-hostonly-default-device" argument
Kdump doesn't need default host devices like root, swap, fstab, etc,
we only care about the dump target which can be added via "--mount"
or "--add-device". We met several issues that kdump kernel failed
due to one of those host devices added by dracut, additionally, the
needless devices(e.g. LVM) consume some appreciable amount of memory
which is more likely to cause OOM under memory-limited kdump.

So this patch introduced "--no-hostonly-default-device" to avoid
adding those default devices as host_devs.

Signed-off-by: Xunlei Pang <xlpang@redhat.com>
2017-08-18 09:58:08 +08:00
Harald Hoyer 53475faa81 Correct path for UEFI stub
respect any $prefix given to the systemd installation

https://github.com/dracutdevs/dracut/pull/196
2017-03-20 11:43:04 +01:00
Harald Hoyer 5c57209ba5 dracut.sh: add default path for --uefi
The default output filename for --uefi is
<EFI>/EFI/Linux/linux-$kernel$-<MACHINE_ID>-<BUILD_ID>.efi.
<EFI> might be /efi, /boot or /boot/efi depending on where the ESP partition
is mounted. The <BUILD_ID> is taken from BUILD_ID in /usr/lib/os-release or
if it exists /etc/os-release and is left out, if BUILD_ID is non-existant or
empty.

Also a new option --no-machineid was added, which affects the default output
filename of --uefi and will discard the <MACHINE_ID> part.
2017-01-16 14:27:39 +01:00
Harald Hoyer bd98b88447 dracut.8: document INITRD_COMPRESS environment variable
https://bugzilla.redhat.com/show_bug.cgi?id=1389775
2016-11-02 13:49:17 +01:00
Harald Hoyer fe6455a6e8 documentation: "--hostonly-i18n" "--no-hostonly-i18n" "i18n_install_all" 2016-02-29 13:12:02 +01:00
Harald Hoyer 319867faa8 man: clarify add_dracutmodules vs dracutmodules 2015-11-25 14:21:33 +01:00
Fabian edbd9ca058 dracut.sh: Support --mount with just mountpoint as parameter
Right now the --mount parameter of dracut expects a rather long fstab-like
line. This makes it possible to invoke dracut with e.g. --mount /boot.
2015-11-13 13:21:43 +01:00
Harald Hoyer 4a6c14f987 repro squash 2015-11-13 13:14:05 +01:00
Harald Hoyer 820f81016a dracut.8.asc: mention lsinitrd(1) in see also 2015-09-09 11:30:52 +02:00
Jan Synacek ca96509c97 doc: fix formatting 2015-06-15 09:58:28 +02:00
Harald Hoyer 636d2d46a5 dracut.sh: add support for creating a UEFI boot executable
With an EFI stub, the kernel, the initramfs and a kernel cmdline can be
glued together to a single UEFI executable, which can be booted by a
UEFI BIOS.
2015-03-20 14:31:23 +01:00
Jan Synacek 05b879ed2a doc: fix typo 2015-02-10 12:22:16 +01:00
Harald Hoyer 37383f7123 add "--loginstall <DIR>" and loginstall="<DIR>" options
loginstall specifies a directory, in which dracut-install records all
files, which were installed from the host system to the initramfs.

Use case is e.g. to create a list of packages to watch for updates, to
maybe trigger a recreation of the initramfs.
2014-09-11 16:42:36 +02:00
Thomas Renninger cea907f6bf dracut: Introduce --force-drivers parameter and force_drivers=+ config option
Which will not only add listed drivers, but also enforce that they are
tried to be loaded at early boot time.

This is needed if drivers which are not autoloaded (e.g. loop and a lot
others) shall get loaded via initramfs.
2014-09-08 12:37:52 +02:00
Harald Hoyer 80626ded3e Generate reproducible initramfs images
With the same source of files, it should be possible to generate the
same image file with every dracut run.

To accomplish this, we modify the timestamps of the files we generate at
runtime, call gzip with "-n" and cpio with "--reproducible".

The cpio --reproducible option is not yet upstream though, so if you
feel like it should be then please nag at the cpio mailing list.
http://lists.gnu.org/archive/html/bug-cpio/2014-08/msg00000.html
2014-08-15 13:52:02 +02:00
Harald Hoyer 54b68829b6 add "--install-optional" and install_optional_items 2014-07-22 14:09:06 +02:00
Dave Young 5f6a495bf4 add default values in fstab_lines
It's useful for passing a full fstab line including like fs_passno so fsck
can take effect.

Previously it's assumed that there's no fs_freq and fs_passno in fstab lines
so original code just append "0 0" at the end of each fstab lines.

Improve this issue by assign default value in case they are not passed in.
Three field are handled here:
fs_mntops: default to "defaults"
fs_freq: default to "0"
fs_passno: default to "2"

Signed-off-by: Dave Young <dyoung@redhat.com>
2014-02-28 12:10:47 +01:00
Harald Hoyer ab9457efd7 Add flag to toggle hostonly cmdline storing in the initramfs
--hostonly-cmdline:
    Store kernel command line arguments needed in the initramfs

--no-hostonly-cmdline:
    Do not store kernel command line arguments needed in the initramfs
2014-02-26 15:01:55 +01:00
Harald Hoyer ef9ddb915b documentation: line wrap 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
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 b6c8976811 Doc: cleanup, extend and split and reuse 2013-10-08 15:13:12 +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
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 c33488feb1 rename sosreport to rdsosreport
Renamed sosreport to rdsosreport to differ from the sosreport tool on
the real root.
2013-07-17 14:31:59 +02:00
Harald Hoyer ea3c4e8273 Add missing options to manpage and --help output
https://bugzilla.redhat.com/show_bug.cgi?id=948510
2013-04-05 09:01:48 +02:00
Harald Hoyer 7d848c55a6 dracut.sh: add --regenerate-all 2013-03-13 13:01:33 +01:00
Harald Hoyer c4e098a514 document /usr/lib/dracut/dracut.conf.d 2013-03-07 11:44:44 +01:00
Colin Guthrie c586b033a7 Extend 52f1b041 to allow devices to be specified in config files as well as cmdline.
This also changes the command line switch to be --add-device and the
config directive is set to add_device. This was chosen as device= in the
config file seems too generic and not quite as consistent with other
directives (i.e. drivers/add_drivers)

The --device command line is still supported but it should be considered
deprecated in favour of --add-device.
2013-01-23 15:24:27 +01:00
Harald Hoyer 64d144aece Add sosreport script and generate /run/initramfs/sosreport.txt 2012-11-21 14:17:43 +01:00
Harald Hoyer 6c128565b1 strip initramfs binaries by default (not all for FIPS) 2012-10-16 14:55:45 +02:00
Harald Hoyer 3cff5fb56f dracut*.asc: add documentation about /etc/cmdline.d/*.conf 2012-10-10 15:25:48 +02:00
Harald Hoyer d20fb951fa add "--kernel-cmdline" and kernel_cmdline options for default parameters 2012-10-04 13:23:19 -04:00
dyoung@redhat.com 52f1b04183 Add a dracut option --device to bring up a device in initramfs
Kdump support dump to raw device which could be on top of complex storage
such as multipath and iscsi which are standalone dracut modules.

Add a --device option to dracut which will add the device to host_devs so
dracut can add the dependent modules automaticlly and enable them in initramfs.

--device will accept device node name as the param.

Signed-off-by: Dave Young <dyoung@redhat.com>
Tested-by: Chao Wang <chaowang@redhat.com>
2012-08-23 10:15:09 +02:00
Harald Hoyer 472189da15 dracut.sh: add -N option for --no-hostonly 2012-07-21 13:03:56 +02:00
Harald Hoyer 4c3be42cdf dracut.8: add more description about calling dracut 2012-07-21 12:52:01 +02:00