Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hookdir can't be in /usr if used for writing #2588

Open
lnussel opened this issue Dec 14, 2023 · 0 comments · Fixed by dracut-ng/dracut-ng#186 or dracut-ng/dracut-ng#194 · May be fixed by #2591
Open

hookdir can't be in /usr if used for writing #2588

lnussel opened this issue Dec 14, 2023 · 0 comments · Fixed by dracut-ng/dracut-ng#186 or dracut-ng/dracut-ng#194 · May be fixed by #2591
Labels
bug Our bugs

Comments

@lnussel
Copy link

lnussel commented Dec 14, 2023

https://github.com/dracutdevs/dracut/blob/master/modules.d/99base/dracut-lib.sh#L402 sets hookdir=/lib/dracut/hooks. Later the code writes there. With systemd/systemd#30255 systemd makes /usr read-only even in initrd though. So a dracut generated initrd fails to boot with errors like

Dec 14 15:38:23 localhost dracut-cmdline[257]: //lib/dracut/hooks/cmdline/00-parse-root.sh: line 28: /lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2fdisk\x2fby-uuid\x2f8b3c35f1-610b-48d8-ae73-aecdaa924731.sh: Read-only file system
...
Dec 14 15:38:24 localhost dracut-initqueue[374]: rm: cannot remove '/lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2fdisk\x2fby-path\x2fpci-0000:00:03.0-part.sh': Read-only file system

Seen in openSUSE tumbleweed with systemd from git

@lnussel lnussel added the bug Our bugs label Dec 14, 2023
@lnussel lnussel changed the title hookdir can't be in /usr must if used for writing hookdir can't be in /usr if used for writing Dec 14, 2023
aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Dec 18, 2023
Since systemd/systemd@ffc1ec73, /usr is mounted as
read-only in the initramfs by default.

Fixes dracutdevs#2588
aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Dec 18, 2023
Since systemd/systemd@ffc1ec73, /usr is mounted as
read-only in the initramfs by default.

Fixes dracutdevs#2588
@LaszloGombos LaszloGombos added this to the dracut-060 milestone Mar 3, 2024
@LaszloGombos LaszloGombos removed this from the dracut-060 milestone Mar 14, 2024
aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Apr 5, 2024
Since systemd/systemd@ffc1ec73, /usr is mounted as
read-only in the initramfs by default.

Fixes dracutdevs#2588
@aafeijoo-suse aafeijoo-suse reopened this Apr 17, 2024
@aafeijoo-suse aafeijoo-suse reopened this Apr 18, 2024
aafeijoo-suse pushed a commit to aafeijoo-suse/dracut that referenced this issue Apr 19, 2024
Since systemd/systemd@ffc1ec73, /usr is mounted as
read-only in the initramfs by default.

Fixes dracutdevs#2588

Co-authored-by: Antonio Alvarez Feijoo <[email protected]>
(cherry picked from commit https://github.com/dracut-ng/dracut-ng/a45048b80c27ee5a45a380052a6d29ab1925f7f9)
aafeijoo-suse pushed a commit to aafeijoo-suse/dracut that referenced this issue Apr 19, 2024
Since systemd/systemd@ffc1ec73, /usr is mounted as
read-only in the initramfs by default.

Fixes dracutdevs#2588

Co-authored-by: Antonio Alvarez Feijoo <[email protected]>
(cherry picked from commit dracut-ng/dracut-ng@a45048b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment