我在我的电脑上使用 Lubuntu 22.04 LTS,并且正在测试 grub 编辑。
似乎 Lubuntu 正在使用某种图形界面来显示 grub。
我可以禁用它以使用与 Ubuntu 的默认设置相同的功能吗?
这是我的 grub 配置文件:cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT="0"
GRUB_TIMEOUT_STYLE="hidden"
GRUB_TIMEOUT="0"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
GRUB_DISABLE_OS_PROBER="false"
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL="console"
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE="640x480"
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID="true"
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
这些是update-grub的结果
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Sourcing file `/etc/default/grub.d/lubuntu-grub-theme.cfg'
Generating grub configuration file ...
Found theme: /usr/share/grub/themes/lubuntu-grub-theme/theme.txt
Found linux image: /boot/vmlinuz-5.15.0-39-generic
Found initrd image: /boot/initrd.img-5.15.0-39-generic
Found linux image: /boot/vmlinuz-5.15.0-25-generic
Found initrd image: /boot/initrd.img-5.15.0-25-generic
Memtest86+ needs a 16-bit boot, that is not available on EFI, exiting
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Windows Boot Manager on /dev/sda4@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done
我可以看到它指向两个文件:`/etc/default/grub.d/lubuntu-grub-theme.cfg' /usr/share/grub/themes/lubuntu-grub-theme/theme.txt
解决方案是否应该删除/usr/share/grub/themes/lubuntu-grub-theme/theme.txt使其不加载?这行得通吗?
grub 的外观由
/etc/grub.d/05_debian_theme
. 从此文件中删除可执行位sudo chmod -x /etc/grub.d/05_debian_theme
创建
/etc/grub.d/04_set-colors
具有以下内容的文件:使文件可执行
sudo chmod +x /etc/grub.d/04_set-colors
最后运行
sudo update-grub
。这将为您提供一个非常基本的 grub 菜单,具有黑色背景以及您选择的文本和高亮颜色。
您可以通过删除新创建的文件来轻松撤消更改,
/etc/grub.d/04_set-colors
将可执行位返回给/etc/grub.d/05_debian_theme
并且,当然,sudo update-grub
再次运行。解决方案:
我已经能够通过删除数据包来删除主题:
apt purge lubuntu-grub-theme
.我必须
update-grub
,否则我在 grub 菜单之前收到一条消息:/usr/share/grub/themes/lubuntu-grub-theme/theme.txt
未找到我确认了@guiverc 的答案,并按照他/她的建议添加了发布版本。