LinuxQuestions.org
Review your favorite Linux distribution.
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-17-2012, 01:49 PM   #1
offplanet
Member
 
Registered: Oct 2009
Location: california
Distribution: slackware slax
Posts: 41

Rep: Reputation: 0
Slackpkg howto add (not replace) a kernel?


I would like to open a discussion of

What would it take to give slackpkg the option of adding a kernel to the system instead of replacing/deleting the existing kernel?

I like the idea of keeping the existing kernel until the new kernel has proved it can be booted. Then going back and deleting the old kernel when
it is no longer needed.

Can slackpkg be modified to do this?
Or is it too risky?
What are the issues involved?
 
Old 08-17-2012, 01:59 PM   #2
Bazzaah
Member
 
Registered: Mar 2007
Distribution: Slackware64-current, Slackware64 14
Posts: 331

Rep: Reputation: 50
You could compile your own kernel, add it to your lilo.conf then delete relevant files from /boot once you're content.

http://alien.slackbook.org/dokuwiki/...kernelbuilding

Maybe keep a huge kernel on lilo just in case?
 
Old 08-17-2012, 01:59 PM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2.1.2 on Lenovo Thinkpad W520
Posts: 8,853

Rep: Reputation: Disabled
slackpkg already can install as many kernels as your version of Slackware includes, just try "slackpkg install kernel"

Only it will not edit /etc/lilo.conf nor run lilo for you and you will have to take care of the symlinks in /boot.

EDIT Furthermore, if you made a full install all available kernels are already installed in /boot.

All you will have to do is make an initrd if needed (see /boot/README.initrd) and add a section for the new kernel in /etc/lilo.conf, then run "lilo -t -v" and if all goes well "lilo".

You can remove the old kernel after you be sure the new one is usable but that's not really necessary, unless you miss space on disk.

Last edited by Didier Spaier; 08-17-2012 at 02:23 PM.
 
1 members found this post helpful.
Old 08-18-2012, 11:40 AM   #4
dwblas
Member
 
Registered: Jun 2011
Posts: 84

Rep: Reputation: Disabled
Quote:
Originally Posted by Bazzaah View Post
You could compile your own kernel, add it to your lilo.conf then delete relevant files from /boot once you're content.

http://alien.slackbook.org/dokuwiki/...kernelbuilding

Maybe keep a huge kernel on lilo just in case?
From Alien
Quote:
You can decide to disable a lot of the modules that the default config will build, to cut down on compilation time, if you don't have the hardware in your computer.
You can use
make localmodconfig
to remove modules for hardware you don't have. Just make sure everything you want is turned on and recognized by the current running kernel.
 
2 members found this post helpful.
Old 08-18-2012, 03:44 PM   #5
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-Current
Posts: 6,446
Blog Entries: 15

Rep: Reputation: 2016Reputation: 2016Reputation: 2016Reputation: 2016Reputation: 2016Reputation: 2016Reputation: 2016Reputation: 2016Reputation: 2016Reputation: 2016Reputation: 2016
It actually easy to add a custom kernel without removing the originals.

The symlinks you have in /boot for:

vmlinuz
System.map
.config

are all created by the kernel slackbuild package provided by Patrick. Simply do this... remove them, edit /etc/lilo.conf to show the EXACT file names like

vmlinuz-2.6.38.7
System.map-2.6.38.7
config-2.6.38.7

Now when you add new custom kernels, and follow Eric's guide on kernel compiling http://alien.slackbook.org/dokuwiki/...kernelbuilding simply do NOT create the extra Symlinks to the new kernel, map, and configuration you copy to /boot, but manually edit /etc/lilo.conf and add the new kernel loading parameters with the version numbers added to the new kernel listing.
 
1 members found this post helpful.
Old 08-21-2012, 11:08 AM   #6
chrisretusn
Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 945

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Quote:
Originally Posted by offplanet View Post
I would like to open a discussion of

What would it take to give slackpkg the option of adding a kernel to the system instead of replacing/deleting the existing kernel?

I like the idea of keeping the existing kernel until the new kernel has proved it can be booted. Then going back and deleting the old kernel when
it is no longer needed.

Can slackpkg be modified to do this?
Or is it too risky?
What are the issues involved?
First lets clear up a few things. Slackpkg does not modify lilo.conf. Slackpkg does run lilo, if you allow it. After updating a kernel slackpkg will prompt you with:

"Your kernel image was updated. We highly recommend you run: lilo
Do you want slackpkg to run lilo now? (Y/n)"

While slackpkg does not take care of the symlinks, the kernel packages do. So it matters not if you use slackpkg or installpkg, upgradepkg; the symlinks will be created pointing to kernel upgraded or installed. If more that one kernel is upgraded, it will be the last package to upgrade, which normally would be the huge kernel.

Using the Slackware-current huge-smp kernel as the example. What I would do after I am satisfied the updated kernel works, is copy the System.map-huge-smp-3.2.27-smp, config-huge-smp-3.2.27-smp and vmlinuz-huge-smp3.2.27-smp files to say System.map-working-3.2.27, config-working-3.2.27, and vmlinuz-working-3.2.27. I would point the corresponding System.map, config and vmlinuz symlinks to those files. No need to change lilo.conf, run lilo and reboot as I am using the same kernel.

The next time the kernel is updated, I would let slackpkg upgrade the kernel, run lilo, then reboot and test it. If the new kernel doesn't work, at worst case boot to a Slackware CD and change the symlinks back to the working-3.2.27 and reboot. If the new kernel works, copy the new kernel to working-new.version and point the symlinks appropriately. Then delete the old working kernel.

If you are using the generic kernel you will have to add a mkinitrd to the mix. Another thing I will mention running "slackpkg install (or reinstall) kernel" will not work on packages that require upgrading, as indicated with [ upgrade ].
 
Old 08-21-2012, 04:12 PM   #7
ottavio
Member
 
Registered: Nov 2007
Posts: 312

Rep: Reputation: 46
Quote:
Originally Posted by offplanet View Post
I would like to open a discussion of

What would it take to give slackpkg the option of adding a kernel to the system instead of replacing/deleting the existing kernel?
Look at this post:
http://www.linuxquestions.org/questi...6/#post4723910

Last edited by ottavio; 08-21-2012 at 04:13 PM. Reason: wrong link
 
  


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
[SOLVED] Vi help (search, replace,add) haiders Linux - Software 12 03-18-2011 03:55 PM
Replace Glibc with uclibc and add busybox? David2010 Linux From Scratch 1 09-30-2009 02:12 AM
Add or Replace Sound ajkannan83 General 1 04-19-2006 08:55 AM
howto replace bash ? pingvina Linux - Software 12 12-30-2005 02:21 PM

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

All times are GMT -5. The time now is 03:48 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