Bug 253687 - New kernel deinstalls old one / old kernel deinstalls new one
New kernel deinstalls old one / old kernel deinstalls new one
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
7
All Linux
high Severity high
: ---
: ---
Assigned To: Seth Vidal
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-21 06:05 EDT by Thomas Schweikle
Modified: 2007-12-09 05:43 EST (History)
2 users (show)

See Also:
Fixed In Version: Yum later than December 2007
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-09 05:43:00 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Thomas Schweikle 2007-08-21 06:05:08 EDT
Description 
of 
problem:
If a 
kernel 
update 
arrives,
 it is 
installed.
 The 
old 
kernel 
is 
deinstalled 
then. 
This 
should 
not 
happen, 
it 
might 
be the 
old 
kernel 
running,
 but 
not the 
new one.

Version-
Release 
number 
of 
selected 
component
 (if 
applicable):


How 
reproducible:
run 
"yum 
update" 
and 
then 
try to 
find 
the old 
kernel 
if a 
kernel 
update 
was 
part of 
the 
update.

Steps 
to 
Reproduce:
1. 
Install 
an old 
kernel
2. run 
"yum 
update"
3. 
Watch 
things 
break!
  
Actual 
results:
The old 
kernel 
is 
deinstalled

Expected 
results:
The old 
_and_ 
the new 
kernel 
are 
installed 
and in 
case 
something 
breaks 
it is 
easy to 
select 
the old 
kernel 
from 
the 
boot 
menu.

Additional 
info:
Comment 1 Thomas Schweikle 2007-08-21 06:14:33 EDT
To be exact: an old kernel should _only_ be replaced by a new kernel with the 
same major, minor, and release-number:

2.6.21.(n+1) may replace 2.6.21.(n) but not any 2.6.20.x or 2.6.19.x (or less)
2.6.22.(n+1) may replace 2.6.22.(n) but not any 2.6.21.x or 2.6.20.x (or less)

I consider this a showstopper, since there _is_ hardware breaking with newer 
kernel than 2.6.21.x and the problems are not fixed now.

Second there is software out there not working as expected with kernels newer 
than 2.6.20. It is neccessary to have the ability to install various kernels at 
the same time, even if using yum!
Comment 2 Chuck Ebbert 2007-08-21 10:38:08 EDT
By default, yum will keep two kernels installed. That can be changed by editing
/etc/yum/pluginconf.d/installonlyn.conf and changing the "tokeep" line.

And yes, maybe we need an enhancement so it can be smarter about which kernels
it keeps. As a workaround, manually delete the old kernel before installing a
new one.
Comment 3 Thomas Schweikle 2007-08-21 16:19:25 EDT
If I manualy remove the old kernel using

rpm --erase kernel...

It is deinstalled like yum would have done it. Or do you mean only removing it 
from the rpm database before the new kernel is installed? But this has 
drawbacks too: installed kernel-modules would have to be removed from the 
database too. I would need to create a list of modules I have to install with 
the new kernel before, then removing the entries from the rpm database, after 
that installing the new kernel and modules.

It is a lot more than just being smart about which kernel to remove and which 
not. Wouldn't it be more easy to have yum not to remove anything kernel related 
and just writing a script while installing the new kernel and modules? If I 
want to get rid of the old kernel I could then execute this script?
Comment 4 Jeremy Katz 2007-09-13 15:06:56 EDT
We already keep the running kernel.  Which is good enough to get to a new
kernel.  Thus, if the new kernel is bad, going back to that kernel is a
reasonable thing to do.
Comment 5 Thomas Schweikle 2007-09-14 00:54:08 EDT
This is not true. You do not keep the RUNNING Kernel, you keep the previously 
installed one:

Assume the running kernel is 2.6.21-xx.fc7
The previously installed kernel is 2.6.22-yy.fc7

There are two kernels installed:
- 2.6.21-xx.fc7
- 2.6.22.yy.fc7

The active and running kernel 2.6.21-xx.fc7 and the inactive 2.6.22-yy.fc7. Now 
a new kernel arrives: 2.6.22.zz.fc7.

After installing this new kernel there are two kernels installed:
- 2.6.22-yy.fc7
- 2.6.22-zz.fc7

Now: where is my active, running kernel? It was deinstalled by your 
installation! Next I wonder why I can't access some devices, since kernel 
series 2.6.21 work for me and my laptop, while 2.6.22 do not. This is at least 
fatal if one of the problematic devices is the harddisk --- your careless 
deinstall of the RUNNING kernel 2.6.21-xx.fc7 renderd my system unusable 
(Kernel panic while booting)!

This is a showstopper, not a thing not to fix since it works for you!
Comment 6 Jeremy Katz 2007-09-14 10:17:18 EDT
Please show the output of uname -a and then the output of yum -d6 update.

Because the code is pretty clearly doing the "keep the running kernel" and I
just tested it out on my laptop and confirmed that it's working.   
Comment 7 Thomas Schweikle 2007-09-23 14:08:08 EDT
You are right, but this only applies, if you are installing yum fromt the 
development branch. If you have yum installed from releases and upgraded to the 
latest version it keeps removing the running kernel.

Yum from the development tree does not remove the running kernel any more. The 
code seems to work!

If this could be merged into the released repository it would be great.
Comment 8 Thomas Schweikle 2007-12-09 05:43:00 EST
Looks merged now for at least Fedora Core 6, Fedora 7, and Fedora 8.

Note You need to log in before you can comment on or make changes to this bug.