Pages

2015-01-18

Slackware64 14.1 + new kernel

Yeah, compiled a new 3.14.28 kernel - in a bit leaner way than slackware generic is.
So here comes concisely how I did it.

# First, open up this page and read it - my description here is almost the same, with occasional addons. And - I did everything on desktop terminal until Nvidia drivers' reinstall (logout, console, init 3).

1. Download the source (and pgp .sign) from kernel.org, copy to /usr/src, unxz the source file (tar needed afterwards), then unpack source to folder. To be nice and orderly, do: rm linux && ln -s /usr/src/linux-3.14.28 linux
cd linux
zcat /proc/config.gz > /usr/src/linux/.config  # or use some other handy config...
make oldconfig  # to insert kernel changes into old config file.
make menuconfig # Which probably takes two hours at least. But it's worth to be alert and click everything - for not to miss, for example, your network drivers.
make bzImage modules
make modules_install
cp arch/x86/boot/bzImage /boot/vmlinuz-custom-3.14.28
cp System.map /boot/System.map-custom-3.14.28 
cp .config /boot/config-custom-3.14.28
  # instead of 'custom' comes of course your special name you gave to your kernel (when menuconfiging).
/usr/share/mkinitrd/mkinitrd_command_generator.sh -k 3.14.28
This nicy script gives you exact command for creating initrd. Do it.
cd /boot
There should be three links to: kernel, system.map and config. Change those to point to your new files (ln -sf filename link).
Done with the kernel.

2. There is link /etc/rc.d/rc.modules which points to old rc.modules-3.10.17; copy this old modules file, rename it according to new kernel modules folder name (or 'uname -r' - which you can't use as kernel is not yet installed :) and change rc.modules link to point to this new file.

3. Grub or Lilo - has to be rerun for introducing new kernel. I have Grub2 in Wheezy (which I still keep only for hosting my multiboot) - I mounted Wheezys' partition and simply edited /boot/grub/grub.conf file. And that was that.

4. GPG-check. (Additionally to AlienBobs' tutorial there is also nice explanation in kernel.org.)
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.14.28.tar.sign
Put it into the same folder where you have linux-3.14.28.tar
gpg --verify linux-3.14.28.tar.sign linux-3.14.28.tar
What results 'no key', but there is id=6092693E , use this and import:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 6092693E
gpg --verify linux-3.14.28.tar.sign linux-3.14.28.tar
"This key is not certified with a trusted signature" - let it be like that, done.

5. NVIDIA
Kernel 3.14 and nvidia 319, seems, are not friends - no compile, BUT newer 331.86 did the trick. Before run, delete /etc/X11/xorg.conf - and then let installer make a new one. Sometimes there is a difference - as X starting or not starting (missing screens). No, I do not know why it sometimes matters.
Last part in following is for compiling for not yet installed kernel.
sh NVIDIA-Linux-x86_64-331.89.run --kernel-name='3.14.28'
It compiled, but whined over wrong arch in  /usr/lib64/libEGL.la
Anyway - X started up. I checked aforementioned .la - and it appeared that Nvidia removed it totally. Found it in /var/log/nvidia/103, copied back and also deleted in it one dependency that was obviously 32bit... We'll see what happens next time when compiling.
According to web, reinstalling mesa also fixes .la issue.

But never mind.
I have my new kernel running and everything seems to function OK.

No comments: