Date: Wed, 22 Mar 2017 23:51:09 +0000 From: Steven Hartland <killing@multiplay.co.uk> To: Ben RUBSON <ben.rubson@gmail.com>, Xin LI <delphij@gmail.com> Cc: Freebsd fs <freebsd-fs@freebsd.org> Subject: Re: How to compile ZFS only ? Message-ID: <CAHEMsqYer4HFkA59RJ5DMY9Sjt1ZG5UmacV2uZJZetdTFkJhVg@mail.gmail.com> In-Reply-To: <CAGMYy3v6sfqOAwQUuW1%2Bupcc%2BKq_oZnZ92uV7MLKAsnf0JypRg@mail.gmail.com> References: <40633FF9-242F-48E1-8CE6-ADE4AC3C5C89@gmail.com> <4a7293c4-3a13-f865-bfb7-4d40581cfe3b@multiplay.co.uk> <34FDCEEF-99A8-4925-8BFA-BCB3CE0143D8@gmail.com> <CAGMYy3v6sfqOAwQUuW1%2Bupcc%2BKq_oZnZ92uV7MLKAsnf0JypRg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In addition to the main zfs module there are also dependency modules which are required. If you're able to test loading the module on a non-zfs root machine by manually loading it, it should detail any issues in /var/log/messages. That said the method listed by Xin is the quickest and easiest solution. On Wed, 22 Mar 2017 at 22:43, Xin LI <delphij@gmail.com> wrote: > Why not just -DNO_CLEAN= with 'make buildkernel'? > > But to answer your question, 'make buildkernel' will take e.g. > 'KERNCONF' aka kernel build configuration into account, while if you > do make directly, it's not (and sometimes build options in the kernel > build configuration, like WITNESS, etc., have material impact to data > structure layouts). > > On Wed, Mar 22, 2017 at 2:47 PM, Ben RUBSON <ben.rubson@gmail.com> wrote: > > Thank you for your answer Steven. > > Unfortunately it did not help, same behaviour : > > Module with you method has the same smaller size, 2323000 bytes vs > 2500544. > > (I then did not try to boot with it) > > > > Ben > > > >> On 22 Mar 2017, at 22:09, Steven Hartland <killing@multiplay.co.uk> > wrote: > >> > >> cd /usr/src > >> make buildenv > >> cd sys/modules/zfs/ > >> make > >> make install > >> > >> On 22/03/2017 20:57, Ben RUBSON wrote: > >>> Hi, > >>> > >>> I'm trying to rebuild ZFS (with some patches) without having to > rebuild whole kernel. > >>> > >>> What I then try : > >>> # cd /usr/src/sys/modules/zfs/ > >>> # make > >>> # cp zfs.ko /boot/kernel/ #to replace current zfs module > >>> > >>> But then server does not reboot properly (/ is on ZFS). > >>> > >>> If I do : > >>> # cd /usr/src/ > >>> # make buildkernel KERNCONF=GENERIC > >>> # cp > /usr/obj/usr/src/sys/GENERIC/modules/usr/src/sys/modules/zfs/zfs.ko > /boot/kernel/ > >>> > >>> Then server correctly reboot. > >>> > >>> I clearly see that zfs.ko in method 1 is slightly smaller that in > method 2. > >>> > >>> Am I missing something ? (of course yes, but what ? :) > >>> > >>> Many thanks ! > >>> > >>> Best regards, > >>> > >>> Ben > >>> > >>> _______________________________________________ > >>> freebsd-fs@freebsd.org mailing list > >>> https://lists.freebsd.org/mailman/listinfo/freebsd-fs > >>> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > >> > >> _______________________________________________ > >> freebsd-fs@freebsd.org mailing list > >> https://lists.freebsd.org/mailman/listinfo/freebsd-fs > >> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > > > > _______________________________________________ > > freebsd-fs@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-fs@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHEMsqYer4HFkA59RJ5DMY9Sjt1ZG5UmacV2uZJZetdTFkJhVg>