免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1280 | 回复: 0
打印 上一主题 下一主题

fedora下的内核的升级与卸载(待翻译,添加,编辑) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-10-09 12:59 |只看该作者 |倒序浏览

                                作者:duanli, 来源:
[color="#0000ff"]http://duanli.cublog.cn
说明:转载请注明来源,交流请Email给作者
   在安装一个新的fedora发行版本后,可以选择升级所有的软件,也可以只升级下fedora编译过的内核包,在测试完新的内核后,再把旧的内核包卸载掉,节约空间。
一、升级fedora的内核
a.查看目前内核版本
[qkshan /boot]$uname -r
2.6.30.5-43.fc11.i686.PAE
b.
二、卸载fedora的旧内核
Suppose you want to remove a specific version of kernel package because it's causing a kernel panic.
Here is how you can remove them with yum in FC3:
[tchung@tchung-fc3 ~]$ rpm -qa | grep kernel
kernel-smp-2.6.9-1.678_FC3
kernel-smp-2.6.9-1.667
kernel-2.6.9-1.667
kernel-utils-2.4-13.1.39
kernel-2.6.9-1.678_FC3
[tchung@tchung-fc3 ~]$ rpm -qa | grep kernel | grep 678
kernel-smp-2.6.9-1.678_FC3
kernel-2.6.9-1.678_FC3
[tchung@tchung-fc3 ~]$ sudo yum remove kernel-smp-2.6.9-1.678_FC3 kernel-2.6.9-1.678_FC3
Setting up Remove Process
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package kernel-smp.i686 0:2.6.9-1.678_FC3 set to be erased
---> Package kernel.i686 0:2.6.9-1.678_FC3 set to be erased
--> Running transaction check

Dependencies Resolved
Transaction Listing:
  Remove: kernel.i686 0:2.6.9-1.678_FC3
  Remove: kernel-smp.i686 0:2.6.9-1.678_FC3
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Erasing: kernel 1/2
Erasing: kernel-smp 2/2

Removed: kernel.i686 0:2.6.9-1.678_FC3 kernel-smp.i686 0:2.6.9-1.678_FC3
Complete!
[tchung@tchung-fc3 ~]$
Now make sure your grub.conf is correct before the reboot.
Notice, the stanza for kernel version you've just removed is not there any more in /etc/grub.conf
[tchung@tchung-fc3 ~]$ sudo vi /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.9-1.667smp)
        root (hd0,0)
        kernel /vmlinuz-2.6.9-1.667smp ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.9-1.667smp.img
title Fedora Core-up (2.6.9-1.667)
        root (hd0,0)
        kernel /vmlinuz-2.6.9-1.667 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.9-1.667.img
BTW, if you want to exclude kernel packages from installing with yum, add following red line in /etc/yum.conf:
[tchung@tchung-fc3 ~]$ sudo vi /etc/yum.conf
[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
retries=20
obsoletes=1
gpgcheck=1
[color="red"]exclude=kernel*
[qkshan /boot]$sudo rpm -qa |grep kernel
kernel-PAE-2.6.30.5-43.fc11.i686
kernel-firmware-2.6.30.8-64.fc11.noarch
kernel-PAE-devel-2.6.30.8-64.fc11.i686
kerneloops-0.12-5.fc11.i586
kernel-PAE-2.6.29.4-167.fc11.i686
kernel-PAE-devel-2.6.30.5-43.fc11.i686
kernel-headers-2.6.30.8-64.fc11.i586
kernel-PAE-2.6.30.8-64.fc11.i686
[qkshan /boot]$sudo rpm -qa |grep kernel |grep 167
kernel-PAE-2.6.29.4-167.fc11.i686
[qkshan /boot]$sudo yum remove kernel-PAE-2.6.29.4-167.fc11.i686
               
               
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/104492/showart_2066208.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP