r/slackware • • 4d ago

My challenge kernel 7 with Slackware

As someone who’s curious and likes to experiment, would I be able to build Slackware with a kernel customized to version 7.x? How much disk space would I need to switch from one version to another? Would 30 GB or 40 GB be enough, considering that the current system uses 20 GB?

8 Upvotes

9 comments sorted by

3

u/I_am_BrokenCog 4d ago edited 4d ago

Just like any other Linux distro, start by downloading the kernel git repo, then from inside the git repo:

make nconfig

make

make modules_install 

make install

Once this is finished, you will need to update elilo/lilo/grub to point to your knew kernel.

Also, if you use an initrd, you'll need to re-create that with the new kernel.

Use /usr/share/mkinitrd/mkinitrd_command_generator.sh/mkinitrd_command_generator.sh to get started.

The new kernel image size in /boot depend on the options selected in 'nconfig'. The modules in /lib/modules will depend on those options as well.

The Kernel options I use result in:

-rwxr-xr-x 1 root root 14M Oct 20 18:04 vmlinuz*

compared with -current generic's:

-rwxr-xr-x 1 root root 15M Nov 19 10:05 vmlinuz-generic*

and lib/modules for my custom 7.3.0 kernel and -current generic's 7.3.5:

172M /lib/modules/7.3.0

570M /lib/modules/7.3.5/

1

u/terono 3d ago

Thank you very much for your advice. I’ve now upgraded the kernel to the latest stable version.

4

u/green_mist 4d ago

Slackware current has been using kernel 7.x for a while, I think it is currently using 7.3.5, so it is definitely possible.

1

u/ersentenza 4d ago

You only need space for the new kernel, it does not change anything in the system. Just download kernel source and compile them, it will take about a couple GB.

Just a note, I tried both 7.2 and 7.3, and I noticed on older systems (about 2011 era) there is some instability, kernel watchdog sometimes times out. This does not happen with 6.18.

1

u/terono 4d ago

I tried to upgrade to the current version, but 10 GB of disk space wasn’t enough, so I had to abort the upgrade.

1

u/ersentenza 4d ago

Wait, if you want to upgrade everything to Slackware current of course you need a lot more space. But you do not need to upgrade to current to use 7 kernel, it will work fine on 15.

1

u/terono 4d ago

What happens is that once you update to the next kernel version, the whole system gets updated, which takes up more disk space. That’s what happened to me.

1

u/ersentenza 4d ago

But you do NOT update through slackware! That kernel package is built for current and of course it will try to bring along all its dependencies. You need to download the kernel sources from kernel.org and compile them.

1

u/terono 3d ago

Thank you very much for your advice. I’ve now upgraded the kernel to the latest stable version.