-
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
zfs-kmods: install to /lib/modules instead of /usr/lib/modules #11381
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Before this patch, dracut wouldn't find zfs.ko for inclusion in initramfs. **Steps To Reproduce**: - Install Fedora 33 - Install OpenZFS 2.0 build dependencies - Install kernel 5.9.14-200.fc33.x86_64 (any will do) - cd `openzfs-2.0.0` - ./autogen - ./configure # finds kernel 5.9.14-200.fc33.x86_64 - make rpm-utils - make rpm-kmod - sudo dnf install *x86_64.rpm - lsinitrd /boot/initramfs-5.9.14-200.fc33.x86_64.img | grep zfs.ko => does not find anything, probably some missing script - dracut -f --kver 5.9.14-200.fc33.x86_64 ``` $ dracut -f --kver 5.9.14-200.fc33.x86_64 dracut-install: Failed to find module 'zfs' dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.3i2y9q/initramfs --kerneldir /lib/modules/5.9.14-200.fc33.x86_64/ -m zfs ``` - let's rule out problems in zfs-dracut: ``` # /etc/dracut.conf add_drivers+=" zfs " ``` - dracut -f --kver 5.9.14-200.fc33.x86_64 ``` same error as above ``` **Solution** Install to /lib/modules instead of /usr/lib/modules => dracut does the right thing, even without ``` # /etc/dracut.conf add_drivers+=" zfs " ``` Notably, rpm/redhat/zfs-kmod.spec.in does not contain the definition of the `prefix` macro that this commit removes in the generic kmod spec. And https://rpmfusion.org/Packaging/KernelModules/Kmods2 does not mention `prefix` at all. Signed-off-by: Christian Schwarz <[email protected]>
problame
force-pushed
the
zfs-kmod-dracut-fix
branch
from
December 21, 2020 11:41
9ad1484
to
006471c
Compare
behlendorf
added
Component: Dracut
dracut integration
Status: Code Review Needed
Ready for review and testing
labels
Dec 21, 2020
behlendorf
approved these changes
Dec 21, 2020
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.
Look good. I'm surprising this wasn't noticed until now since /lib/modules/
is definitely the correct install location. Thanks!
behlendorf
added
Status: Accepted
Ready to integrate (reviewed, tested)
and removed
Status: Code Review Needed
Ready for review and testing
labels
Dec 21, 2020
Great! Could you include this in the 2.0 branch? |
ghost
pushed a commit
to zfsonfreebsd/ZoF
that referenced
this pull request
Dec 23, 2020
Before this patch, dracut wouldn't find zfs.ko for inclusion in initramfs. This was caused by the packages installing in to /lib/modules instead of /usr/lib/modules. Correcting this allows dracut to do the right thing, even without # /etc/dracut.conf add_drivers+=" zfs " Notably, rpm/redhat/zfs-kmod.spec.in does not contain the definition of the `prefix` macro that this commit removes in the generic kmod spec. And https://rpmfusion.org/Packaging/KernelModules/Kmods2 does not mention `prefix` at all. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Christian Schwarz <[email protected]> Closes openzfs#11381
behlendorf
pushed a commit
that referenced
this pull request
Dec 23, 2020
Before this patch, dracut wouldn't find zfs.ko for inclusion in initramfs. This was caused by the packages installing in to /lib/modules instead of /usr/lib/modules. Correcting this allows dracut to do the right thing, even without # /etc/dracut.conf add_drivers+=" zfs " Notably, rpm/redhat/zfs-kmod.spec.in does not contain the definition of the `prefix` macro that this commit removes in the generic kmod spec. And https://rpmfusion.org/Packaging/KernelModules/Kmods2 does not mention `prefix` at all. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Christian Schwarz <[email protected]> Closes #11381
jsai20
pushed a commit
to jsai20/zfs
that referenced
this pull request
Mar 30, 2021
Before this patch, dracut wouldn't find zfs.ko for inclusion in initramfs. This was caused by the packages installing in to /lib/modules instead of /usr/lib/modules. Correcting this allows dracut to do the right thing, even without # /etc/dracut.conf add_drivers+=" zfs " Notably, rpm/redhat/zfs-kmod.spec.in does not contain the definition of the `prefix` macro that this commit removes in the generic kmod spec. And https://rpmfusion.org/Packaging/KernelModules/Kmods2 does not mention `prefix` at all. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Christian Schwarz <[email protected]> Closes openzfs#11381
sempervictus
pushed a commit
to sempervictus/zfs
that referenced
this pull request
May 31, 2021
Before this patch, dracut wouldn't find zfs.ko for inclusion in initramfs. This was caused by the packages installing in to /lib/modules instead of /usr/lib/modules. Correcting this allows dracut to do the right thing, even without # /etc/dracut.conf add_drivers+=" zfs " Notably, rpm/redhat/zfs-kmod.spec.in does not contain the definition of the `prefix` macro that this commit removes in the generic kmod spec. And https://rpmfusion.org/Packaging/KernelModules/Kmods2 does not mention `prefix` at all. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Christian Schwarz <[email protected]> Closes openzfs#11381
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this patch, dracut wouldn't find zfs.ko for inclusion in
initramfs.
Steps To Reproduce:
openzfs-2.0.0
=> does not find anything, probably some missing script
Solution
Install to /lib/modules instead of /usr/lib/modules
=> dracut does the right thing, even without
Notably, rpm/redhat/zfs-kmod.spec.in does not contain the definition of
the
prefix
macro that this commit removes in the generic kmod spec.And https://rpmfusion.org/Packaging/KernelModules/Kmods2 does not
mention
prefix
at all.Signed-off-by: Christian Schwarz [email protected]
Types of changes
Checklist:
Signed-off-by
.