Closed jmattsson closed 4 years ago
There is no need to have the config packed into the kernel. I prefer to be more open about the kernel configuration, so the config is placed in /boot right next to the kernel image. For example: "/boot/config-5.3.12". This should be sufficient for any modifications or manual updates.
There is also an easy way to upgrade the kernel from source, with a single command:
sin kernel
This command will download the latest sources from kernel.org and use the current kernel configuration to compile it. For more info see Simple Installer - kernel module. If you want to use other branch than stable, set the "MONIKER" parameter in /etc/default/kernel-update file. E.g. for release candidates, set "MONIKER=mainline". This feature makes automated kernel upgrades and modifications easier and really saves a bunch of time.
Thank you for the feedback and reporting on ZFS!
Doh - the config sitting right there in the open... oops! :D And yeah, I did use sin to grab the source and get started; I didn't see an easy way to force a rebuild of the same version though (so I hacked the kernel/install script a bit to let me past). I tried with the "menu" option rather than "ask", but then I had issues with the menuconfig not reading input properly, so at that point I switched over to just doing things manually.
In the end, it turns out all I needed to have done was to grab the latest zfs-on-linux source and build that against the regular kernel and zfs works fine.
Nice to hear you used the Simple Installer right away. It is not documented very well, no manpage, just a README. No wonder you struggled a bit. This is off topic for this issue, but still:
The main idea of the kernel installer is to offer a seamless unattended upgrade path for custom-compiled kernels. This sin module does not really offer a nice way to rebuild the current kernel. But you can "force" it to: the easiest way is to change the MONIKER parameter as described in my previous comment and let the installer do its job. Then go to /usr/src/linux-NNN, run make menuconfig
, do your changes and recompile with make
. The kernel installer used to be a separate script and then I integrated it into Simple Installer. One side effect of this integration: ncurses (and therefore menuconfig) is broken due to ... | tee
logging by the sin wrapper. You can still use "menuconfig" CONFIGTYPE in /etc/default/kernel-update, it will work fine if you invoke the installer directly:
/usr/share/sin/kernel/install
Or you might edit the installer script, that is also a valid approach ;)
Anyway, building an out-of-tree kernel module like ZFS should be possible right away, that is a feature of this distribution. Kernel is configured to support that, and headers are always included.
Yeah I was very happy to find the headers already there, since the kernel isn't from a linux-image
package :)
Hi, As I was struggling to get ZFS running today, having the kernel config available in /proc/config.gz would have saved me a bunch of time (rebuilding the kernel). I'd love to see
as part of the kernel config so the running config is easily retrievable.
Oh, and in case anyone else is trying to get ZFS working on this AMI and having issues with the
spl-dkms-0.7.12-2
package: despite what it says on the Gentoo wiki, disablingCONFIG_FORTIFY_SOURCE
in the kernel did not fix the build. What I ended up doing is grabbing the ZFS-On-Linux source directly, and building & installing that (extract, cd zfs-0.8.2; ./autogen.sh; ./configure; make; make install)