Skip to content

Commit

Permalink
fix(base): do not require chroot inside initramfs
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Henrik66 authored and aafeijoo-suse committed Dec 5, 2022
1 parent 57ace7c commit 5181337
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules.d/95debug/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ depends() {
# called by dracut
install() {
inst_multiple -o ls ps grep more cat rm strace free showmount df du lsblk \
ping netstat rpcinfo vi scp ping6 ssh find \
ping netstat rpcinfo vi scp ping6 ssh find chroot \
tcpdump cp dd less hostname mkdir systemd-analyze \
fsck fsck.ext2 fsck.ext4 fsck.ext3 fsck.ext4dev fsck.f2fs fsck.vfat e2fsck

Expand Down
2 changes: 1 addition & 1 deletion modules.d/98selinux/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ depends() {
# called by dracut
install() {
inst_hook pre-pivot 50 "$moddir/selinux-loadpolicy.sh"
inst_multiple setenforce
inst_multiple setenforce chroot
}
2 changes: 1 addition & 1 deletion modules.d/99base/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ depends() {

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

Expand Down

0 comments on commit 5181337

Please sign in to comment.