You are not logged in.

#1 2016-01-17 02:55:08

jesc516
Member
From: LI,NY
Registered: 2015-01-26
Posts: 72

Grub does not recognize windows 10 in dual boot laptop

I can boot into windows 10 and/or arch linux if I go into the laptop uefi bios, from which I can select windows or arch linux. When I select to boot from arch linux through the laptops uefi bios, it looks like grub loads but I can only select arch linux (I hope this makes sense). I did the following:

# mount /dev/sda5 /mnt

# mkdir /mnt/home
# mount /dev/sda6 /mnt/home

# mkdir -p /mnt/boot/efi
# mount /dev/sda2 /mnt/boot/efi                (Windows EFI partition is /dev/sda2)

# genfstab -p /mnt >> /mnt/etc/fstab

# arch-chroot /mnt

% mkinitcpio -p linux
% pacman -S grub efibootmgr
% grub-mkconfig -o /boot/grub/grub.cfg
% grub-install /dev/sda

% exit
# umount -R /mnt
# reboot

laptop booted into grub, but I can only see the arch linux os.

If someone can guide me in the right direction, any help is greatly appreciated.

Offline

#2 2016-01-17 03:08:03

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,679
Website

Re: Grub does not recognize windows 10 in dual boot laptop

jesc516 wrote:

% grub-install /dev/sda

If you had been following the correct guide then you would know that is the wrong command.

https://wiki.archlinux.org/index.php/Gr … allation_2

All YouTube videos and blog guides related to Arch installation are outdated and/or error-ridden, do not use them.

Follow this guide instead:
https://wiki.archlinux.org/index.php/Beginners'_guide

EDIT: Also, you need to install os-prober for GRUB to pick up Windows and provide a menu entry for it.

Last edited by Head_on_a_Stick (2016-01-17 03:11:34)

Offline

#3 2016-01-17 04:12:28

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: Grub does not recognize windows 10 in dual boot laptop

I'd suggest to drop grub and use systemd-boot.
Moreover the ESP to be mounted on /boot, no subdirectory. Probably wiki is a bit misleading.

EDIT
One more suggestion, search windows 10 boot site:bbs.archlinux.org with your favorite search engine, prior to post a new thread.

Last edited by TheSaint (2016-01-17 04:16:09)


do it good first, it will be faster than do it twice the saint wink

Offline

#4 2016-01-17 05:09:46

jesc516
Member
From: LI,NY
Registered: 2015-01-26
Posts: 72

Re: Grub does not recognize windows 10 in dual boot laptop

@Head_on_a_Stick
I forgot to mention in my original post that I had installed os-prober but, the good news is its working now!

I thought the command
# grub-install --target=x86_64-efi ...
was for virtualbox only.

After doing
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --recheck
I'm able to see windows in grub

doing --efi-directory=/boot gave me an "directory does not look like an efi directory" error but --efi-directory=/boot/efi worked


@TheSaint
I mounted ESP on /mnt/boot/efi ( # mount /dev/sda2 /mnt/boot/efi ), where /dev/sda2 is the Windows ESP
Is that why for the above command I had to use --efi-directory=/boot/efi ?

Do I have to reinstall arch linux in order to use systemd-boot? Or can I just restore the Windows bootloader using >bootrec /fixmbr then boot into arch linux and install/configure systemd-boot ? Would I have to uninstall grub from arch linux as well?

Last question, do you run # mkinitcpio -p linux before or after # grub-mkconfig -o /boot/grub/grub.cfg during initial installation of arch linux or does it not matter?

thank you gentlemen

Offline

#5 2016-01-17 05:51:50

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,523

Re: Grub does not recognize windows 10 in dual boot laptop

Better to stay with is working now. But nothing forbids you to add also systemd-boot. Later you may choose which boot loader will take the priority.


do it good first, it will be faster than do it twice the saint wink

Offline

#6 2016-01-17 08:07:38

boban_dj
Member
Registered: 2015-03-17
Posts: 150

Re: Grub does not recognize windows 10 in dual boot laptop

jesc516 wrote:

Last question, do you run # mkinitcpio -p linux before or after # grub-mkconfig -o /boot/grub/grub.cfg during initial installation of arch linux or does it not matter?


https://wiki.archlinux.org/index.php/Bo … tion_files
First line

Offline

#7 2016-01-17 09:07:24

tom.ty89
Member
Registered: 2012-11-15
Posts: 897

Re: Grub does not recognize windows 10 in dual boot laptop

He probably couldn't have made that mistake if he booted Arch Live in UEFI mode.

Offline

Board footer

Powered by FluxBB