LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 07-12-2014, 04:48 PM   #1
BobKay
Member
 
Registered: Jul 2014
Posts: 39

Rep: Reputation: Disabled
How to upgrade kernel?


I'm looking to upgrade my kernel on my Slackware 14.1 system because I believe it'll solve a problem similar to the one in this thread but the problem is, I am unsure of just how to go about doing this.

Looking in http://mirrors.slackware.com/slackwa...ernels/huge.s/ I see three files: System.map.gz, bzImage, and config. I'm guessing I put bzImage in my /boot folder then update lilo.conf to add lines like so:
Code:
image = /boot/bzImage
  root = /dev/sda1
  label = NewKernel
  read-only
right?

What do I do with the System.map.gz and config files?
 
Old 07-12-2014, 05:17 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,055

Rep: Reputation: Disabled
Quote:
Originally Posted by BobKay View Post
I'm looking to upgrade my kernel on my Slackware 14.1 system because I believe it'll solve a problem similar to the one in this thread but the problem is, I am unsure of just how to go about doing this.

Looking in http://mirrors.slackware.com/slackwa...ernels/huge.s/ I see three files: System.map.gz, bzImage, and config. I'm guessing I put bzImage in my /boot folder then update lilo.conf to add lines like so:
Code:
image = /boot/bzImage
  root = /dev/sda1
  label = NewKernel
  read-only
right?
No. Instead you should build and install yourself a kernel and modules for your Slackware version and architecture (the link you provided is for 64 bit not 32 bit, by the way).

You could take as a basis a config file provided here (the huge-smp to make things simpler or the genric-smp that would need an additional step: making an initrd). Follow this.
 
Old 07-12-2014, 06:07 PM   #3
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
I've used Eric's guide to build a new kernel. Back up your data before you attempt upgrading your kernel.

http://alien.slackbook.org/dokuwiki/doku.php?id=linux:kernelbuilding&s[]=kernel&s[]=compile
 
Old 07-12-2014, 06:08 PM   #4
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Arch/Manjaro, might try Slackware again
Posts: 1,851
Blog Entries: 14

Rep: Reputation: 284Reputation: 284Reputation: 284
You should definitely look at http://alien.slackbook.org/dokuwiki/...kernelbuilding

Last edited by mostlyharmless; 07-12-2014 at 06:08 PM. Reason: ahh, beat me to it
 
Old 07-12-2014, 06:24 PM   #5
aaazen
Member
 
Registered: Dec 2009
Posts: 358

Rep: Reputation: Disabled
Quote:
Originally Posted by BobKay View Post
...
Looking in http://mirrors.slackware.com/slackwa...ernels/huge.s/ I see three files: System.map.gz, bzImage, and config. I'm guessing I put bzImage in my /boot folder then update lilo.conf to add lines like so:
Code:
image = /boot/bzImage
  root = /dev/sda1
  label = NewKernel
  read-only
right?

What do I do with the System.map.gz and config files?
Essentially this would work. But you still need to install the modules for the current kernel, 3.14.12

Another way is to download the kernel and module packages from the http://mirrors.slackware.com/slackwa.../slackware64/a directory.

Then upgrade your system:

#upgradepkg kernel-huge-3.14.12-x86_64-1.txz
#upgradepkg kernel-modules-3.14.12-x86_64-1.txz

Take a look at the /boot directory to see how the package install system handles the bzImage, config and System.map.gz

The bzImage ends up as /boot/vmlinuz-huge-3.14.12
The config ends up as /boot/config-huge-3.14.12
The System.map ends up as /boot/System.map-huge-3.14.12

Since a symbolic link /boot/vmlinuz points to /boot/vmlinuz-huge-3.14.12 the lilo entry can look like this:

Code:
image = /boot/vmlinuz
  root = /dev/sda1
  label = NewKernel
  read-only
 
Old 07-12-2014, 06:31 PM   #6
BobKay
Member
 
Registered: Jul 2014
Posts: 39

Original Poster
Rep: Reputation: Disabled
Thanks for the answers, but I would really rather use a precompiled kernel and modules from the -current branch than roll my own from the -testing branch.

I still have nightmares about "make config && make clean && make...", coming back four hours later when the compile finished (maybe), installing it, then booting to a blank screen back with Slackware 10.
 
Old 07-12-2014, 06:51 PM   #7
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
Quote:
Originally Posted by BobKay View Post
Thanks for the answers, but I would really rather use a precompiled kernel and modules from the -current branch than roll my own from the -testing branch.
Okay. I am not advising you to do this, but, you can edit /etc/slackpkg/mirrors and comment out your present version of Slackware (put a # in front of your present mirror) and then uncomment a -current mirror of your choice (remove the # in front of the mirror). Save and exit.

# slackpkg update gpg
# slackpkg update
# slackpkg install-new
# slackpkg upgrade-all

Run lilo at the end of this. You will then be running Slackware-current after the reboot. You need to upgrade to Slackware-current if you're going to run a -current kernel. There are risks associated with this.
 
1 members found this post helpful.
Old 07-12-2014, 07:09 PM   #8
BobKay
Member
 
Registered: Jul 2014
Posts: 39

Original Poster
Rep: Reputation: Disabled
Okay, I've downloaded the kernel-huge-3.14.12-x86_64-1.* and kernel-modules-3.14.12-x86_64-1.* files.

If I use installpkg instead of upgradepkg it'll install the new kernel alongside the current 3.10.17 kernel in /boot, correct? And then I can modify lilo.conf as above, changing filename from bzImage to vmlinuz-huge-3.14.12? I wish to keep the ability to boot the old kernel until I'm satisfied there are no issues with the new kernel.

What is the purpose of the System.map file? Will it cause any harm if I leave the symlink alone for now? It points to System.map-huge-3.10.17 right now. Does anything ever make use of it?

Same questions for config->config-huge-3.10.17 too, but I'm guessing its purpose is just to document what options the kernel was built with.
 
Old 07-12-2014, 07:14 PM   #9
BobKay
Member
 
Registered: Jul 2014
Posts: 39

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hitest View Post
Okay. I am not advising you to do this, but, you can edit /etc/slackpkg/mirrors and comment out your present version of Slackware (put a # in front of your present mirror) and then uncomment a -current mirror of your choice (remove the # in front of the mirror). Save and exit.

# slackpkg update gpg
# slackpkg update
# slackpkg install-new
# slackpkg upgrade-all

Run lilo at the end of this. You will then be running Slackware-current after the reboot. You need to upgrade to Slackware-current if you're going to run a -current kernel. There are risks associated with this.
Actually that's my intention, to upgrade the system to -current. But the document I'm working from specifically says to use installpkg to update the kernel, not slackpkg, but doesn't say how to go about doing that although the rest of the instructions in the document appear pretty straightforward.

Last edited by BobKay; 07-12-2014 at 07:16 PM.
 
Old 07-13-2014, 04:40 AM   #10
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by BobKay View Post
I still have nightmares about "make config && make clean && make...", coming back four hours later when the compile finished (maybe), installing it, then booting to a blank screen back with Slackware 10.
It's pretty usual for first try at kernel compilation, it's the way you gain experience. But you have to find what you forgot (missing root filesystems, HDD drivers, video, bootloader config etc)
 
Old 07-13-2014, 07:24 AM   #11
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
Quote:
Originally Posted by BobKay View Post
Actually that's my intention, to upgrade the system to -current. But the document I'm working from specifically says to use installpkg to update the kernel, not slackpkg, but doesn't say how to go about doing that although the rest of the instructions in the document appear pretty straightforward.
The slackpkg utility is not recommended for upgrading 14.1 to -current, but, I can tell you from first hand experience that it works without a hitch. I have done this myself many times. The slackpkg utility will upgrade all aspects of your system so that you are running -current. The commands that I listed will work to upgrade your system to --current. You can also run the command # slackpkg clean-system to remove any obsolete programs that remain after the upgrade. Your mileage may vary. Back up your system. Best of luck which ever method you use.
 
Old 07-13-2014, 09:37 AM   #12
BobKay
Member
 
Registered: Jul 2014
Posts: 39

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
It's pretty usual for first try at kernel compilation, it's the way you gain experience. But you have to find what you forgot (missing root filesystems, HDD drivers, video, bootloader config etc)
Actually that's what happened the last time I compiled a kernel, not the first. At one time you had to compile the kernel if you wanted support for some particular device (such as a NIC) since all device drivers had to be compiled into the kernel. Now we have kernel modules. But yeah I've been down the kernel compiling route; it's a long, tedious error-prone process that I don't see gaining any real benefit from. Yes I would gain experience but I wonder if the experience would be of any more use in the future than my experience with ipfwadm and ipchains is today.
Quote:
Originally Posted by hitest View Post
The slackpkg utility is not recommended for upgrading 14.1 to -current, but, I can tell you from first hand experience that it works without a hitch. I have done this myself many times. The slackpkg utility will upgrade all aspects of your system so that you are running -current. The commands that I listed will work to upgrade your system to --current. You can also run the command # slackpkg clean-system to remove any obsolete programs that remain after the upgrade. Your mileage may vary. Back up your system. Best of luck which ever method you use.
As it turns out using installpkg for the kernel itself and the kernel modules worked well enough, although I did also have to change the symlink in /etc/rc.d to point rc.modules at rc.modules-3.14.12.

Thanks to all for the help and suggestions.
 
1 members found this post helpful.
Old 07-13-2014, 12:29 PM   #13
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by BobKay View Post
Yes I would gain experience but I wonder if the experience would be of any more use in the future than my experience with ipfwadm and ipchains is today.
Yup, experience gained mostly to know better what drivers a particular hardware needs.
ipfwadm and ipchains is already old stuff though, replaced by iptables
 
Old 07-13-2014, 03:21 PM   #14
BobKay
Member
 
Registered: Jul 2014
Posts: 39

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
Yup, experience gained mostly to know better what drivers a particular hardware needs.
ipfwadm and ipchains is already old stuff though, replaced by iptables
Yup, my point exactly. When I built my current system nine years or so ago, I ran into a number of issues while setting it up. I don't recall the specifics of any of those issues, but I doubt any of the solutions would have much relevance to the issues I'm running into today with the new system I'm trying to build.
 
Old 07-14-2014, 08:04 AM   #15
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,780

Rep: Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431Reputation: 4431
Greetz
While one of the main advantages of Linux is being able to "do it your way" and if it works for you then nobody has the right to say you're wrong. Choices that actually work just amount to tradeoffs that hopefully give the owner a net value. In that vein, I think it is a little bit irresponsible to dismiss a still valuable process to others as something vaguely antiquated and useless like custom kernel building. If you read Alien Bob's "How I build a Kernel" page you'd see that specific CPU architecture, scheduling, and other memory support items are among still important choices, especially to those who game or work with multimedia files, having considerable, even "make or break", impact.

Nobody compiling a kernel ever uses (and rarely ever used) "make config" and running "make clean" after it would destroy anything you did anyway by returning it to generic source. The proper commands were "make mrproper" (no longer needed in 2.6.x) followed possibly by "make oldconfig" and either "make menuconfig" or "make xconfig", etc.

I figure anyone serious would recognize that if someone with as deep a knowledge (and as much on their plate) as Alien Bob would bother to take the time to build a custom kernel AND devote a webpage to precise instructions, that device could not be useless.
 
  


Reply



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] Upgrade to Kernel 3.2.45 - upgrade initrd and reinstall LILO? qlands Slackware 1 07-03-2013 02:15 AM
How to upgrade kernel in rhel6/centos6 with internet. manually download and upgrade. Gil@LQ Linux - Kernel 3 03-12-2012 05:07 PM
how to upgrade the Debian 3 kernel 2.4.18 to kernel 2.6 or bigmem- kernel chandu.bezawada Debian 6 11-12-2010 09:33 AM
apt-get upgrade does not upgrade my kernel halfpower Debian 5 12-11-2005 09:53 AM
What first upgrade kernel or upgrade slack 10.0 to current Kelean Slackware 7 01-16-2005 06:54 PM

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

All times are GMT -5. The time now is 12:24 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
Open Source Consulting | Domain Registration