From 7d81dbe78f95b34f3398c9906f27a0e6d8acce17 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Wed, 1 Nov 2017 15:26:23 +0000 Subject: [PATCH] Upgrade kernels on a slackware host --- kernel_upgrade | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 kernel_upgrade diff --git a/kernel_upgrade b/kernel_upgrade new file mode 100755 index 0000000..0b489dc --- /dev/null +++ b/kernel_upgrade @@ -0,0 +1,31 @@ +#!/bin/sh +VERSION=$1 + +download="https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-${VERSION}.tar.xz" + +cd /usr/src +rm ./linux-${VERSION}.tar.xz +wget $download +tar xf ./linux-${VERSION}.tar.xz +rm ./linux +ln -s linux-${VERSION} ./linux +cd /usr/src/linux + +zcat /proc/config.gz > ./.config +make olddefconfig +bash +make -j8 bzImage modules +make modules_install + +cp arch/x86/boot/bzImage /boot/vmlinuz-${VERSION}-maxf130 +cp .config /boot/config-${VERSION}-maxf130 +cp System.map /boot/System.map-${VERSION}-maxf130 + +dkms autoinstall -k ${VERSION}-maxf130 + +mkinitrd -F /etc/mkinitrd.conf -k ${VERSION}-maxf130 -o /boot/initrd-${VERSION}-maxf130.gz +vim /etc/lilo.conf +lilo + +echo "The following packages will need to be rebuilt:" +grep -l "lib/modules/$(uname -r)" /var/log/packages/* -- 2.46.2