Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It's been a while since i've played with the kernel and last night i was trying to trim the kernel that comes by default with Slackware and now i can't boot none of the kernels, i suspect this is because i made a make module_install install.
- Are there any specific directories that i can restore from the slackware installation image to restore the kernel function?
- Also, is anyone aware of a way to find out what is required for my system?
- Could someone share a .config for the Thinkpad t430?
- Can i test the new kernel image without run the module_install? I'm asking this because i would assume kernel-huge has all the required modules installed already and that it would be just a matter of having the new one load those modules.
From a, you'll need:
- kernel-firmware
- kernel-generic
- kernel-huge
- kernel-modules
From k, you'll get the kernel source. Packages are all in txz format.
Then, you boot with something else, mount your Slackware filesystem at a mount point, chroot into the filesystem, remove the damaged packages and install the good ones.
From a, you'll need:
- kernel-firmware
- kernel-generic
- kernel-huge
- kernel-modules
From k, you'll get the kernel source. Packages are all in txz format.
Then, you boot with something else, mount your Slackware filesystem at a mount point, chroot into the filesystem, remove the damaged packages and install the good ones.
Thanks for the help! Is there a way to test the new kernel without affecting the old one?
Thanks for the help! Is there a way to test the new kernel without affecting the old one?
If the versions are different, yes. Since then, the new kernel will not be taking the place of the old one. But if you want to replace the kernel, then I think, no.
Actually, if you could place the kernel image (vmlinuz, generic or huge) under another name at /boot and add an entry to lilo.conf or grub.cfg; then just the kernel image is a different one, but /etc/rc.modules will then report errors because the modules will be missing. You could experiment with that and see.
When you make your custom kernel configuration, set CONFIG_LOCALVERSION to a string of your choosing (it's under the 'general' section if I remember rightly). That way your modules-directory will be given a unique name that won't clash with the stock modules even if it's a rebuild of the same version of the kernel. I use '-local'. I also use the same string for my vmlinuz file, so I have
Code:
test@ws1:~$ ls -l /boot/vmlinuz* /lib/modules/
-rw-r--r-- 1 root root 5509104 Feb 14 23:55 /boot/vmlinuz-4.9.10-local
lrwxrwxrwx 1 root root 26 Feb 14 23:59 /boot/vmlinuz-4.9.y-local -> /boot/vmlinuz-4.9.10-local
/lib/modules/:
total 4
drwxr-xr-x 3 root root 4096 Feb 14 23:59 4.9.10-local
I don't have the stock kernels installed, but you can see from above that if I did, they wouldn't clash.
If the versions are different, yes. Since then, the new kernel will not be taking the place of the old one. But if you want to replace the kernel, then I think, no.
Actually, if you could place the kernel image (vmlinuz, generic or huge) under another name at /boot and add an entry to lilo.conf or grub.cfg; then just the kernel image is a different one, but /etc/rc.modules will then report errors because the modules will be missing. You could experiment with that and see.
The kernel version is the same one, i'm just trying to trim the modules on the huge kernel that comes with slackware and the way i've been doing is build the image and move it to /boot/ and grub-mkconfig -o /boot/grub/grub.cfg but because i kept getting kernel panics i thought i was doing something wrong so i decided to do it as if i was installing a new kernel and i end up screwing the whole system. I guess i'll have to keep trying until i get the modules right.
Did you create an initrd for your trimmed kernel?
Why try and remove modules from the huge kernel instead of just using the generic with an initrd?
I'm not sure I understand what you were trying to do so those may be stupid questions but I'm just curious.
First do as Gazl says and set a local user string during the configuration and name your new kernel and map with the local string included in the name.
Second compile the drivers needed to boot your system into the kernel, not as modules, so an initrd won't be needed.
Third using grub as the boot loader will make it easier to switch between your non working new kernel and the stock kernel till you get things right on your new kernel. By using grub won't have to remember to rerun lilo after each try to get it to work.
Last edited by colorpurple21859; 02-17-2017 at 05:36 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.