Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Install kernel module (zfs) for a different kenel -
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Stryder0
n00b
n00b


Joined: 02 Jul 2017
Posts: 8

PostPosted: Sun Jul 02, 2017 12:50 am    Post subject: Install kernel module (zfs) for a different kenel - Reply with quote

I currently have Gentoo installed on a zfs root filesystem with kernel 4.9.16 -

I downloaded the mainline 4.12-rc7 kernel from kernel.org and built it. I am trying to create an initramfs that is compatible with a zfs root filesystem using feared bilss' bliss-initramfs tool. Even after running "emerge zfs zfs-kmod spl" attempting to creat the initramfs causes an error saying that the module for zfs does not exist for my kernel. checking /lib/modules/4.12.0-rc7 shows that this is true - the module for zfs was not installed for this kernel. I am somewhat new to gentoo and not entirely sure how portage works, but I think installing zfs just installs it for the current kernel I have loaded. Because my system in installed on zfs I need the module for the newer kernel in order for the system to boot. Does anyone know how I can build zfs for the newer kernel that I do not have loaded?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7256
Location: almost Mile High in the USA

PostPosted: Sun Jul 02, 2017 12:55 am    Post subject: Reply with quote

Portage should build for whatever kernel /usr/src/linux is pointing to. You can eselect kernel to choose which which kernel to use.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Stryder0
n00b
n00b


Joined: 02 Jul 2017
Posts: 8

PostPosted: Sun Jul 02, 2017 1:24 am    Post subject: Reply with quote

Thank you - using eselect and setting to the newer kernel allowed me to install zfs for it and boot into it without (much) issue.
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5873

PostPosted: Sun Jul 02, 2017 7:34 am    Post subject: Reply with quote

Please note that zfs 0.6.5.10 is touted to be compatible up to 4.12-rc3, if you run into any compatibility issues, please file an issue at http://github.com/zfsonlinux/zfs/issues
Back to top
View user's profile Send private message
ScottESanDiego
n00b
n00b


Joined: 02 Feb 2015
Posts: 6

PostPosted: Fri Jul 07, 2017 7:09 pm    Post subject: Reply with quote

bunder wrote:
Please note that zfs 0.6.5.10 is touted to be compatible up to 4.12-rc3, if you run into any compatibility issues, please file an issue at http://github.com/zfsonlinux/zfs/issues


Note https://github.com/zfsonlinux/zfs/issues/6324 . Easily solved with a pair of patches in /etc/portage/patches/sys-fs/zfs-kmod-0.6.5.10 though.

Code:
intrepid zfs-kmod-0.6.5.10 # cat *
--- zfs-0.6.5.10/module/zfs/zfs_vfsops.c        2017-06-14 10:09:41.000000000 -0700
+++ /tmp/zfs_vfsops.c   2017-07-07 11:54:15.017607504 -0700
@@ -1403,8 +1403,6 @@
        sb->s_time_gran = 1;
        sb->s_blocksize = recordsize;
        sb->s_blocksize_bits = ilog2(recordsize);
-       zsb->z_bdi.ra_pages = 0;
-       sb->s_bdi = &zsb->z_bdi;

        error = -zpl_bdi_setup(sb, "zfs");
        if (error)
--- zfs-0.6.5.10/include/sys/zfs_vfsops.h       2017-06-14 10:06:53.000000000 -0700
+++ /tmp/zfs_vfsops.h   2017-07-07 11:46:48.043824314 -0700
@@ -64,7 +64,6 @@

 typedef struct zfs_sb {
        struct super_block *z_sb;       /* generic super_block */
-       struct backing_dev_info z_bdi;  /* generic backing dev info */
        struct zfs_sb   *z_parent;      /* parent fs */
        objset_t        *z_os;          /* objset reference */
        zfs_mntopts_t   *z_mntopts;     /* passed mount options */
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum