LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Removing and adding kernels in Slackware (https://www.linuxquestions.org/questions/slackware-14/removing-and-adding-kernels-in-slackware-4175513344/)

Pinonoir 08-04-2014 05:36 PM

Removing and adding kernels in Slackware
 
I have three kernels currently in my lilo.conf.

# Linux bootable partition config begins
image = /boot/vmlinuz-generic-3.10.17
initrd = /boot/initrd.gz
root = /dev/sdb1
label = Slack
read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz-huge-3.14.13
root = /dev/sdb1
label = 31413
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sdb1
label = Linux
read-only
# Linux bootable partition config ends

What I'd like to do is remove the generic kernel and leave the huge kernel and the current kernel. I looked around and everything is usually for Ubuntu based distros or Fedora and Redhat. I'd like some information on how to add and remove kernels easily for the future as well.

keefaz 08-04-2014 07:10 PM

Code:

# Linux bootable partition config begins
image = /boot/vmlinuz-generic-3.10.17
  initrd = /boot/initrd.gz
  root = /dev/sdb1
  label = Slack
  read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz-huge-3.14.13
  root = /dev/sdb1
  label = 31413
  read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sdb1
  label = Linux
  read-only

# Linux bootable partition config ends

I colored the sections corresponding to the kernel entries. Basically you delete any entry that you don't want, then run lilo to take change in account.

Be carefull when editing this file as some error (kernel names for example) could make the system unbootable, nothing that can not be fixed though

Pinonoir 08-04-2014 08:22 PM

Quote:

Originally Posted by keefaz (Post 5214962)
Code:

# Linux bootable partition config begins
image = /boot/vmlinuz-generic-3.10.17
  initrd = /boot/initrd.gz
  root = /dev/sdb1
  label = Slack
  read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz-huge-3.14.13
  root = /dev/sdb1
  label = 31413
  read-only
# Linux bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sdb1
  label = Linux
  read-only

# Linux bootable partition config ends

I colored the sections corresponding to the kernel entries. Basically you delete any entry that you don't want, then run lilo to take change in account.

Be carefull when editing this file as some error (kernel names for example) could make the system unbootable, nothing that can not be fixed though

I meant deleting a kernel from the system fully. Not the entry if that helps to simplify

BCarey 08-04-2014 09:54 PM

As root you use removepkg to remove kernel-generic-version and kernel-modules-version, delete the unneeded part of lilo.conf, run lilo, and you should be good.

Brian

GazL 08-05-2014 04:09 AM

Don't remove the 'kernel-modules' package unless you're also uninstalling the corresponding 'huge' kernel. The 'huge' kernel isn't completely monolithic: it shares some of the same modules with the 'generic' kernel.


As for removing just the 'kernel-generic' package on its own, I wouldn't bother. As Kenobi would say, "This little one isn't worth your effort.".

BCarey 08-05-2014 10:19 AM

Quote:

Originally Posted by GazL (Post 5215296)
Don't remove the 'kernel-modules' package unless you're also uninstalling the corresponding 'huge' kernel. The 'huge' kernel isn't completely monolithic: it shares some of the same modules with the 'generic' kernel.


As for removing just the 'kernel-generic' package on its own, I wouldn't bother. As Kenobi would say, "This little one isn't worth your effort.".

Thanks for pointing this out. I didn't realize huge used modules (I've never used huge myself).

Brian

unInstance 03-26-2020 08:50 AM

Check /lib/modules as well.


All times are GMT -5. The time now is 06:40 PM.