AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1414369
Accepted
Wingarmac
Wingarmac
Asked: 2022-06-17 09:51:19 +0800 CST2022-06-17 09:51:19 +0800 CST 2022-06-17 09:51:19 +0800 CST

如何禁用 - Lubuntu 的图形 grub 主题

  • 772

我在我的电脑上使用 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使其不加载?这行得通吗?

grub2
  • 2 2 个回答
  • 379 Views

2 个回答

  • Voted
  1. mook765
    2022-06-17T11:35:33+08:002022-06-17T11:35:33+08:00

    grub 的外观由/etc/grub.d/05_debian_theme. 从此文件中删除可执行位sudo chmod -x /etc/grub.d/05_debian_theme

    创建/etc/grub.d/04_set-colors具有以下内容的文件:

    #!/bin/sh
    set -e
    
    # Set the colors of the boot-menu. Available colors are
    
    #    black
    #    blue
    #    green
    #    cyan
    #    red
    #    magenta
    #    brown
    #    light-gray
    #    dark-gray
    #    light-blue
    #    light-green
    #    light-cyan
    #    light-red
    #    light-magenta
    #    yellow
    #    white
    
    echo "${1}set menu_color_normal=white/black"
    echo "${1}set menu_color_highlight=black/light-gray"
    

    使文件可执行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再次运行。

    • 5
  2. Best Answer
    Wingarmac
    2022-06-17T18:09:41+08:002022-06-17T18:09:41+08:00

    解决方案:

    我已经能够通过删除数据包来删除主题:

    apt purge lubuntu-grub-theme.

    我必须update-grub,否则我在 grub 菜单之前收到一条消息:

    /usr/share/grub/themes/lubuntu-grub-theme/theme.txt未找到

    我确认了@guiverc 的答案,并按照他/她的建议添加了发布版本。

    • 3

相关问题

  • 有没有办法从 GUI/桌面管理我的 Grub 菜单选项?

  • grub 菜单中的“恢复”选项是什么?

  • 与 Grub 相比,使用 Grub2 有什么好处?

  • 如果旧版 grub 安装在引导分区扇区而不是 MBR 中,如何将 grub 更新为 grub2?

  • 如何在 Ubuntu 启动时显示或隐藏启动消息?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve