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
647b521fc7
dracut: check for EUID instead of UID
2017-01-18 11:04:36 +01:00
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
2017-01-18 10:37:10 +01:00
Harald Hoyer
8a32bf6107
dracut: unset LC_* after setting LANG and LC_ALL
...
otherwise bash/glibc might complain verbosely about not finding locales
2017-01-18 10:35:41 +01:00
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.
2017-01-16 14:27:39 +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
39c725dc4e
Merge pull request #157 from ddiss/fix_relative_tmpdir
...
dracut.sh: support --tmpdir as a relative path
2017-01-09 10:42:40 +01:00
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>
2016-11-07 10:41:38 +01:00
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>
2016-10-10 16:27:47 +02:00
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
)
2016-08-19 15:49:33 +02:00
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
2016-06-29 17:32:31 +02:00
Colin Guthrie
55b99a0e4c
dracut.sh: fix $tmpfilesdir fallback when systemd-devel is not installed.
...
Bug introduced in 3a04bddeed
in Dec 2014.
2016-06-07 10:48:49 +02:00
Harald Hoyer
3f60444ec1
removed obsolete kernel module functions and host_modules variable
...
module_is_host_only()
find_kernel_modules_by_path()
find_kernel_modules()
2016-04-15 16:48:13 +02:00
Harald Hoyer
0297fdcb3e
Merge pull request #123 from dracut-mailing-devs/40374262.eB5p3XdtTH@linux-lm3i.site
...
Correctly handle module aliases
2016-04-15 12:05:44 +02:00
Harald Hoyer
794b2d2c75
Use dracut-install to install kernel modules
...
dracut-install can now install kernel modules and their corresponding
firmware files.
2016-04-11 16:32:10 +02:00
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
2016-04-11 11:57:30 +02:00
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>
2016-01-21 18:02:40 +01:00
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.
2016-01-13 09:32:24 +01:00
Harald Hoyer
60928f36b6
dracut.sh: restorecon final image file
...
Instead of "mv" use "cp --reflink=auto" and restorecon the final image
2016-01-08 11:37:25 +01:00
Harald Hoyer
62c00a8896
dracut.sh: only create one TMPDIR
...
use DRACUT_TMPDIR subdirs for everything
2015-11-25 14:21:33 +01:00
Harald Hoyer
c44d2252bb
dracut.sh: for microcode generation, skip gpg files
...
skip all ".asc" files for the AMD microcode generation
2015-11-18 10:58:54 +01:00
Harald Hoyer
27d7936f0e
dracut.sh: save systemdutildir env
...
even, if no systemd is used, we need that variable for systemd-udevd
2015-11-17 09:45:29 +01:00
Harald Hoyer
2da041d672
Check for systemd before installing systemd specific files
...
https://bugzilla.redhat.com/show_bug.cgi?id=1282010
2015-11-16 09:41:26 +01:00
Harald Hoyer
63a44c8dc3
dracut.sh: add back host_modules part
...
host_modules was removed accidently while remove host_modaliases
2015-11-16 09:26:51 +01:00
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.
2015-11-13 13:40:38 +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
10f8df1bdf
add --no-reproducible to turn off reproducible mode
...
Also warn about cpio not supporting it and turn it on by default for
fedora.
2015-11-13 11:53:36 +01:00
Harald Hoyer
b44156c6fc
dracut.sh: fixed typo in microcode generation
...
(cherry picked from commit a594b4e357
)
2015-11-11 16:47:48 +01:00
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
)
2015-11-11 16:47:03 +01:00
Harald Hoyer
583fb23199
dracut.sh: do not create microcode, if no firmware is available
...
(cherry picked from commit 13b5c1d09e
)
2015-11-11 16:46:16 +01:00
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
)
2015-11-11 16:45:48 +01:00
Harald Hoyer
2cc5e92e21
dracut.sh: quote $outfile on error removal
2015-11-11 11:49:34 +01:00
Harald Hoyer
875426f2fc
dracut.sh: remove "_EARLY" from CONFIG_MICROCODE_* checks
...
EARLY is merged in the main driver
2015-11-11 11:48:32 +01:00
Harald Hoyer
3177d12d2b
Merge pull request #91 from dracut-mailing-devs/1437470322-992-1-git-send-email-cfan@redhat.com
...
remove the incomplete .img file
2015-11-11 11:48:21 +01:00
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
2015-08-24 18:27:54 +08:00
Harald Hoyer
3c00189988
dracut.sh: remove quotes from install_items and install_optional_items
...
Unfortunately these are lists with whitespaces.
2015-08-10 14:05:15 +02:00
Harald Hoyer
96d694c0b5
dracut.sh: simplify modalias reading
2015-07-30 12:11:42 +02:00
Harald Hoyer
693b7a3283
Cleanup compressor handling
...
If no compressor is specified, try to find a suitable one.
Check if kernel modules can be uncompressed.
2015-07-22 11:35:28 +02:00
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>
2015-07-21 12:05:42 +02:00
Harald Hoyer
e50f91e600
use mktemp "-p" instead of "--tmpdir" for busybox
2015-07-15 11:47:43 +02:00
Harald Hoyer
ee44f62972
dracut.sh: early check for bash version
2015-07-09 19:44:30 +02:00
Harald Hoyer
e8f19bcf26
dracut.sh: remember $0 for --regenerate-all
2015-07-09 18:22:15 +02:00
Harald Hoyer
cb0913db0d
dracut.sh: reduce code
2015-07-09 18:06:55 +02:00
Harald Hoyer
3721635b2c
guard ${arrays[@]} with ""
2015-07-09 15:36:25 +02:00
Harald Hoyer
694725abf0
dracut.sh: remove pop()
2015-07-09 15:36:25 +02:00
Harald Hoyer
5a66d51102
dracut.sh: remove push()
...
can be done with var+=(val)
2015-07-09 15:36:25 +02:00
Harald Hoyer
1cadc26fd4
Add all btrfs devices
...
We have to find them with "btrfs usage", which is cumbersome.
2015-07-09 15:36:25 +02:00
Harald Hoyer
777f2db037
splitup dracut-init.sh from dracut-functions.sh
...
other tools want to source dracut-functions.sh without any mkdir side
effects.
2015-07-02 16:04:05 +02:00
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.
2015-07-02 14:55:31 +02:00
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.
2015-06-22 11:56:28 +01:00