grub主题安装以及修改

1 主题安装:

下载地址:
https://www.gnome-look.org/browse/cat/109/
解压后直接运行sudo install.sh即可;
列举其文档:(个人选用主题为vimix, tree命令运行位置为:/usr/share/grub/themes)

/usr/.../grub/themes >>> tree Vimix                                                                                                                  
Vimix
├── background.jpg
├── dejavu_32.pf2
├── dejavu_sans_12.pf2
├── dejavu_sans_14.pf2
├── dejavu_sans_16.pf2
├── dejavu_sans_24.pf2
├── dejavu_sans_48.pf2
├── icons
│   ├── antergos.png
│   ├── archlinux.png
│   ├── arch.png
│   ├── arcolinux.png
│   ├── cancel.png
│   ├── chakra.png
│   ├── debian.png
│   ├── deepin.png
│   ├── devuan.png
│   ├── driver.png
│   ├── edit.png
│   ├── efi.png
│   ├── elementary.png
│   ├── endeavouros.png
│   ├── fedora.png
│   ├── find.efi.png
│   ├── find.none.png
│   ├── gentoo.png
│   ├── gnu-linux.png
│   ├── help.png
│   ├── kali.png
│   ├── kaos.png
│   ├── kbd.png
│   ├── korora.png
│   ├── kubuntu.png
│   ├── lang.png
│   ├── lfs.png
│   ├── linuxmint.png
│   ├── linux.png
│   ├── lubuntu.png
│   ├── macosx.png
│   ├── mageia.png
│   ├── Manjaro.i686.png
│   ├── manjaro.png
│   ├── Manjaro.x86_64.png
│   ├── memtest.png
│   ├── opensuse.png
│   ├── pop-os.png
│   ├── recovery.png
│   ├── restart.png
│   ├── shutdown.png
│   ├── siduction.png
│   ├── solus.png
│   ├── steamos.png
│   ├── type.png
│   ├── tz.png
│   ├── ubuntu.png
│   ├── unknown.png
│   ├── unset.png
│   ├── void.png
│   ├── windows.png
│   └── xubuntu.png
├── select_c.png
├── select_e.png
├── select_w.png
├── terminal_box_c.png
├── terminal_box_e.png
├── terminal_box_ne.png
├── terminal_box_n.png
├── terminal_box_nw.png
├── terminal_box_se.png
├── terminal_box_s.png
├── terminal_box_sw.png
├── terminal_box_w.png
├── terminus-12.pf2
├── terminus-14.pf2
├── terminus-16.pf2
├── terminus-18.pf2
└── theme.txt

1 directory, 76 files
/usr/.../grub/themes >>>     

2 如果需要手动修改主题:

手动修改以下文件即可:

~ >>> cat /usr/share/grub/themes/Vimix/theme.txt                                                                                                     
# GRUB2 gfxmenu Linux theme
# Designed for any resolution

# Global Property
title-text: ""
desktop-image: "background.jpg"
desktop-color: "#000000"
terminal-font: "Terminus Regular 14"
terminal-box: "terminal_box_*.png"
terminal-left: "0"
terminal-top: "0"
terminal-width: "100%"
terminal-height: "100%"
terminal-border: "0"

# Show the boot menu
+ boot_menu {
  left = 30%
  top = 30%
  width = 45%
  height = 60%
  item_font = "Unifont Regular 18"
  item_color = "#f5deb3"
  selected_item_color = "#00ffff"
  icon_width = 32
  icon_height = 32
  item_icon_space = 20
  item_height = 40
  item_padding = 5
  item_spacing = 12
  selected_item_pixmap_style = "select_*.png"
}

# Show a countdown message using the label component
+ label {
  top = 82%
  left = 32%
  width = 30%
  align = "center"
  id = "__timeout__"
  text = "Booting in %d seconds"
  color = "#cccccc"
  font = "Unifont Regular 16"
}

3 如果需要删除某些启动项目:

vim /boot/grub/grub.cfg

操作例子如下:
这个: #menuentry ‘Windows Boot Manager (on /dev/sda1)’ - 启动项目就被我注释成功了;

#注释掉你要注释的menuentry即可:menuentry 'Windows Boot Manager (on /dev/sda1)' 
~ >>> cat /boot/grub/grub.cfg | grep "/dev/sda1" -C 10 |grep "menuentry" -C 10                                                                       
		initrd	/boot/initramfs-5.8-x86_64-fallback.img
	}
}

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

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
#menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-52ED-19BB' {
#	savedefault
#	insmod part_gpt
#	insmod fat
#	set root='hd0,gpt1'
#	if [ x$feature_platform_search_hint = xy ]; then
#	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  52ED-19BB
#	else
#	  search --no-floppy --fs-uuid --set=root 52ED-19BB
#	fi
#	chainloader /efi/Microsoft/Boot/bootmgfw.efi
#}

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值