Bug 2515152

Summary: kdump-utils calls dracut_no_switch_root(), which dracut 111 removed
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: kdump-utilsAssignee: Coiby <coxu>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: coxu, lichliu
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mikhail 2026-08-13 06:13:04 UTC
Every kdump initramfs rebuild now prints:

  /usr/lib/dracut/modules.d/99kdumpbase/module-setup.sh: line 1248:
  dracut_no_switch_root: command not found

Reproducer:

  # kdumpctl rebuild

Versions:

  kdump-utils-1.0.61-2.fc45
  dracut-111-1.fc45          (installed 2026-08-10)
  kexec-tools-2.0.32-4.fc45

Cause: dracut 111 removed the function. From its NEWS.md, under Bug Fixes:

  remove unused dracut_no_switch_root (f61865ce)

kdump-utils still calls it, at the end of the kdump_setup_bootdev()
install hook in dracut-module-setup.sh:

  # Save more memory by dropping switch root capability
  dracut_no_switch_root

The call was added in 2020 by commit e05c55014492 ("Drop switch root
capability for non fadump initramfs") and is still present in
kdump-utils upstream (rhkdump/kdump-utils, main).

Impact, as far as I can tell:

 - the error is printed on every rebuild, and the install hook returns
   127 instead of 0.  dracut tolerates this today - the image is still
   built and "kexec: loaded kdump kernel" succeeds - but it is a latent
   hazard if dracut ever starts checking that return value;

 - the intended effect is lost.  Note however that in dracut 110 the
   function only created the marker file $initdir/lib/dracut/no-switch-root,
   and nothing in dracut 110 read that file - it is the only occurrence
   in the tree.  So the memory saving this call was meant to achieve
   appears to have been ineffective for some time already, which is
   presumably why dracut considered the function unused.

That suggests the fix is simply to drop the call, but somebody who knows
whether anything outside dracut still consumes /lib/dracut/no-switch-root
should confirm that before it is removed.