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 10-26-2015, 04:53 AM   #1
amenos42
Member
 
Registered: Jun 2013
Location: USA
Distribution: Slackware
Posts: 47

Rep: Reputation: Disabled
What should I upgrade first? Kernel or packages?


I need to move from 3.10.17 to 4.1.6. I have already updated slackpkg. "slackpkg search kernel" returns this:

[ upgrade ] - kernel-firmware-20131008git-noarch-1 --> kernel-firmware-20150820git-noarch-1
[ upgrade ] - kernel-generic-3.10.17-i486-3 --> kernel-generic-4.1.6-i586-1
[ upgrade ] - kernel-generic-smp-3.10.17_smp-i686-3 --> kernel-generic-smp-4.1.6_smp-i686-1
[ upgrade ] - kernel-huge-3.10.17-i486-3 --> kernel-huge-4.1.6-i586-1
[ upgrade ] - kernel-huge-smp-3.10.17_smp-i686-3 --> kernel-huge-smp-4.1.6_smp-i686-1
[ upgrade ] - kernel-modules-3.10.17-i486-3 --> kernel-modules-4.1.6-i586-1
[ upgrade ] - kernel-modules-smp-3.10.17_smp-i686-3 --> kernel-modules-smp-4.1.6_smp-i686-1
[ upgrade ] - kernel-headers-3.10.17_smp-x86-3 --> kernel-headers-4.1.6_smp-x86-1
[ upgrade ] - kernel-source-3.10.17_smp-noarch-3 --> kernel-source-4.1.6_smp-noarch-1

My plan is to installpkg kernel-generic and kernel-modules, then make a new ramdisk and lilo entry, then update the rest of my packages. Is that the right decision?

Last edited by amenos42; 10-26-2015 at 05:02 AM.
 
Old 10-26-2015, 05:09 AM   #2
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Indeed you should never "upgradepkg" your kernel-generic kernel-huge and kernel-modules packages, but rather use "installpkg" so that you have both the old (working!) and the new kernel packages installed in parallel.

Then you can upgrade all the rest of the packages (don't forget to also install packages that were added to your particular Slackware release by running "slackpkg install-new") and after that, generate the new ramdisk (initramfs to be precise).

If you create the ramdisk before upgrading all packages, the ramdisk may contain outdated software and no guarantees can be made that it will allow your computer to boot.
 
1 members found this post helpful.
Old 10-26-2015, 05:40 AM   #3
amenos42
Member
 
Registered: Jun 2013
Location: USA
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: Disabled
Thanks, AlienBob. Honored to encounter you.

As you can see, the first post now says "install" instead of "upgrade". I edited it before reading your reply, because I read this guide, which, ironically, you wrote.

I still think it's sadistic to leave the kernel modules etc. unblacklisted by default.
 
Old 10-26-2015, 05:47 AM   #4
amenos42
Member
 
Registered: Jun 2013
Location: USA
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: Disabled
Can I assume that "slackpkg upgrade-all" will now be safe and all newly installed packages will work correctly with the old kernel, provided I have blacklisted the kernel-related packages?

Last edited by amenos42; 10-26-2015 at 05:48 AM.
 
Old 10-26-2015, 05:50 AM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
before
Code:
slackpkg upgrade-all
you should issue a
Code:
slackpkg install-new
when moving to a new version, to avoid breaking things that need the added packages in the new version.
 
Old 10-26-2015, 05:58 AM   #6
amenos42
Member
 
Registered: Jun 2013
Location: USA
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: Disabled
That's true, I figured it was implied by Eric's quote. So I'm going to:
Code:
$ slackpkg install-new
$ slackpkg upgrade-all
$ mkinitrd (options)
$ vim lilo.conf
$ lilo

Last edited by amenos42; 10-26-2015 at 05:59 AM.
 
1 members found this post helpful.
Old 10-26-2015, 06:16 AM   #7
amenos42
Member
 
Registered: Jun 2013
Location: USA
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: Disabled
Now, what about "kernel-firmware-20131008git-noarch-1"?

When should I upgrade it?
 
Old 10-26-2015, 06:32 AM   #8
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
New package versions may indeed depend on the new kernel, so I'd be inclined to do a 2 phase update.

Parallel install the new kernel and modules along side your existing ones.
Build a new initrd for it (using the -o option on mkinitrd so as not to clobber the old one)
Add the new entries to lilo and reboot into the new kernel.
Once in the new kernel do install-new, upgrade-all, then rebuild the new initrd to pick up the updated library and utility versions (remembering to refresh lilo).
Reboot again.

Finally cleanup any leftovers (such as removed packages, the old kernel and initrds) and then rebuild and reinstall any of your 3rd party stuff from places such as SBo.

I don't think it matters when you do firmware, leaving it to the upgrade-all is probably fine.

There will always be edge cases, which I guess is why UPGRADE.TXT occasionally give additional instructions, but as a general guide, I think the above is about right.

Last edited by GazL; 10-26-2015 at 06:33 AM.
 
1 members found this post helpful.
Old 10-26-2015, 06:54 AM   #9
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Quote:
Finally cleanup any leftovers (such as removed packages, the old kernel ...
I hesitate to mention this, as it can be two-edged sword (offering to delete anything that is not part of official Slackware and that has not been blacklisted), but 'slackpkg clean-sytem' can help with this.
 
Old 10-26-2015, 01:43 PM   #10
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
Maybe I'm just becoming a Luddite but gosh! guys that seems like an awful lot of work "maintaining the maintainer". Do many of you find that upgrades are necessary often to keep doing what you use a computer for?
 
Old 10-26-2015, 05:46 PM   #11
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by amenos42 View Post
I still think it's sadistic to leave the kernel modules etc. unblacklisted by default.
No, it's Slackware. Funny thing, this afternoon I had to fix a client's desktop machine running Ubuntu 14.04 LTS. The system wouldn't boot anymore. After quite a bit of searching, I found out that a year and a half of updates had filled the /boot partition with a few dozen kernels and initrd images, after which dpkg was left in a broken state, because the last initrd couldn't be built anymore due to a full partition. I managed to boot the system, but when I wanted to remove a handful of obsolete kernels, aptitude informed me that in order to remove them, I had to install the most recent one first. Duh! It took me more than half an hour of jumping through burning loops using dpkg --remove --purge and apt-get -f install to have a usable system again. I'll take Slackware anytime, where you get to choose if you want to use installpkg or upgradepkg.
 
2 members found this post helpful.
Old 10-26-2015, 06:24 PM   #12
notKlaatu
Senior Member
 
Registered: Sep 2010
Location: Lawrence, New Zealand
Distribution: Slackware
Posts: 1,077

Rep: Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732Reputation: 732
Quote:
Originally Posted by enorbet View Post
Maybe I'm just becoming a Luddite but gosh! guys that seems like an awful lot of work "maintaining the maintainer". Do many of you find that upgrades are necessary often to keep doing what you use a computer for?
This sort of upgrade is not something I do frequently. On production machines, barring any major security concerns, I rarely upgrade a kernel (now that low latency is basically default). As long as the one I'm on is working as expected, I don't usually touch it.

So, no.
 
Old 10-26-2015, 07:33 PM   #13
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,969

Rep: Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548Reputation: 1548
I normally upgrade packages first. I cannot recall ever having issues doing this.

I always have at least two kernels installed on my systems (all x86_64, all -current). One is the "in use" kernel, the other is the "working" or fall back kernel. I have two lilo boot options, Slackware64 and Working.

The kernel is normally blacklisted. After using slackpkg to install-new, upgrade-all, clean-system as applicable. I comment out the kernel related lines (except for huge) in blacklist and do a "slackpkg download kernel". I then install each of the kernel packages using installpkg. This action installs the new generic kernel as the default (huge is blacklisted). (I probably could use "slackpkg install kernel" but prefer not to.)

I now have three kernels installed at this point. Using for the example, 4.1.6, 3.18.11 and 3.14.33. Before the upgrade Slackware64 boot to 3.18.11 and Working boot to 3.14.33, now Slackware64 boots to 4.1.6 but working still boots to 3.14.33. I change the "working" kernel 3.14.33 symlinks in /boot to point to 3.18.11. So now new kernel 4.1.6 is set to boot via "Slackware64" and kernel 3.18.11 set to boot via "Working" and kernel 3.14.33 simply taking up space.

The next step is to setup the ramdisk. Since I use a mkinitrd.conf file on each machine I issue the following commands:

mkinitrd -F -k 4.1.6
mkinitrd -F -k 3.18.11 -o initrd-working.gz -s initrd-working-tree

Of course at this point I need to run lilo to set it all up to work. No need to edit lilo.conf, it is setup for this.

Then reboot.

Should the new kernel not work, I can always fall back to the previous kernel. Once I am satisfied that all is well I remove kernel 3.14.33.

I have two other steps in my setup. Normally I run "sh NVIDIA-Linux-x86_64-352.55.run -k 4.1.6" before rebooting. After the reboot I run "/etc/rc.d/rc.vboxdrv setup" to recompile their respective kernel modules.
 
Old 10-30-2015, 04:50 AM   #14
amenos42
Member
 
Registered: Jun 2013
Location: USA
Distribution: Slackware
Posts: 47

Original Poster
Rep: Reputation: Disabled
I finished everything, so I'm going to mark this question as solved. There's only one thing you guys forgot to remind me to do:
Code:
ldconfig
I'd also like to raise one problem I encountered. Being in rural Africa, I had slow and choppy internet access. While running "slackpkg upgrade-all", my internet cut out. I walked in on my computer installing packages about 24 hours before I expected it to be finished downloading, and I knew I was going to have trouble. Sure enough, gawk depended on a library that hadn't been installed yet, and slackpkg depended on gawk. So I had to download that library on a different computer.

Wouldn't it be nice if slackpkg accepted arguments similar to tagfile categories? It would be nice if I could upgrade the required packages first. I fantasized earlier about a world where I could do something like this:
Code:
slackpkg download add
slackpkg upgrade add
slackpkg download all
slackpkg upgrade all
 
Old 10-30-2015, 05:13 AM   #15
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
From /etc/slackpkg/slackpkg.conf:
Code:
# If this variable is set to "on", all files will be downloaded before the
# requested operation (install or upgrade) is performed.   If set to "off",
# then the files will be downloaded and the operation (install/upgrade)
# performed one by one.  Default=on
DOWNLOAD_ALL=on
PS Assuming that the library in question was libmpfr (just a guess) you could have done
slackpkg update
slackpkg upgrade mpfr
slackpkg upgrade-all

But I am not sure to understand the issue. Do you mean that you tried to upgrade gawk before upgrading mpfr?

Last edited by Didier Spaier; 10-30-2015 at 05:55 AM.
 
  


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
about packages upgrade xavi_slacky Fedora 2 07-03-2015 02:34 PM
apt-get upgrade stopped, how can I remove packages before continuing upgrade? [KIA]aze Linux - Newbie 4 05-31-2007 07:49 AM
Using the 10.2 CD packages to upgrade kernel infiniphunk Slackware 5 09-20-2005 04:19 AM
Which of these packages would you upgrade? numb Slackware 3 03-19-2005 12:35 AM
Upgrade more packages ..:eMa:.. Debian 1 04-07-2004 05:42 AM

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

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