On Mon, 2025-09-29 at 14:28 +0200, Chris Hofstaedtler wrote: > Hi, > > * Benjamin Drung <[email protected]> [250929 14:20]: > > On Mon, 2025-09-29 at 13:26 +0200, Chris Hofstaedtler wrote: > > > On Mon, Sep 29, 2025 at 11:00:58AM +0200, Benjamin Drung wrote: > > > > > > > > util-linux 2.41.2-2 removed pivot_root and switch_root, but Dracut uses > > > > switch_root. The Dracut autopkgtest fails in TEST-11-USR-MOUNT: > > > > > > > > ``` > > > > dracut-install: ERROR: installing 'switch_root' > > > > dracut[E]: FAILED: /usr/lib/dracut/dracut-install -D > > > > /tmp/autopkgtest-lxc.bb02sljd/downtmp/autopkgtest_tmp/dracut.dmXUE5S/initramfs > > > > -a switch_root > > > > dracut[F]: Failed to install switch_root > > > > ``` > > > > > > > > Please bring back switch_root or suggest an alternative. > > > > > > Can dracut use klibc's implementation? Then both initramfs builders > > > would use the same implementation. > > > > > > If that is not possible I will bring it back. Sorry for having > > > missing this. > > > > As far I see klibc only implements pivot_root but not switch_root. > > Supporting klibc would be non-trivial. > > I think the program is called run-init there; but lets ignore klibc. >
I checked the code from run-init, but it is slightly different than switch_root. switch_root moves already mounted /proc etc which run-init does not. So it's not a drop-in replacement. > > Since switch_root is only needed for the non-system boot, how about > > bringing switch_root back to util-linux-extra? > > I'm not sure what that means -exactly-, but yes, I can put it into > util-linux-extra. Since you want to reduce the size of util-linux, having switch_root in util-linux-extra would be enough for Dracut. > Would dracut or only its tests then get a dependency on > util-linux-extra? It would probably only recommend or suggest util-linux-extra (maybe only as alternative to systemd). If the test explicitly tests a setup without systemd, then the test will depend on util-linux-extra. > Can dracut deal with switch_root being in /usr/bin (and not in > /usr/sbin as previously)? If so, that would be preferable. Yes. Dracut searches PATH to find it. -- Benjamin Drung Debian & Ubuntu Developer

