grub主题样式

grub2

主题网址

https://www.pling.com/p/1603282/

https://www.box-look.org/browse?cat=109&page=2&ord=latest

安装

Copy the theme directory

1
/usr/share/grub/themes

Make changes to the GRUB config file.

1
2
3
4
5
sudo mousepad  /etc/default/grub
#found other os
GRUB_DISABLE_OS_PROBER=false
#https://www.python100.com/html/4C5V4J6NR9B6.html
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

Find the line GRUB_THEME= then change it to GRUB_THEME="/usr/share/grub/themes/xxxx/theme.txt"

预览

https://pypi.org/project/grub2-theme-preview/

1
pip install --user grub2-theme-preview

Please make sure to install these non-PyPI dependencies as well:

  • grub-mkrescue of GRUB 2 (package grub-common on Debian and Ubuntu)
  • QEMUhypervisor that performs hardware virtualization
  • OVMF — EFI bios image for use with QEMU
  • mtoolscollection of utilities to access MS-DOS
  • xorriso of libisoburnfrontend which enables creation and expansion of the ISO format

Usage

1
grub2-theme-preview --help

默认

positional arguments:
PATH path of theme directory (or PNG/TGA image file) to
preview

optional arguments:
-h, –help show this help message and exit
–grub-cfg PATH path of custom grub.cfg file to use (default:
/boot/grub{2,}/grub.cfg)
–resolution WxH set a custom resolution, e.g. 800x600
–timeout SECONDS set GRUB timeout in whole seconds (default: 30 seconds)
–add TARGET=/SOURCE make grub2-mkrescue add file(s) from /SOURCE to
/TARGET in the rescue image (can be passed multiple
times)

command location arguments:
–grub2-mkrescue COMMAND
grub2-mkrescue command (default: auto-detect)
–qemu COMMAND KVM/QEMU command (default: qemu-system-)
–xorriso COMMAND xorriso command (default: xorriso)

1
❯ grub2-theme-preview  /usr/share/grub/themes/breeze

INFO: Appending to fonts to load: Hack-12.pf2
INFO: Appending to fonts to load: Hack-14.pf2
INFO: Appending to fonts to load: Hack-16.pf2
INFO: Appending to fonts to load: Hack-18.pf2
INFO: Appending to fonts to load: Hack-22.pf2
INFO: Appending to fonts to load: Hack-24.pf2
INFO: Appending to fonts to load: Hack-32.pf2
INFO: Appending to fonts to load: Hack-36.pf2
INFO: Found OVMF image at ‘/usr/share/OVMF/OVMF_CODE.fd’.
INFO: Please give GRUB a moment to show up in QEMU…

old grub

旧机器debian8,Ubuntu11.10,grub1

安装burg

1
sudo apt-get install burg burg-themes
  1. burg-common_1.98+20100623-1_amd64.deb
  2. burg-emu_1.98+20100623-1_amd64.deb
  3. burg-pc_1.98+20100623-1_amd64.deb

安装过程

img

img

img

空格选择

img

  1. burg-themes-common_1.98+20100623-1_all.deb

5.burg-themes_1.98+20100623-1_all.deb

6.burg_1.98+20100623-1_amd64.deb

执行更新

1
sudo update-burg

安装完成 ,重启看效果

开始 DIY主题

http://www.deviantart.com/挑选一个主题下载(本文以[Metro](http://luxieblack.deviantart.com/art/Metro-burg-theme-336505408?offset=30#comments)主题为例),将下载的文件解压复制到/boot/burg/themes/中,终端执行sudo update-burg

调试模式

终端输入sudo burg-emu打开

img

按F2(“t”)选择主题Metro,F3是调节分辨率的,需要在真实的显示环境下调节

添加图标 分别改名为hover_linuxmint和normal_linuxmint

复制到/boot/burg/themes/Metro/icons/中。并修改同目录的文件icons,加入下面的命令:

1
-linuxmint { image = "$$/normal_linuxmint.png:$$/hover_linuxmint.png" }

删除 burg

1
sudo apt-get remove burg burg-themes burg-emu

注意:采用wubi(Ubuntu Installer for Windows)安装的请勿尝试

点击打赏
文章目录
  1. 1. grub2
    1. 1.1. 安装
      1. 1.1.1. Copy the theme directory
      2. 1.1.2. Make changes to the GRUB config file.
    2. 1.2. 预览
      1. 1.2.1. Usage
  2. 2. old grub
    1. 2.1. 安装burg
    2. 2.2. 执行更新
    3. 2.3. 开始 DIY主题
    4. 2.4. 删除 burg
载入天数...载入时分秒... ,