You are not logged in.

#1 2013-09-29 17:47:49

Aquila
Member
Registered: 2012-12-23
Posts: 46

[Solved]Having trouble with Grub detecting Windows 8 in dualboot

Hey there,

I have a UEFI board. When I first installed archlinux I did not used the Windows boot partition. To fix this I loaded up the installation media, mounted the partitions as they should be, mounting the microsoft boot partition as /mnt/boot and mounted my UEFI partition into /mnt/boot/efi. I reinstalled the kernel and regenerated the fstab. I also reinstalled grub and os-prober and such and regenerated the config.

When I did all this, there is still not  /boot/EFI/Microsoft. The grub mkconfig does not detect the microsoft boot at all.

What am I missing?

Thanks!

Last edited by Aquila (2013-10-03 17:45:44)

Offline

#2 2013-09-30 00:33:10

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

Please tell us how you mounted the partitions and exactly what commands you used. On the face of it, I'd expect it to be /boot/efi/EFI/Microsoft if you are mounting the ESP at /boot/efi.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2013-09-30 01:57:05

Aquila
Member
Registered: 2012-12-23
Posts: 46

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

I am using 2 disks: sda and sdb.

I made sda2 is the windows boot partition, sda5 is the root partition for arch, sda6 is the UEFI partition I made for UEFI, sdb2 is the home partition.

I followed the commands in the beginners guide.

Originally I did
mount /dev/sda5 /mnt
mount /dev/sda6 /mnt/boot
mount /dev/sdb2 /mnt/home

pacstrapped and generated fstab and did the three commands for grub before arch-chroot
# umount /sys/firmware/efi/efivars   
# modprobe -r efivars   
# modprobe efivars

Arch-chrooted, changed clock, changed hostname, changed passwd, then installed grub
# pacman -S grub efibootmgr
# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck --debug
# grub-mkconfig -o /boot/grub/grub.cfg
Exited, unmouted, and rebooted

Grub arrives but of course Windows is missing. Windows boot is in sda2. I made sure by looking in gparted lol
At this point I booted installation media again and remounted
mount /dev/sda5 /mnt
mount /dev/sda2 /mnt/boot
mount /dev/sda6 /mnt/boot/efi
mount /dev/sdb2 /mnt/home

Did pre-grub stuff then arch-chrooted in and reinstalled the kernel and grub and grub config
# pacman -U /var/cache/pacman/pkg/linux-3.xx-x.pkg.tar.gz  for reinstalling the kernel in the chroot

At this point I rebooted but I forgot to regenerate the fstab. So I remounted everything the same way, deleted the fstab and regenerated it. The fstab looks ok when I log in. I also then reinstalled grub and made the config again.

This is where I am at now. I also get this weird issue when I shutdown, it immediately starts up again. I know this could be an issue with the Windows 8 fastboot, but I know I disabled that before I installed arch linux.

Any tips would be great. I'm not sure where to go from here.

And yes you're right it should be /boot/efi/EFI/Microsoft. I have /boot/EFI/EFI/arch-grub but not Microsoft in there

Last edited by Aquila (2013-09-30 01:58:24)

Offline

#4 2013-09-30 14:23:33

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

Aquila wrote:

Hey there,

I have a UEFI board. When I first installed archlinux I did not used the Windows boot partition. To fix this I loaded up the installation media, mounted the partitions as they should be, mounting the microsoft boot partition as /mnt/boot and mounted my UEFI partition into /mnt/boot/efi. I reinstalled the kernel and regenerated the fstab. I also reinstalled grub and os-prober and such and regenerated the config.

When I did all this, there is still not  /boot/EFI/Microsoft. The grub mkconfig does not detect the microsoft boot at all.

What am I missing?

Thanks!

From your mention of "Windows boot partition" (which is rather SYSTEM partition in Windows terminology), I presume you installed Windows in BIOS-MBR mode and then converted to GPT and installed Arch in UEFI-GPT mode and now you want to chainload Windows BIOS-MBR from UEFI-GPT GRUB. If that is the case this is not possible.

First of all, UEFI installed GRUB does not support chainloading BIOS bootloaders or vice-versa. Second of all, even if you use some bootloader or boot manager which supports chainloading BIOS bootloader's via the firmware's Compatibility Support Module (CSM), like rEFInd, Windows does not support booting in BIOS-GPT combo since Windows BIOS based BCD file (equivalent to grub.cfg) and bootmgr are hardcoded to support only MBR. This is a limitation by Microsoft, which cannot be overcome by any Linux based bootloader.

To confirm, you need to post the output of "blkid -c /dev/null" , "parted /dev/sda print" , "gdisk -l /dev/sda" and "fdisk -l /dev/sda" (output of all 4 commands required, to cross-verify).

Last edited by the.ridikulus.rat (2013-09-30 14:24:07)

Offline

#5 2013-10-01 00:54:37

Aquila
Member
Registered: 2012-12-23
Posts: 46

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

So I reinstalled Windows making sure it was EFI installed. I launched the cd installation media as UEFI and installed windows 8 again. I also checked after the installtion if the installation was indeed EFI, and it appeared to be so. So the Windows boot partition should be EFI.

I then reinstalled Arch as I did previously, follow the beginners guide. I'm pretty sure I made no mistakes, but the Microsoft boot still fails to show under /boot/efi/efi/.

I'm not sure what else I am doing wrong.

Offline

#6 2013-10-01 01:07:08

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

the.ridikulus.rat wrote:

To confirm, you need to post the output of "blkid -c /dev/null" , "parted /dev/sda print" , "gdisk -l /dev/sda" and "fdisk -l /dev/sda" (output of all 4 commands required, to cross-verify).


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#7 2013-10-01 01:32:08

Aquila
Member
Registered: 2012-12-23
Posts: 46

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

Here is the requested information

http://pastebin.com/KPYys1QB

Offline

#8 2013-10-01 01:42:29

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,130

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

So sda2 has the type code for the EFI partition and you have that mounted at /boot. sda6 has a regular Linux type code (even though it seems to be fat32) and is mounted at /boot/efi.

That all seems rather confused...


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#9 2013-10-01 02:56:46

Aquila
Member
Registered: 2012-12-23
Posts: 46

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

My mistake on the linux code for sda6.

So I guess I may be a little confused. Sda2 is the boot partition of Windows 8 I did not make that. I want to dual-boot so I mounted that as boot. I made sda6 as an efi partition(1 gig) and mounted that as /boot/efi. Should I just forget about sda6 and just leave /boot at sda2 and that's it? I guess I was worried that the given windows efi was not enough space...

Offline

#10 2013-10-01 12:37:00

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

Aquila wrote:

Here is the requested information

http://pastebin.com/KPYys1QB

Aquila wrote:

My mistake on the linux code for sda6.

So I guess I may be a little confused. Sda2 is the boot partition of Windows 8 I did not make that. I want to dual-boot so I mounted that as boot. I made sda6 as an efi partition(1 gig) and mounted that as /boot/efi. Should I just forget about sda6 and just leave /boot at sda2 and that's it? I guess I was worried that the given windows efi was not enough space...

Stop using the term "windows boot partition". That is confusing everyone.

You have 2 efisys partitions, 100 MiB sda2 created by Windows Setup and 1 GiB sda6 created by you (but wrongly marked as 8300, instead of EF00). /EFI/Microsoft files should be present in sda2. I suggest using the sda6 as the efisys partition. Copy all the files from sda2 to sda6, format sda2, and change the type code of sda6 to EF00 and sda2 to 8300.

I also suggest using Gummiboot (and mounting sda6 as /boot, no need for another /boot/efi) as it much simpler to setup and autodetects Windows EFI if present.

EDIT: You can also keep sda2 and ditch sda6, bu I suggest sda6 instead of sda2 simply because of the bigger part size.

Last edited by the.ridikulus.rat (2013-10-01 12:41:38)

Offline

#11 2013-10-02 03:17:18

Aquila
Member
Registered: 2012-12-23
Posts: 46

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

Thanks that makes a lot more sense! I finally see Microsoft under EFI when I mount.

I have a question about gummiboot. I need to run this line before I arch-chroot to install it. I mounted my root sda5 under /mnt

# mount --bind /sys/firmware/efi/efivars $CHROOT/sys/firmware/efi/efivars

However, there is nothing under /mnt/sys/

Why am I missing these directories?

Offline

#12 2013-10-02 13:39:43

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

Aquila wrote:

Thanks that makes a lot more sense! I finally see Microsoft under EFI when I mount.

I have a question about gummiboot. I need to run this line before I arch-chroot to install it. I mounted my root sda5 under /mnt

# mount --bind /sys/firmware/efi/efivars $CHROOT/sys/firmware/efi/efivars

However, there is nothing under /mnt/sys/

Why am I missing these directories?

Ah, I see the mistake. The problem is its arch-chroot which mounts /sys inside the chroot as another instance of sysfs instead of --rbind mounting the host's /sys. Before that step, /sys inside chroot simply does not exist.

I have fixed the Beginner's Guide. You need to run (inside the chroot, after the arch-chroot step):

# mount -t efivarfs efivarfs /sys/firmware/efi/efivars

Last edited by the.ridikulus.rat (2013-10-02 19:35:05)

Offline

#13 2013-10-03 15:22:08

Aquila
Member
Registered: 2012-12-23
Posts: 46

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

Thanks for the clarification. I ran the given command, installed gummiboot, and wrote a configuration for Arch Linux as given. When I rebooted, it booted straight into Arch Linux with no option for Windows. Gummiboot is automatically supposed to detect Windows correct?

I copied the contents for sda2 into sda6 so /boot/EFI/Microsoft is present.

How can I configure it correctly?

Thanks!

Offline

#14 2013-10-03 17:06:52

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

Aquila wrote:

Thanks for the clarification. I ran the given command, installed gummiboot, and wrote a configuration for Arch Linux as given. When I rebooted, it booted straight into Arch Linux with no option for Windows. Gummiboot is automatically supposed to detect Windows correct?

I copied the contents for sda2 into sda6 so /boot/EFI/Microsoft is present.

How can I configure it correctly?

Thanks!

You either haven't setup <EFISYS>/loader/loader.conf file ( https://wiki.archlinux.org/index.php/Gu … figuration ) or the "timeout" in that file is set to zero. See http://freedesktop.org/wiki/Software/gummiboot/ .

http://freedesktop.org/wiki/Software/gummiboot/ wrote:

If no timeout is configured, which is the default setting, and no key pressed during bootup, the default entry is executed right away.

In the gummiboot menu, autodetected <EFISYS>/EFI/Microsoft/Boot/bootmgfw.efi will be shown as "Windows Boot Manager".

Offline

#15 2013-10-03 17:45:24

Aquila
Member
Registered: 2012-12-23
Posts: 46

Re: [Solved]Having trouble with Grub detecting Windows 8 in dualboot

Thank you so much for all the help finally have it!

Offline

Board footer

Powered by FluxBB