Skip to content
Search Anolis OS

This page uses Chinese content. Search opens the Chinese documentation.

    Browse this documentation

    Anolis 内核升级与多版本管理:grubby 实操

    This content is not available in your language yet.

    grubby 查询/清单操作实测;实际升级事务(dnf update 内核)在本页流程内但未执行重启切换(操作链可复核)。

    Terminal window
    # 1. 当前态
    uname -r; sudo grubby --default-kernel
    sudo grubby --info=ALL | grep -c ^title # 启动项数(实测两台各 1)
    # 2. 升级内核(updates 树供给)
    sudo dnf update kernel
    rpm -q kernel | sort | tail -3 # 多版本共存
    # 3. 默认启动项管理
    sudo grubby --set-default /boot/vmlinuz-<新版本>
    sudo grubby --info=DEFAULT | grep version
    # 4. 回退:启动时在 GRUB 选旧内核;持久化切默认
    sudo grubby --set-default /boot/vmlinuz-<旧版本>

    装 RHCK 内核后 ANCK/RHCK 双启动项共存——切换与回退同上,判定看后缀(-an8 vs 无后缀)。23 线无此选项。