Coder Social home page Coder Social logo

On Fedora with systemd 256 dracut cannot write hooks to `/lib/dracut/hooks` during boot because `/lib` is `/usr/lib`, which is read-only with new ProtectSystem feature about systemd HOT 5 CLOSED

AdamWill avatar AdamWill commented on September 23, 2024
On Fedora with systemd 256 dracut cannot write hooks to `/lib/dracut/hooks` during boot because `/lib` is `/usr/lib`, which is read-only with new ProtectSystem feature

from systemd.

Comments (5)

AdamWill avatar AdamWill commented on September 23, 2024

This is a bit fuzzy because there is also a Failed to start systemd-modules-load.service - Load Kernel Modules. error which points to a different problem (see #32508 (comment) ). It's not clear whether either the read-only filesystem problem or the missing libkmod problem alone breaks the boot, since we encounter both at once. At a guess, though, I would expect both of them to break boot, so we need to fix both.

I'm going to try doing a scratch build of systemd patched so ProtectSystem default to off in initramfs environments, and see what happens with that.

edit - to be clear, @poettering pointed out that the cause of these errors is likely the new ProtectSystem feature, which makes /usr read-only in initramfs environments by default. On Fedora, /lib is a symlink to /usr/lib, so dracut's hook dir - which is /lib/dracut/hooks - is on a read-only file system.

from systemd.

AdamWill avatar AdamWill commented on September 23, 2024

Some testing suggests this bug doesn't prevent boot, at least of a simple default Fedora install in a VM; patching ProtectSystem to default to off for initramfses doesn't get the system booting again, but patching dracut to pull in the kmod library does get it booting again.

Surely the inability to write hooks must have some fairly significant consequences in some cases, though.

from systemd.

poettering avatar poettering commented on September 23, 2024

Fix dracut to not write around in /usr/ or turn off the feature in systemd if you need a quick workaround. This is not a bug in systemd but intended behaviour, really. What dracut is doing there is just wrong and should be fixed.

from systemd.

poettering avatar poettering commented on September 23, 2024

We probably should add a bigger note about this to NEWS however.

(And about the libkmod pitfall too I guess)

from systemd.

keszybz avatar keszybz commented on September 23, 2024

This is fixed in dracut: dracut-ng/dracut-ng@a45048b

from systemd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.