-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
dracut: zfs_force=1 has no effect #11403
Comments
Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#11403
Could you try the top commit off my suseł-but-stronger branch (referenced above)? It worked in my testing, but, y'know |
Hi, thank you for your response. I am away from my desktop system right now where I use dracut, on my laptop I have NixOS which I believe does not use dracut. If I don't get back to my desktop in the next few days to try this, I will just install another distribution on the pool on my laptop, where I have FreeBSD as well already. How's installing Ubuntu on an existing pool these days? I saw they were doing some serious work in that area. Does Ubuntu use dracut? I'll try it if that's the case. Your patch looks great by the way. |
it works here on Ubuntu, though getting dracut to work on Ubuntu in general is a bit of a gamble. |
So I just got back home recently and tried this on my desktop, with freebsd and gentoo, dracut still drops me to the emergency shell. When I was in the emergency shell, I verified that the patch was applied to my initramfs. I'm happy to do any debugging. |
Hm, so if you break in the initrd (or fall through to the emergency shell), these should all be positive: For the generator:
And for the services:
I suspect I just got the permissions/paths/overrides wrong somewhere |
The problem seems to be with my version of systemd not reading the output of the environment generator correctly. When I do a I did notice that if I do a |
Environment generators seem to've landed in systemd 233 (2017-03-01) and remained unchanged since, and the versions I see on packages.g.o are 9999(?) and 248.3, both of which are newer than the 241 from buster that I test on. I assume the warning you get is from the alternate output, since stderr is devnulled (unless it isn't maybe? but it was in my tests); what happens if you add
in the journal. If you don't – can you try moving it to, like, It might be necessary to fall back to a normal service if your systemd really is so terminally broken so as to have completely non-functional environment generators but I somehow doubt this, given that they've not changed (save for the umask they get) since 4 years ago. |
This system is a couple of months old and my version of systemd is I am going to rebuild my initramfs with vi or something and play with this some more. |
Good news, I found the problem. It seems that This may be because this version of systemd only looks in But once I copied the |
Hm, odd. What's |
Here's what I see on my system, environment generators seem to be in
While the variables point to
Here are all the variables:
Gentoo says the following about the ebuild I have installed:
|
Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#11403
Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#11403
Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#11403
That without doubt is one of the worst things I've ever read! Turns out the environment generator path is add = strv_new("/run/systemd/system-environment-generators",
"/etc/systemd/system-environment-generators",
"/usr/local/lib/systemd/system-environment-generators",
SYSTEM_ENV_GENERATOR_DIR); and systemenvgeneratordir = join_paths(prefixdir, 'lib/systemd/system-environment-generators')
systemunitdir = join_paths(rootprefixdir, 'lib/systemd/system') so it only works by accident on merged-/usr systems. Can you try the top of my suseł-but-stronger-v2 branch (referenced above)? |
Yup that works! Thank you very much for fixing this by the way, this will make it much easier for me to dual-boot Linux and FreeBSD, once I reinstall it completely, there's something screwy in this install and no DE works correctly. But now I can boot with amdgpu throwing a kernel panic only 20% of the time. |
Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#11403
Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#11403
Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#11403
On systemd systems provide an environment generator in order to respect the zfs_force=1 kernel command line option. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#11403 Closes openzfs#12195
On systemd systems provide an environment generator in order to respect the zfs_force=1 kernel command line option. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tony Nguyen <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#11403 Closes openzfs#12195
System information
Describe the problem you're observing
When my zfs pool needs to be force-imported because I booted freebsd on it, the kernel commandline option I added
zfs_force=1
does not have any effect, and I have to do azpool import -f
from the dracut rescue shell.Describe how to reproduce the problem
Add
zfs_force=1
toGRUB_CMDLINE_LINUX
in/etc/default/grub
and regen grub config.Do something that would require force-importing the pool, in my case that is booting FreeBSD on it.
When you boot linux, you will see dracut fail to import the pool and drop you into the emergency shell.
Include any warning/errors/backtraces from the system logs
The text was updated successfully, but these errors were encountered: