Daniel Molkentin
8b6d136e62
Make binutils optional when elfutils are available
...
This is intended for minimum host OSes where 36 MB used by binutils
are deemed too expensive. We only need "strip", which exists as eu-strip
in elfutils, which in turn is < 1 MB in size.
Note that the tests (TEST-04-FULL-SYSTEMD/test.sh) still depend on
strip from binutils. It could use sstrip in the future.
8 years ago
Harald Hoyer
f0bfada399
dracut.sh: strip NUL bytes in stream before push in string
...
seems like bash-4.4 does not like NUL bytes in variables
8 years ago
Harald Hoyer
53475faa81
Correct path for UEFI stub
...
respect any $prefix given to the systemd installation
https://github.com/dracutdevs/dracut/pull/196
8 years ago
Harald Hoyer
647b521fc7
dracut: check for EUID instead of UID
8 years ago
Harald Hoyer
83a6d6f928
dracut.sh: add /dev/random and /dev/urandom to static device nodes
...
otherwise libgcrypt might complain
https://bugzilla.redhat.com/show_bug.cgi?id=1401444
8 years ago
Harald Hoyer
8a32bf6107
dracut: unset LC_* after setting LANG and LC_ALL
...
otherwise bash/glibc might complain verbosely about not finding locales
8 years ago
Harald Hoyer
7e51a94f5b
Do not "cp" the selinux context
...
replace "cp -a" with $DRACUT_CP, so in case the selinux policy disallows
root to set the selinux context in /var/tmp, dracut does not fail.
8 years ago
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.
8 years ago
Andreas Stieger
0db98910a1
dracut.sh: create the initramfs non-world readable also if early cpio is used
...
Fixes: 5f2c30d9bc
Previously fixed CVE-2012-4453: e1b48995c2
Signed-off-by: Andreas Stieger <astieger@suse.com>
8 years ago
David Disseldorp
bafc82e732
dracut.sh: support --tmpdir as a relative path
...
Dracut changes working directory before attempting to output files under
$DRACUT_TMPDIR , resulting in an IO failure if $DRACUT_TMPDIR is a path
relative to the working directory when dracut was started.
Fixes: https://github.com/dracutdevs/dracut/issues/156
Signed-off-by: David Disseldorp <ddiss@suse.de>
8 years ago
Harald Hoyer
f367b73852
dracut.sh: document --hostonly-i18n and --no-hostonly-i18n
...
show description in --help
https://bugzilla.redhat.com/show_bug.cgi?id=1266448
(cherry picked from commit 91896ab68e
)
9 years ago
Harald Hoyer
3889234f71
dracut.sh: make tmp dirs after the trap function is installed
...
otherwise a good timed ctrl-c will leave the tmp dir around
9 years ago
Colin Guthrie
55b99a0e4c
dracut.sh: fix $tmpfilesdir fallback when systemd-devel is not installed.
...
Bug introduced in 3a04bddeed
in Dec 2014.
9 years ago
Harald Hoyer
3f60444ec1
removed obsolete kernel module functions and host_modules variable
...
module_is_host_only()
find_kernel_modules_by_path()
find_kernel_modules()
9 years ago
Harald Hoyer
794b2d2c75
Use dracut-install to install kernel modules
...
dracut-install can now install kernel modules and their corresponding
firmware files.
9 years ago
Harald Hoyer
f7f5b82b43
dracut.sh: call dracut-install with "-f" in FIPS mode
...
in fips mode, dracut-install was called with "-H" instead of "-f" in
FIPS mode
missed conversion of commit 26cd262a6a
9 years ago
Fabian Vogt
43819af68c
Correctly handle module aliases
...
Handle module aliases correctly to not generate unbootable
initrds with different kernel versions when modules were renamed
or replaced.
Signed-off-by: Fabian Vogt <fvogt@suse.com>
9 years ago
Harald Hoyer
b019952f6d
dracut.sh: fail hard, if we find modules and modules.dep is missing
...
If modules are present in /lib/modules/<kernelversion> and modules.dep
is empty, depmod was not run most likely.
9 years ago
Harald Hoyer
60928f36b6
dracut.sh: restorecon final image file
...
Instead of "mv" use "cp --reflink=auto" and restorecon the final image
9 years ago
Harald Hoyer
62c00a8896
dracut.sh: only create one TMPDIR
...
use DRACUT_TMPDIR subdirs for everything
9 years ago
Harald Hoyer
c44d2252bb
dracut.sh: for microcode generation, skip gpg files
...
skip all ".asc" files for the AMD microcode generation
9 years ago
Harald Hoyer
27d7936f0e
dracut.sh: save systemdutildir env
...
even, if no systemd is used, we need that variable for systemd-udevd
9 years ago
Harald Hoyer
2da041d672
Check for systemd before installing systemd specific files
...
https://bugzilla.redhat.com/show_bug.cgi?id=1282010
9 years ago
Harald Hoyer
63a44c8dc3
dracut.sh: add back host_modules part
...
host_modules was removed accidently while remove host_modaliases
9 years ago
Harald Hoyer
07a081f352
dracut.sh: remove the concept of host_modalias
...
We can never gather enough information about compiled in modules, so
don't pretend to know and do smart decisions.
9 years ago
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.
9 years ago
Harald Hoyer
10f8df1bdf
add --no-reproducible to turn off reproducible mode
...
Also warn about cpio not supporting it and turn it on by default for
fedora.
9 years ago
Harald Hoyer
b44156c6fc
dracut.sh: fixed typo in microcode generation
...
(cherry picked from commit a594b4e357
)
9 years ago
Harald Hoyer
efba549a26
dracut.sh: no microcode, if get_ucode_file returns empty file
...
check, if get_ucode_file() returned an empty string.
(cherry picked from commit 327d765512
)
9 years ago
Harald Hoyer
583fb23199
dracut.sh: do not create microcode, if no firmware is available
...
(cherry picked from commit 13b5c1d09e
)
9 years ago
Harald Hoyer
b73e00aff7
dracut.sh: add command line option for install_i18_all
...
--no-hostonly-i18n -> install_i18n_all=yes
--hostonly-i18n -> install_i18n_all=no
(cherry picked from commit 34b551a1c4
)
9 years ago
Harald Hoyer
2cc5e92e21
dracut.sh: quote $outfile on error removal
9 years ago
Harald Hoyer
875426f2fc
dracut.sh: remove "_EARLY" from CONFIG_MICROCODE_* checks
...
EARLY is merged in the main driver
9 years ago
Lidong Zhong
aa169b3bd3
dracut.sh: remove duplicate call of push_host_devs
...
There is no way exit between the two places that call push_host_devs
10 years ago
Harald Hoyer
3c00189988
dracut.sh: remove quotes from install_items and install_optional_items
...
Unfortunately these are lists with whitespaces.
10 years ago
Harald Hoyer
96d694c0b5
dracut.sh: simplify modalias reading
10 years ago
Harald Hoyer
693b7a3283
Cleanup compressor handling
...
If no compressor is specified, try to find a suitable one.
Check if kernel modules can be uncompressed.
10 years ago
Chao Fan
7eeaa4ab14
remove the incomplete .img file
...
If the directory where the .img file is saved has no enough space, or in
other wrong conditions, dracut will get an incomplete file xxx.img. But
sometimes this .img file will be loaded when rebooting the system. And then
some bugs will happen because this .img file is wrong.
So I think dracut should remove the incomplete file because this .img file
with problems was made by dracut. And then the wrong file will not be loaded
anymore.
Signed-off-by: Chao Fan <cfan@redhat.com>
10 years ago
Harald Hoyer
e50f91e600
use mktemp "-p" instead of "--tmpdir" for busybox
10 years ago
Harald Hoyer
ee44f62972
dracut.sh: early check for bash version
10 years ago
Harald Hoyer
e8f19bcf26
dracut.sh: remember $0 for --regenerate-all
10 years ago
Harald Hoyer
cb0913db0d
dracut.sh: reduce code
10 years ago
Harald Hoyer
3721635b2c
guard ${arrays[@]} with ""
10 years ago
Harald Hoyer
694725abf0
dracut.sh: remove pop()
10 years ago
Harald Hoyer
5a66d51102
dracut.sh: remove push()
...
can be done with var+=(val)
10 years ago
Harald Hoyer
1cadc26fd4
Add all btrfs devices
...
We have to find them with "btrfs usage", which is cumbersome.
10 years ago
Harald Hoyer
777f2db037
splitup dracut-init.sh from dracut-functions.sh
...
other tools want to source dracut-functions.sh without any mkdir side
effects.
10 years ago
Harald Hoyer
916559e073
dracut.sh: add devices with x-initrd.mount in /etc/fstab to host_devs
...
otherwise dracut might not even be able to mount those.
10 years ago
Dimitri John Ledkov
80dab03a7d
Fix default udev & systemd dir detection, in usr-merge configurations.
...
Test that /lib is not a symlink, before using split-usr paths.
10 years ago
Christian Rodrigues
b52cfbeaa5
Correct paths for openSUSE
...
openSUSE has things stored in different places, so fixup the
paths here.
Signed-off-by: Christian Rodrigues <crrodriguez@opensuse.org>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
10 years ago