如何手动升级Gentoo及其内核

时间:2015-05-25146举报小编:123

    今天给大家介绍下手动升级Gentoo及其内核的方法!希望对有需要的朋友能有所帮助!


    一、内核升级

    1.#emerge --sync //升级整个portage目录 也可以写脚本

    2. #emerge -s sources emerge -avq gentoo-sources

    [ebuild NS ] sys-kernel/gentoo-sources-3.10.4 [3.9.0] USE=“-build -deblob -symlink”

    编译内核

    3.# cd /usr/src/linux-3.10.4-gentoo

    #make -j5 menuconfig 编译内核不再赘述。 make -j5 && make install modules_install

    修改grub启用新内核。

    vim /boot/grub/grub.conf

    123456 default 1

    timeout 5

    splashimage=(hd0,0)/boot/grub/splash.xpm.gz

    title Gentoo 3.10.4

    root (hd0,0)

    kernel /boot/vmlinuz-3.10.4-gentoo ro root=/dev/sda1 rootfstype=ext4 quiet

    二、系统升级。

    4.#emerge -avq portage //如果不是最新的portage,需要按提示执行此操作

    5.#emerge -avq python //如果不是最新的python,需要按提示执行此操作

    6.#/usr/sbin/update-python 或者 python-updater //更新python配置 //执行完emerge python后执行此操作

    7.#emerge -avquDN world //按照 /var/lib/portage/world 文件下的包,重新构建整个系统

    参数说明: --ask (-a) 控制Portage显示它要更新的软件包列表,并让您决定是否继续更新

    --verbose (-v) 在屏幕上输出完整的文件列表

    --update (-u) 更新包的最佳版本

    --deep (-D) 更新系统中的每个软件包

    --newuse (-N) USE标记变更后,要使Portage检查USE标记的变动是否导致

    需要安装新的软件包或者将现有的包重新编译

    8.#emerge -av --depclean //清除不需要(孤立)的软件包

    9.#revdep-rebuild //gentoolkit包里面的一个软件,用来检查系统的依赖关系是否都满足,自动安装没有满足关系的包

    10.#perl-cleaner --all -- -avq //把perl相关的模块和文件都检查并修正一遍

    11.#dispatch-conf //更新系统的配置文件

    12.eselect news read all //查看提示消息

    #emerge -e world //本地重新编译整个系统。 暂不需要这一步。

    上面就是Gentoo升级系统和内核的方法介绍了,通过本文介绍的方法,您就能够将Gentoo及其内核升级到最新版本,但最新版本可能存在bug,不可盲目升级。