You are not logged in.

#1 2017-06-14 11:45:51

loadlover
Member
Registered: 2017-05-10
Posts: 103

Grub question - Setting up Windows 10 menu entry for dual boot

Hi all,

I have a small issue with grub. I'm setting up a dual boot Windows 10 / Arch Linux UEFI installation on my Dell XPS 13. I've completed most of the grub set up and it's booting fine into Arch.

I need to configure the appropriate menu entry though, so that I have the option to select Windows 10 during boot up. At the moment it just goes through to Arch.

Therefore I need to get the following working - namely the Windows entry in /boot/grub/custom.cfg:

if [ "${grub_platform}" == "efi" ]; then
	menuentry "Microsoft Windows 10 UEFI-GPT" {
		insmod part_gpt
		insmod fat
		insmod search_fs_uuid
		insmod chain
		search --fs-uuid --set=root $hints_string $fs_uuid
		chainloader /EFI/Microsoft/Boot/bootmgfw.efi
	}
fi

I'm pretty sure my $esp (as it's called on the ArchWiki grub page) is /boot, so to determine the $fs_uuid, I use:

grub-probe --target=fs_uuid /boot/EFI/Microsoft/Boot/bootmgfw.efi

This returns, I believe correctly:

4490-7DD8

Next, to determine the $hints_string, I do:

grub-probe --target=hints_string /boot/EFI/Microsoft/Boot/bootmgfw.efi

(For the moment I leave out the options --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 because they seem to be unrecognised)

Now I have a problem, because the response is:

grub-probe: warning: unknown device type nvme0n1.

This is obviously referring to the laptop's SSD, which yes, is nvme0n1. I also know that the EFI boot partition as set up by Windows is nvme0n1p1. So, what do I do now?

Many thanks in anticipation,

Loady

Last edited by loadlover (2017-06-14 12:37:27)

Offline

#2 2017-06-14 14:48:18

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Grub question - Setting up Windows 10 menu entry for dual boot

Is there any reason you're writing a custom grub config?

Just installing os-prober and running grub-mkconfig -o /boot/grub/grub.cfg should automatically pick up your Windows installation and add an entry for it.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-06-15 08:56:11

loadlover
Member
Registered: 2017-05-10
Posts: 103

Re: Grub question - Setting up Windows 10 menu entry for dual boot

Thanks slithery.

It's odd because the first time I do 'grub-mkconfig -o /boot/grub/grub.cfg' during my Arch install, it doesn't pick up the existing Windows installation. It does, however, when I do it a second time. Hmmm.. I don't know why at the mo, but I'll figure it out.

smile

Loady

Offline

Board footer

Powered by FluxBB