-
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
Use zfs-import.target in contrib/dracut #6964
Use zfs-import.target in contrib/dracut #6964
Conversation
Let's get @prometheanfire's and @Rudd-O thoughts on this if possible. |
I'm no dracut expert either (I'm having trouble figuring out where/how to enable decryption support). This PR does look straight forward though. |
#6982 is the issue I just created for not being able to boot from an ecrypted rootfs on a fully encrypted pool. |
You must build the .wants links for sure, aside from adding it in the [Install] section. Remember that all the [Install] section does is create links when you |
Question to everyone involved in this PR: why |
@Rudd-O So, you saying that we need to make (As an aside, why doesn't Dracut have some mechanism to automate this dependency resolution? This procedure seems really error prone) ####Re: |
@aerusso how would you like to proceed with this PR? |
@behlendorf I was hoping to move over to a ZFS on root setup on a machine so I could validate this myself, but I haven't had the time. My only hesitation is that lack of testing---and that I'm completely unsure of the significance of I'm not actually sure anyone has booted with this patch, so I'd really like to get someone to do that first. |
Host only means "put this file in the initrd only if this isn't a generic initrd we're making".
To test ZFS on root, there's zfs-fedora-installer which will test Fedora on ZFS booting in a VM.
|
ffd13e2
to
2e4ffa4
Compare
This revision includes @Rudd-O's comment about the wants links needed. This one has been tested booting a Debian VM. It should represent the minimal change to the boot logic to use Re: mark_hostonlyFrom the Gentoo wiki,
But, from
Maybe it's because we are including |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't manually tested this change, but functionally it looks correct to me.
@aerusso can you rebase this to resolve the new conflict, then let's go ahead and integrate it. |
The new zfs-import.target should be used in place of the zfs-import-*.service units. Signed-off-by: Antonio Russo <[email protected]>
2e4ffa4
to
ec055ae
Compare
Codecov Report
@@ Coverage Diff @@
## master #6964 +/- ##
==========================================
- Coverage 78.24% 71.74% -6.51%
==========================================
Files 368 342 -26
Lines 112142 110104 -2038
==========================================
- Hits 87743 78991 -8752
- Misses 24399 31113 +6714
Continue to review full report at Codecov.
|
Description
The new zfs-import.target should be used in place of the zfs-import-*.service units in
contrib/dracut
.Motivation and Context
PR #6764 added
zfs-import.target
to simplify dependency on pool importing. #6822 did some cleanup. The recent #6955 (re: #6953) added RPM support for enabling this units. That bug report has prompted me to grep the code base for zfs-import. The last remaining code section to be updated is undercontrol/dracut/90zfs
.This PR is a work in progress. I don't think dracut users are exposed to any bug presently, because
sysroot.mount
is still orderedAfter=zfs-import-*.service
Two files are affected:
zfs-generator.sh.in
is straightforwardly modified to ordersysroot.mount
After=zfs-import.target
(instead of eachzfs-import-*.service
).module-setup.sh.in
is also modified. I need input, because I don't know how precisely dracut works.zfs-import.target
(and eachzfs-import-*.service
) isdracut_install
-ed (and unconditionallymark_hostonly
-ed). Do we need to build azfs-import.target.wants
directory withzfs-import-*.service
links? Or will that be inherited from the host system?How Has This Been Tested?
This has NOT been tested. This is a place to centralize discussion about these changes.
Types of changes
Checklist:
Signed-off-by
.