grub 中仍然出现输入超出范围错误

grub 中仍然出现输入超出范围错误

我运行了启动修复,取消注释了 GRUB_GFX 行,并使用 Grub Customizer 将分辨率设置为 1366x768x60(60 部分是刷新率,对吧?)。但仍然出现错误,因此我重新安装/更新了 Grub。

然后,我发现我阅读的所有指南在 GRUB_GFX 行上显示的分辨率都没有引号,因此在最后一次尝试修复它时,我输入了“gksudo gedit /etc/default/grub”,删除了引号,更新并重新启动。在 grub 加载时,我仍然收到错误“输入超出范围,更改为 1366x768 - 刷新率 60”。现在,grub 当然仍然可以工作,如果我按下 Enter,Ubuntu 就会加载,如果我向下箭头 5 行并按下 Enter,Windows 7 就会加载。

我只在 grub 中收到此错误,所有操作系统 GUI 都可以正常加载,甚至 Ubuntu 恢复模式终端也是如此。我只能说,老天爷,我想我要放弃了,直接进入 grub 定制器,记下启动顺序和进入每个选项所需的按键次数,完全放弃 grub GUI,因为我知道所有东西都在哪里。问题是,这是我妈妈的电脑,虽然我可以告诉她所有东西都在哪里以及要按哪些按钮,但她会忘记。

我真的不想放弃,我还能做什么吗?我可能做错了什么吗?如果这有帮助的话,这台电脑是 Compaq Presario CQ5210F 台式机,配有原装显示器(虽然我不知道它会有什么用)。

这是我的 grub.cfg:

# 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="10"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# 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="1366x768x60"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux


请注意,它似乎已自动添加回引号

这是我的启动修复日志:http://paste.ubuntu.com/7683018/

答案1

运行此命令:

gksudo gedit  etc/default/grub

正确的 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=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="acpi_osi=Linux"

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

我在您的文件中看到的唯一区别是在根本不需要的地方有“”。

只需编辑这些行并保存。然后重新启动。

希望这次它可以对你有用。

相关内容