Skip to content

Commit 5181337

Browse files
Henrik66aafeijoo-suse
authored andcommitted
fix(base): do not require chroot inside initramfs
dracut can be invoked inside a chroot, but inside the generated initramfs the chroot binary is not required. add chroot to the generated initramfs if debug or selinux dracut modules are enabled.
1 parent 57ace7c commit 5181337

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

modules.d/95debug/module-setup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ depends() {
1414
# called by dracut
1515
install() {
1616
inst_multiple -o ls ps grep more cat rm strace free showmount df du lsblk \
17-
ping netstat rpcinfo vi scp ping6 ssh find \
17+
ping netstat rpcinfo vi scp ping6 ssh find chroot \
1818
tcpdump cp dd less hostname mkdir systemd-analyze \
1919
fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck
2020

modules.d/98selinux/module-setup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ depends() {
1313
# called by dracut
1414
install() {
1515
inst_hook pre-pivot 50 "$moddir/selinux-loadpolicy.sh"
16-
inst_multiple setenforce
16+
inst_multiple setenforce chroot
1717
}

modules.d/99base/module-setup.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ depends() {
1313

1414
# called by dracut
1515
install() {
16-
inst_multiple mount mknod mkdir sleep chroot chown \
16+
inst_multiple mount mknod mkdir sleep chown \
1717
sed ls flock cp mv dmesg rm ln rmmod mkfifo umount readlink setsid \
1818
modprobe chmod tr
1919

0 commit comments

Comments
 (0)