UEFI 启动模式 Ubuntu 12.04 和 Windows 8.1 UEFI

UEFI 启动模式 Ubuntu 12.04 和 Windows 8.1 UEFI

我在装有 Windows 8.1 的笔记本电脑 ( ) 上安装了 Ubuntu 12.04.5 lenovo g4070 59417454。但是当我在 grub 菜单中选中 Windows 8.1 时:

error: unknown command 'drivemap'
error: invalid EFI file path.

BIOS:

Boot Mode: UEFI

EFI:
ubuntu (WDC WD5000LPCX-24C6HTO)
Windows Boot Manager
ubuntu (WDC WD5000LPCX-24C6HTO)

不知道为什么我得到了 2 个 ubuntu 选项。也许是在我使用了之后Boot Repair

使用第二个 EFI 选项(Windows 启动管理器),它将成功启动到 Windows 8.1。

使用第三个选项,它将进入 grub 提示符。

UEFI 测试:

cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda11 during installation
UUID=a83b92ee-6243-4fd8-9008-17c05ef8715e /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
#UUID=C0A6-125C  /boot/efi       vfat    defaults        0       1
# /home was on /dev/sda10 during installation
UUID=bb008f49-2160-43d6-9ee2-84023072b571 /home           ext4    defaults        0       2
# swap was on /dev/sda9 during installation
UUID=d7de343e-1cad-446a-b7ba-355414132816 none            swap    sw              0       0
UUID=C0A6-125C  /boot/efi   vfat    defaults    0   1

UEFI 测试:

[ -d /sys/firmware/efi ] && echo "EFI boot on HDD" || echo "Legacy boot on HDD" 
EFI boot on HDD

核心:

uname -r
3.16.0-031600-generic

启动修复日志:

paste.ubuntu.com/10532939

答案1

将其添加到 40_custom。

gksudo gedit /etc/grub.d/40_custom
sudo update-grub

menuentry "Windows 8 UEFI" {
 insmod part_gpt
 insmod fat
 insmod search_fs_uuid
 insmod chain
 set root='(hd0,gpt2)'
 search --fs-uuid --no-floppy --set=root C0A6-125C 
  chainloader (${root})/efi/Microsoft/Boot/bootmgfw.efi
}

相关内容