LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-04-2014, 05:36 PM   #1
Pinonoir
Member
 
Registered: May 2014
Posts: 209

Rep: Reputation: 0
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.
 
Old 08-04-2014, 07:10 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,230

Rep: Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724Reputation: 724
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

Last edited by keefaz; 08-04-2014 at 07:12 PM.
 
Old 08-04-2014, 08:22 PM   #3
Pinonoir
Member
 
Registered: May 2014
Posts: 209

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by keefaz View Post
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
 
Old 08-04-2014, 09:54 PM   #4
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
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
 
Old 08-05-2014, 04:09 AM   #5
GazL
LQ Guru
 
Registered: May 2008
Posts: 5,410
Blog Entries: 14

Rep: Reputation: 3235Reputation: 3235Reputation: 3235Reputation: 3235Reputation: 3235Reputation: 3235Reputation: 3235Reputation: 3235Reputation: 3235Reputation: 3235Reputation: 3235
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.".
 
1 members found this post helpful.
Old 08-05-2014, 10:19 AM   #6
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Quote:
Originally Posted by GazL View Post
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
 
Old 03-26-2020, 08:50 AM   #7
unInstance
Member
 
Registered: Jan 2020
Distribution: Slackware/FreeBSD
Posts: 61

Rep: Reputation: Disabled
Check /lib/modules as well.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Assertion `kernels [x] == kernels [x]' failed with emulator in Slackware 14 Holering Slackware 1 05-10-2013 03:43 PM
removing old kernels sycamorex Linux - Software 4 12-31-2008 08:54 AM
Removing old kernels dbzw Linux - Newbie 5 02-29-2004 12:01 PM
Removing old kernels dbzw Linux - General 1 02-28-2004 11:33 PM
removing old kernels in RH 8.0 bobterri Linux - General 2 12-02-2002 09:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration