LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Custom kernel doesn't work, but now even generic and huge kernels panic. (https://www.linuxquestions.org/questions/slackware-14/custom-kernel-doesn%27t-work-but-now-even-generic-and-huge-kernels-panic-4175492644/)

ibrunton 01-26-2014 12:48 PM

Custom kernel doesn't work, but now even generic and huge kernels panic.
 
I tried compiling a custom kernel from the 3.10.17 source installed with Slackware 14.1. I've compiled a couple of kernels successfully in Gentoo, so I figured I'd give it a try in Slackware. I followed the instructions in AlienBob's kernel wiki article.

The custom kernel didn't work (it would boot, but once I logged in and executed xinit, I had no mouse or keyboard input). I tried to reboot with the generic kernel, and got a kernel panic. I tried to reboot with the huge kernel and got a kernel panic. I don't know what I did that would affect those kernels (their config and initrd and System.map files are still in /boot).

Is there a way to get things working again? I can access the file system from Gentoo installed on the same machine, but I can't boot Slackware at all.

Edit: I don't know if this is relevant or not, but it appears that when I attempted to compile the custom kernel again (to fix the keyboard/mouse issue), somehow the CONFIG_LOCALVERSION got unset (I don't recall running make mrproper, but...). So the recompiled modules would have been installed into /lib/modules/3.10.17/ instead of /lib/modules/1.10.17-idb/ and the generic and huge kernels are looking at those instead of the originals (which presumably have been overwritten and are gone).

Didier Spaier 01-26-2014 02:13 PM

Boot your Slackware installation media, login but don't run setup.

Then, do this:
Code:

# Assuming you inserted a Slackware DVD, mount it
mkdir /DVD # mount point for the Slackware DVD
mount /dev/sr0 /DVD
fdisk -l  # to check which partition is /
mount /dev/sda1 /mnt # Assuming / is on /dev/sda1
# remove possibly damaged packages
ROOT=/mnt removepkg /mnt/var/log/packages/kernel*smp*txz
# reinstall needed packages
# if slackare64, replace slackware with slackare64 below
installpkg --root /mnt /slack/slackware/a/kernel*smp*txz
umount /DVD
# Now, remove the DVD and reboot

Please report the outcome.

If you still have a problem, you'll need to chroot into your system (still booting from the Slackware DVD), possibly edit /etc/lilo.conf then re run lilo. If you need guidance for that, just ask.

ibrunton 01-27-2014 01:44 PM

Thanks, Didier, that fixed it. Huge kernel works fine again.

Didier Spaier 01-27-2014 02:03 PM

At second thought, I think that the removepkg command was not necessary: it removes only files (and directories, if empty) that were installed from the genuine package, unless also found in other packages, but not "alien" files, so probably running installpkg was sufficient. But at least that didn't hurt and you can boot again, so all is well that ends well. Happy slacking :cool:


All times are GMT -5. The time now is 07:10 PM.