I am following vanilla-sources in all my machines, which is what people like Greg Kroah-Hartman actually recommends [1][2]. Since they are now never stabilized [3], this means that I need to update them pretty regularly to keep them safe.
This implies that I have to change the /usr/src/linux symbolic link, configure the kernel using make oldconfig, compile it, install it, install its modules, reemerge any package that provides kernel modules (if any), regenerate its initramfs, regenerate the GRUB2 config file OR adding a new entry in GRUB. None of this steps are particularly difficult, but any mistake in one of them can result in an unbootable system. So I wrote a little script that takes care of each of this steps automagically: https://github.com/canek-pelaez/kerninst So now everytime I need to use a new kernel version, I only do: # eselect kernel set <new-kernel> # kerninst Everything is done by the script. The script is 167 lines of Bash, and I think is pretty easy to follow what it does. Any of the steps can be called individually, and I have been using it in all of my machines without any problem. It works with both GRUB and GRUB2, generating a very simple GRUB config file for every image available in /boot, with corresponding inird line if availabe. WARNINGS • If /usr/src/linux points to /usr/src/linux-3.10.10, then the script deletes /boot vmlinuz-3.10.10, /boot/initrd-3.10.10 *and* /lib/modules/3.10.10. • The script *WILL* overwrite your GRUB/GRUB2 configuration file, so make a copy before trying it. • The script requires a valid kernel .config file which will be copied into /usrc/src/linux, and then used to configure the kernel with: yes "" | make oldconfig Some people recommend not doing this, and it can stall if a new option for the kernel requires an answer with no default value. • The script only supports dracut, but adding genkernel (or any other initramfs maker) should be easy. Patches accepted. Dracut should be already configured. • I have only tested it with vanilla-sources, but probably will work with other *-sources packages. I have been using it in all of my machines for some days now, and it works for me; but I take no responsibility if it breaks your machine, or if it kills your dog. Regards. [1] http://article.gmane.org/gmane.linux.gentoo.devel/86496 [2] http://article.gmane.org/gmane.linux.gentoo.devel/86506 [3] http://article.gmane.org/gmane.linux.gentoo.devel/87015 -- Canek Peláez Valdés Posgrado en Ciencia e Ingeniería de la Computación Universidad Nacional Autónoma de México

