日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

Linux关闭开关机动画,centos7删除开机动画及修改启动菜单

發布時間:2025/3/19 linux 78 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Linux关闭开关机动画,centos7删除开机动画及修改启动菜单 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

刪除開機動畫

編輯vi /etc/default/grub 文件,找到 GRUB_CMDLINE_LINUX 一行,將“rhgb quiet” 改為 “quiet” (去掉rhgb)

修改前:

GRUB_TIMEOUT=5

GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"

GRUB_DEFAULT=saved

GRUB_DISABLE_SUBMENU=true

GRUB_TERMINAL_OUTPUT="console"

GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet"

GRUB_DISABLE_RECOVERY="true"

修改后:

GRUB_TIMEOUT=5

GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"

GRUB_DEFAULT=saved

GRUB_DISABLE_SUBMENU=true

GRUB_TERMINAL_OUTPUT="console"

GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap quiet"

GRUB_DISABLE_RECOVERY="true"

最后執行命令:

grub2-mkconfig --output=/boot/grub2/grub.cfg

重啟就可以看到效果了

修改啟動等待時間

編輯vi /boot/grub2/grub.cfg 文件,修改timeout屬性,如開機等待5秒修改為2秒

修改前:

terminal_output console

if [ x$feature_timeout_style = xy ] ; then

set timeout_style=menu

set timeout=5

# Fallback normal timeout code in case the timeout_style feature is

# unavailable.

else

set timeout=5

fi

修改后:

terminal_output console

if [ x$feature_timeout_style = xy ] ; then

set timeout_style=menu

set timeout=2

# Fallback normal timeout code in case the timeout_style feature is

# unavailable.

else

set timeout=2

fi

注意: 這個文件是由模板/etc/grub.d和配置文件/etc/default/grub通過命令grub2-mkconfig生成的

刪除多余開機菜單

編輯vi /boot/grub2/grub.cfg 文件,刪除menuentry開頭的段落,menuentry后面的就是菜單名

修改前:

### BEGIN /etc/grub.d/10_linux ###

menuentry 'CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.27.2.el7.x86_64-advanced-4e334e31-4461-4c13-9c08-93af5da320ea' {

load_video

set gfxpayload=keep

insmod gzio

insmod part_msdos

insmod xfs

set root='hd0,msdos1'

if [ x$feature_platform_search_hint = xy ]; then

search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 9cffe801-9abf-4403-805e-e92b604005d2

else

search --no-floppy --fs-uuid --set=root 9cffe801-9abf-4403-805e-e92b604005d2

fi

linux16 /vmlinuz-3.10.0-957.27.2.el7.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap quiet

initrd16 /initramfs-3.10.0-957.27.2.el7.x86_64.img

}

menuentry 'CentOS Linux (3.10.0-957.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.el7.x86_64-advanced-4e334e31-4461-4c13-9c08-93af5da320ea' {

load_video

set gfxpayload=keep

insmod gzio

insmod part_msdos

insmod xfs

set root='hd0,msdos1'

if [ x$feature_platform_search_hint = xy ]; then

search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 9cffe801-9abf-4403-805e-e92b604005d2

else

search --no-floppy --fs-uuid --set=root 9cffe801-9abf-4403-805e-e92b604005d2

fi

linux16 /vmlinuz-3.10.0-957.el7.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap quiet

initrd16 /initramfs-3.10.0-957.el7.x86_64.img

}

if [ "x$default" = 'CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)' ]; then default='Advanced options for CentOS Linux>CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)'; fi;

修改后:

### BEGIN /etc/grub.d/10_linux ###

menuentry 'CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.27.2.el7.x86_64-advanced-4e334e31-4461-4c13-9c08-93af5da320ea' {

load_video

set gfxpayload=keep

insmod gzio

insmod part_msdos

insmod xfs

set root='hd0,msdos1'

if [ x$feature_platform_search_hint = xy ]; then

search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 9cffe801-9abf-4403-805e-e92b604005d2

else

search --no-floppy --fs-uuid --set=root 9cffe801-9abf-4403-805e-e92b604005d2

fi

linux16 /vmlinuz-3.10.0-957.27.2.el7.x86_64 root=/dev/mapper/centos-root ro crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap quiet

initrd16 /initramfs-3.10.0-957.27.2.el7.x86_64.img

}

if [ "x$default" = 'CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)' ]; then default='Advanced options for CentOS Linux>CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)'; fi;

總結

以上是生活随笔為你收集整理的Linux关闭开关机动画,centos7删除开机动画及修改启动菜单的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。