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 / 问题 / 704642
Accepted
eridani
eridani
Asked: 2015-12-02 07:46:47 +0800 CST2015-12-02 07:46:47 +0800 CST 2015-12-02 07:46:47 +0800 CST

启动时跳过 Grub

  • 772

我将 Ubuntu 安装在 UEFI 机器的空磁盘中,并且一直直接启动,没有任何菜单或超时,直到上周的软件更新。我想保持启动简单,就像以前一样。

我所做的相关更改是将带有旧 Linux Deepin 安装的磁盘从我出售的 PC 移动到装有 Ubuntu 的同一台机器上。所以现在我在同一台 PC 上有 2 个磁盘。

当然,在启动时,我现在有一个 grub 菜单可以在 Ubuntu 和 Deepin 之间进行选择。我不需要这个菜单,因为我一直使用 Ubuntu,Deepin 磁盘有自己的 grub,我可以从 BIOS 选项中选择要启动的磁盘。

如何返回到旧的启动顺序?我真的不想断开我的深度盘。

阅读完这个问题后,我更改了/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_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="noprompt"

# 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"

然后跑sudo update-grub起来没有问题。但是 grub 菜单和 10 秒超时在启动时仍然存在。

在 Ubuntu 磁盘上发布分区可能是相关的,因为这不是默认设置:

分区 - 挂载点 - 标志

/dev/sda1 - - bios_grub

/dev/sda2 - /boot/efi - boot,esp

/dev/sda3 - / -

/dev/sda4 - /home -

/dev/sda5 - swap -

boot
  • 2 2 个回答
  • 16133 Views

2 个回答

  • Voted
  1. Best Answer
    oldfred
    2015-12-02T12:02:38+08:002015-12-02T12:02:38+08:00

    如果出于任何原因你只想要 Ubuntu,你可以关闭 os-prober。如果需要,将您自己的条目添加到 40_custom,但 grub 会再次出现。

    如果找不到其他安装菜单只有 grub,应该直接启动。

    将此添加到 /etc/default/grub:

    GRUB_DISABLE_OS_PROBER=true
    

    或者关闭 os-prober 上的执行位:

    sudo chmod a-x /etc/grub.d/30_os-prober
    

    然后再次运行更新 grub sudo update-grub

    • 9
  2. Tung Tran
    2015-12-02T08:12:37+08:002015-12-02T08:12:37+08:00

    通常,如果您只有一个操作系统在运行,该选项GRUB_TIMEOUT=0就可以工作。如果 GRUB 2 的 os-prober 在运行脚本时识别出其他操作系统/etc/grub.d/30_os-prober,隐藏菜单超时功能将被条件语句禁用。这也禁用了在引导期间使用该Shift键显示菜单的能力。

    • 3

相关问题

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

  • 用户如何避免在启动时输入密码?[关闭]

  • 更改 Wubi 的启动顺序

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

  • 如何避免启动时出现“S to Skip”消息?

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