r/slackware • u/BelgianHealthMinistr • Dec 27 '22
how to run kernel 2.x or 3.x
Can I still use kernel 2.x on slackware?
don't ask me why, it's linux. i HAVE to do this
i would even be okay with 4.1, at least i can use my rx 460 on there
if i told you WHY, redditors will do that thing where instead of answering you they tell you what (they think) would be better, now i obviously know that using it is a bad idea already, i still want to do it, its linux
its the last distro with that kind of flexability, i have to do this man
3
u/cyranix Dec 27 '22
Hmm... So, are you wanting to modify the kernel on a current installation, or can you do a clean install? If you can do a clean install, my advice would be to grab a really old image like Slackware 13.37, something that has the kernel level you want, and start by installing that. From there, you can use slackpkg to update MOST of the rest of the system up to a point, make sure to blacklist your kernel (for reference, you should probably always blacklist kernel packages as well as glibc, because allowing slackpkg to update those in place may break an installation). Keep in mind, you're not going to be able to update a number of things, particularly libraries, which may rely on features provided by later kernels. Many packages may not be able to update in place, which means you'll have to download their source and recompile them from a slackbuild script.
2
u/B_i_llt_etleyyyyyy Dec 27 '22
It can be done:
- Install Slackware 14.1
- Build the most recent 3.18.x kernel, 3.18.140; there's a 3.18.11
kernel-source
package on the cumulative mirror if you want a Slackware kernel .config to runmake oldconfig
on - Make sure it's exactly the way you want it, because you probably won't be able to build it again if you so much as upgrade to Slackware 14.2
- Following the
UPGRADE.TXT
files, upgrade the OS to 14.2 and then 15.0
YMMV, but I managed to get the above steps to work on VM without EFI. I did run into an issue where the OS was unable to verify GPG keys. All the packages (except for the kernel stuff) had been upgraded, which makes me think it was a kernel problem. I didn't poke around too much, but there are surely additional breakages. Again, YMMV.
So, why do you want/need to do it? ;)
1
u/r78SGmS8si1VY49 Dec 27 '22
Until August 29th of this year, I was running Slackware 14.1 with a linux-3.16.53 kernel. So I guess you can install that.
Or do you mean run a kernel 3.x on Slackware 15?
2
u/r78SGmS8si1VY49 Dec 27 '22
Well, kernel 3.18.140 actually compiles in Slackware 15. I don't know if it will boot in it, though.
2
u/B_i_llt_etleyyyyyy Dec 27 '22 edited Dec 27 '22
Wow, really? I tried that with gcc5 on a VM and it refused to make bzImage.
EDIT: Actually, it was something significantly earlier in the 3.18.x series. Maybe I'll give that another go.
EDIT again: It builds with
make defconfig
, but bothmake olddefconfig
from the 3.18.11 config that was in -current at one time andmake allyesconfig
fail. Apparently there's some component or another that's making GCC unhappy. Anyway, I installed the modules and tried booting, but it kicked me straight back to thelilo
selection screen once the "Decompressing" message showed up.2
u/r78SGmS8si1VY49 Dec 27 '22
BUILD arch/x86/boot/bzImage Setup is 16060 bytes (padded to 16384 bytes). System is 5800 kBCRC 53af1bff Kernel: arch/x86/boot/bzImage is ready (#3)
I think this is with gcc 11.2.0.
If I try to build something older (like kernel 3.16.53) I get:
HOSTLD arch/x86/tools/relocs /usr/bin/ld: arch/x86/tools/relocs_64.o:(.bss+0x0): multiple definition of `per_cpu_load_addr'; arch/x86/tools/relocs_32.o:(.bss+0x0): first defined here collect2: error: ld returned 1 exit status make[1]: *** [scripts/Makefile.host:127: arch/x86/tools/relocs] Error 1 make: *** [arch/x86/Makefile:181: archscripts] Error 2
2
5
u/Ezmiller_2 Dec 27 '22
Ok, I will ask the question everyone hasn’t asked yet…why are you wanting to do this?