Skip to content

Commit

Permalink
dracut: Disable ostree-prepare-root
Browse files Browse the repository at this point in the history
In some images such as the recent fedora/rhel bootc base image,
the ostree dracut module is statically enabled:
https://gitlab.com/fedora/bootc/base-images/-/blob/40df0eb3827763039e4d17264968e37f850b70e5/tier-0/initramfs.yaml#L9

And also recently, we changed the ostree systemd unit
to enter emergency.target if it fails in:
ostreedev/ostree@05b3b66

These two things combine mean we'll fail before kdump gets
a chance to run.

For our use case we don't need ostree in the initrd.

I tried to override this with `--omit=ostree` in our dracut
invocation, but that causes an error (dracut doesn't let the
cmdline override static config).

For now, let's just mask the service in our initrd.

Signed-off-by: Colin Walters <[email protected]>
Reviewed-by: Lichen Liu <[email protected]>
  • Loading branch information
cgwalters authored and licliu committed Aug 23, 2024
1 parent 3f9dbcc commit 474d837
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dracut-module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,9 @@ install() {
# Also redirect dracut-emergency to kdump error handler
ln_r "$systemdsystemunitdir/emergency.service" "$systemdsystemunitdir/dracut-emergency.service"

# Disable ostree as we only need the physical root
systemctl -q --root "$initdir" mask ostree-prepare-root.service

# Check for all the devices and if any device is iscsi, bring up iscsi
# target. Ideally all this should be pushed into dracut iscsi module
# at some point of time.
Expand Down

0 comments on commit 474d837

Please sign in to comment.