升级至 Windows 10 和 Grub 救援,同时配备 UEFI 和 BIOS

升级至 Windows 10 和 Grub 救援,同时配备 UEFI 和 BIOS

背景:我的主板有 UEFI。我在同一物理驱动器上安装了 Windows 8 和 Ubuntu 14.04 LTS(首先是 Windows 分区)。Windows 使用 UEFI 启动,而 Ubuntu 则不使用。这意味着为了启动 Ubuntu,我必须选择 BIOS 启动菜单,并在 Ubuntu 中选择非 UEFI 设备(Windows 分别使用 UEFI)。这对我来说非常完美,Ubuntu grub 对 Windows 安装一无所知,Windows 也对 Ubuntu 一无所知。

情况:我接受了 Windows 10 升级,这在我的 Ubuntu 分区之前添加了一些分区。Windows 仍可通过 UEFI 正常启动,但 Ubuntu 在启动时进入 Grub 救援模式:

error: no such partition.
Entering rescue mode...
grub rescue>

从此时起,我设法通过输入以下命令手动启动 Ubuntu

set prefix=(hd0,gpt5)/boot/grub
set root=(hd0,gpt5)
insmod normal
normal

因为 (hd0,gpt5) 是我的 /boot 包含分区(这有帮助Windows 10 升级导致 grub 救援

问题:如何使此前缀/根更改永久生效?我按照此方法操作http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd并尝试重新安装 grub,但出现以下情况:

sudo grub-install /dev/sda
Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.

我还尝试了启动修复,取消勾选单独的 /boot/efi 分区,但出现错误“检测到 GPT。请创建 BIOS-Boot 并重试)[...]'

这是我的启动信息摘要http://paste.ubuntu.com/12520209/

/dev/sdc 是带有 LiveCD Ubuntu 的 pendrive,它是临时安装的。

有没有办法指示 GRUB2 查找 gpt5 而不是 gpt4,如 bootinfo 中所示?我浏览了 askubuntu,但我发现的情况与两个系统的 UEFI 模式有关,我想避免在 UEFI 模式下设置 Ubuntu。

答案1

由于 Ubuntu 已安装在 Bios 传统模式下,并且设备启用了 UEFI,因此 Linux 会寻找带有 bios_grub 标志的分区,但令人惊讶的是,该分区并不存在。我在最后一个 Windows 分区和第一个 Linux 分区之间创建了大小为 1 MB 的新分区。我为其设置了 bios_grub 标志,并保持其未格式化。我使用 gparted 执行此操作。之后,我执行了 grub-install,然后执行了 update-grub。此操作检测到带有标志的分区,将 core.img 安装到这个新分区,并更新 MBR 以在那里寻找 core.img。现在,我的 Ubuntu grub 正在以传统模式运行,正如我所期望的那样。

我正在发布我当前的启动信息,以便人们可以比较变化。

http://paste.ubuntu.com/12530606/

相关内容