Answer the question
In order to leave comments, you need to log in
How to configure grub to boot UEFI Windows 8?
Hello everyone, I
use Linux as my main system, but I needed to install Windows.
Linux is on disk 1 (/dev/sda), Windows is on disk 2 (/dev/sdb).
By default, bios is configured to boot the OS from disk 1 (/dev/sda), i.e. grub is loaded and you can select additional options in it or boot into Linux.
At the time of bios loading, you can press F8 and choose from which place the OS will be loaded (disk, flash drive, etc.), if you select "UEFI Winfows Boot Manager" in this menu, then it boots into Windows.
Question: How to configure grub so that you can boot into Windows from it. Those. not through the choice of bootloader in bios, but from the grub menu?
1) Tried to create an additional menu item with this configuration:
menuentry "Windows 8" --class windows --class os {
insmod part_gpt
insmod search_fs_uuid
insmod ntfs
insmod chain
set root='hd1,gpt4'
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt4 --hint-efi=hd1,gpt4 --hint-baremetal=ahci1,gpt4 86B4370BB436FD6D
drivemap -s hd0 hd1
chainloader (${root})/Windows/Boot/EFI/bootmgfw.efi
}
error: invalid signature
Press any key to continue
menuentry "Windows 8" --class windows --class os {
insmod ntfs
set root='hd1,gpt4'
search --no-floppy --fs-uuid --set=root 86B4370BB436FD6D
chainloader +1
}
# parted -l
Model: ATA Crucial_CT128M55 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
2 1049kB 110GB 110GB ext4
1 110GB 128GB 18.0GB linux-swap(v1)
Model: ATA Crucial_CT256MX1 (scsi)
Disk /dev/sdb: 256GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 316MB 315MB ntfs Basic data partition hidden, diag
2 316MB 420MB 105MB fat32 EFI system partition boot, esp
3 420MB 555MB 134MB Microsoft reserved partition msftres
4 555MB 189GB 188GB ntfs Basic data partition msftdata
5 189GB 256GB 67.3GB ext4
#uname -a
Linux homepc 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
#cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
# grub-install --version
grub-install (GRUB) 2.02~beta2-36ubuntu3.17
Answer the question
In order to leave comments, you need to log in
delete everything written by hand, then in the Linux terminal
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update && sudo apt-get install -y boot-repair
select Recommended repair
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question