LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 06-11-2013, 12:44 PM   #1
zrdc28
Member
 
Registered: Dec 2007
Location: Alabama USA
Distribution: Slackware current
Posts: 254

Rep: Reputation: 40
How to save old kernel in case upgrade crash!


I normally try to stay up to date with current, but on the last upgrade to current it crashed and I was unable to recover. I had saved everything that was important and it was not a big loss. I then did a reinstall of slack 14 and everything was fine. I blacklisted kernel 3.2.29-smp and upgraded to current and everything is fine.

My question is if I copy kernel files that I have blacklisted to an external source, can I just copy them back to the original location in case of another problem when I upgrade?

Is there another way that would be easier to save and give me the ability to recover or better yet to list the last kernel when it boots up?

One of the few things that I like about some of the other distros is the ability to just target an older kernel at boot up.
I have googled everything I could think of and can not understand how to do this. Please be gentle with an old man that loves Slackware!

hp 7000 dual core 2.66
single boot slack current
 
Old 06-11-2013, 01:04 PM   #2
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware64 14.1
Posts: 394

Rep: Reputation: 153Reputation: 153
I've found this post by Alien Bob most useful when installing new kernels. I just followed it to install the recent 3.2.45 kernel alongside the stock 3.2.29 and had no trouble at all, both kernels are installed and I choose which one starts in the lilo boot screen.

https://www.linuxquestions.org/quest...5/#post4676576
 
Old 06-11-2013, 01:12 PM   #3
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,335

Rep: Reputation: Disabled
Quote:
Originally Posted by Diantre View Post
I've found this post by Alien Bob most useful when installing new kernels. I just followed it to install the recent 3.2.45 kernel alongside the stock 3.2.29 and had no trouble at all, both kernels are installed and I choose which one starts in the lilo boot screen.

https://www.linuxquestions.org/quest...5/#post4676576
The story in that forum post has been re-written and expanded for the Slackware Wiki: http://docs.slackware.com/howtos:sla...:systemupgrade

Eric
 
Old 06-11-2013, 01:23 PM   #4
Diantre
Member
 
Registered: Jun 2011
Distribution: Slackware64 14.1
Posts: 394

Rep: Reputation: 153Reputation: 153
Quote:
Originally Posted by Alien Bob View Post
The story in that forum post has been re-written and expanded for the Slackware Wiki: http://docs.slackware.com/howtos:sla...:systemupgrade
Thanks Eric, I should check the Slackware docs more often!
 
Old 06-11-2013, 03:43 PM   #5
zrdc28
Member
 
Registered: Dec 2007
Location: Alabama USA
Distribution: Slackware current
Posts: 254

Original Poster
Rep: Reputation: 40
Thanks, I appreciate the response,I have read the article http://docs.slackware.com/howtos:sla...:systemupgrade
a few times and maybe I should have reworded my title differently. I want to keep my old working kernel installed and I
don't fully understand how to do that. I want to use the new kernel but with a backup in case of failure.



From the article listed above.

For that reason, you need to keep your “old” working kernel installed, and keep a section for it in your /etc/lilo.conf file. That way, if the new kernel fails to boot, you can fall-back to the old kernel and start investigating what went wrong
 
Old 06-11-2013, 03:50 PM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,335

Rep: Reputation: Disabled
It's all explained at the end of the section http://docs.slackware.com/howtos:sla...using_slackpkg

Eric
 
Old 06-12-2013, 05:14 AM   #7
dc_eros
Member
 
Registered: Nov 2006
Distribution: Slackware
Posts: 292

Rep: Reputation: 39
I usually don't remove the old kernel when upgrading to a new one. Just like the docs suggested, kernels are blacklisted in slackpkg.

What I do is install the new kernel instead of upgrading. Then add a lilo entry and try to reboot. If the new kernel works for several days, then I'll remove the old kernel.

My lilo.conf would usually contain multiple kernel entries (multiple versions, huge and generic). Ex:

Code:
image = /boot/vmlinuz-generic-3.2.29
  initrd = /boot/initrd.gz
  root = /dev/sdb2
  label = Linux3229
  read-only
image = /boot/vmlinuz
  root = /dev/sdb2
  label = Linux
  read-only
image = /boot/vmlinuz-huge-3.2.45
  root = /dev/sdb2
  label = Linux3245
  read-only
 
1 members found this post helpful.
Old 06-12-2013, 05:26 AM   #8
Toutatis
Member
 
Registered: Feb 2013
Posts: 32

Rep: Reputation: Disabled
@dc_eros

I am doing almost the same (all by hand, I have never used slackpkg).
For example to use new kernel 3.9.5 instead of previous 3.8.13 :
- go in /lib/modules and pack the 3.8.13 modules (tar cvf modules-3.8.13.tar 3.8.13/), because upgrading will kill them.
- go in /boot, and copy the old kernel 'vmlinuz-huge-3.8.13' to 'oldkernel'. Of course my "lilo.conf" has an entry for 'oldkernel'
- go in the slackware64 package tree and upgrade */kern*txz
- run 'lilo -C /etc/lilo.conf'
- upgrade all the other new packages if any
- reboot
 
1 members found this post helpful.
Old 06-12-2013, 11:40 PM   #9
zrdc28
Member
 
Registered: Dec 2007
Location: Alabama USA
Distribution: Slackware current
Posts: 254

Original Poster
Rep: Reputation: 40
Thanks, I sure appreciate the help and valuable information. I will go for it shortly, it is a must that I learn how
to do this because I wouldn't even think of going to another distro. I have read alien's article several times and just
could not get exactly how to do it.
 
Old 06-13-2013, 05:56 AM   #10
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,335

Rep: Reputation: Disabled
Quote:
Originally Posted by zrdc28 View Post
I have read alien's article several times and just could not get exactly how to do it.
If you succeed, you can send me your feedback of the parts in the text which were not clear to you, and I will try to improve the text.

Eric
 
Old 06-16-2013, 07:24 PM   #11
zrdc28
Member
 
Registered: Dec 2007
Location: Alabama USA
Distribution: Slackware current
Posts: 254

Original Poster
Rep: Reputation: 40
I was able to get it to work for me using Aliens article along with the advice from toutatis. I could not figure out
exactly what I needed to save. I have upgraded many times over the years with upgrade-all and never had but one problem
and that was solved in Aliens article on mkinitrd.
 
Old 06-19-2013, 12:59 AM   #12
zrdc28
Member
 
Registered: Dec 2007
Location: Alabama USA
Distribution: Slackware current
Posts: 254

Original Poster
Rep: Reputation: 40
Talking

This is the way that I finally was able to save the old kernel and try out the new 3.9.5 kernel. I am sure that I did some of it backwards but it works for me.

slackpkg update
With all kernels blacklisted in /etc/slackpkg/blacklist

slackpkg install-new

slackpkg upgrade-all

slackpkg download kernel* | the new versions will be in /var/cache/packages/slackware/a
cd to /var/cache/packages/slackware/a

Now install the -current kernel-* alongside the old one. The kernel source got downloaded, too.
installpkg *.txz | only the kernel-* was there!

cd to /boot, ls, and you will see both the old and new kernels.

I did a uname -a to make sure which kernel I was using, it turned
out to be 3.2.29-smp so I assumed that I needed the vmlinuz-huge-smp.

nano /etc/lilo.conf | edit to have both versions of the kernel

This is my lilo.conf
image = /boot/vmlinuz-huge-smp-3.9.5-smp
root = /dev/sda2
label = linux395
read-only
image = /boot/vmlinuz
root = sda2
label = linux
read-only

Saved it and then
lilo -v "make sure there are no errors"
REBOOT!
Thatís it! It worked for me, Thanks to all great slackers that helped me!
 
  


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
in which case the printf in c++ constructor will cause crash ? 5883 Programming 9 08-16-2012 10:31 AM
System crash after kernel upgrade krokodille Slackware 4 03-20-2005 02:34 PM
Why are all my upper case files being shown as lower case?? [Kernel 2.6.9-1.667 FC3] t3gah Fedora 4 03-11-2005 05:09 PM
mandrake kernel upgrade causes kde crash handler lionel_82 Linux - General 0 11-02-2004 07:00 PM
crash after kernel upgrade, ext2 at fault? dancarl Red Hat 0 12-31-2003 12:01 AM


All times are GMT -5. The time now is 08:33 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration