You are not logged in.

#1 2013-09-27 12:21:34

vintherine
Member
Registered: 2013-09-27
Posts: 5

dual boot Arch / Windows 8 with grub, uefi and gpt

hi,

(my aplogies for my bad english)

after a fresh installation without worries I have one last problem : starting w8

Partitions :

[root@ToshCM christian]# gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.7

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1465149168 sectors, 698.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): BAE3660C-FC6F-11E1-9C45-C6B1BB081CD7
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1465149134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3757 sectors (1.8 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          923647   450.0 MiB   2700  Basic data partition
   2          923648         1456127   260.0 MiB   EF00  Basic data partition
   3         1456128         1718271   128.0 MiB   0C01  Basic data partition
   4         1718272      1230518271   585.9 GiB   0700  Basic data partition
   5      1445343232      1465147391   9.4 GiB     2700  Basic data partition
   6      1230518272      1250998271   9.8 GiB     8200  
   7      1250998272      1291958271   19.5 GiB    8300  
   8      1291958272      1445343231   73.1 GiB    8300 

2 = efi (fat32)
4 = Windows (ntfs)
6 = swap
7 = /
8 = /home

EFI partition is mounted in /boot/efi

[root@ToshCM christian]# grep efi /etc/fstab
UUID=7CD3-EE8E      	/boot/efi 	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro	0 2

For now I have a grub that works perfectly without Windows

Now I try to follow this page

[root@ToshCM christian]# grub-probe --target=fs_uuid /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
7CD3-EE8E
[root@ToshCM christian]# grub-probe --target=hints_string /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
--hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2

I put the result in /etc//grub.d/40_custom

[root@ToshCM christian]# cat /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Microsoft Windows Vista/7/8 x86_64 UEFI-GPT" {
  insmod part_gpt
  insmod fat
  insmod search_fs_uuid
  insmod chain
  search --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 7CD3-EE8E
  chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

I regenerates grub.cfg

grub-mkconfig -o /boot/grub/grub.cfg

I check the result in /boot/grub/grub.cfg

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Microsoft Windows Vista/7/8 x86_64 UEFI-GPT" {
  insmod part_gpt
  insmod fat
  insmod search_fs_uuid
  insmod chain
  search --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 7CD3-EE8E
  chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/40_custom ###

After reboot I can see a fine line with Windows but it has no effect, neither start nor error message

The computer is a Toshiba Satellite C855-1TM
In the BIOS Advanced page "Boot Mode" is [UEFI Boot]
In the Security page "Secure Boot" is [Disabled]

Thanks in advance

Offline

#2 2013-09-27 16:29:22

silverhammermba
Wiki Maintainer
Registered: 2011-04-14
Posts: 156

Re: dual boot Arch / Windows 8 with grub, uefi and gpt

Can you boot into Win 8 using EFI shell? If that works then there must be something wrong with your GRUB conf.

Offline

#3 2013-09-27 17:32:15

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

Re: dual boot Arch / Windows 8 with grub, uefi and gpt

@vintherine: I don't see anything wrong with your grub.cfg . Seems like bootmgfw.efi is loaded but for some reason the system gets struck after that,

Offline

#4 2013-09-27 17:52:50

vintherine
Member
Registered: 2013-09-27
Posts: 5

Re: dual boot Arch / Windows 8 with grub, uefi and gpt

ok, I've something new

in fact during installation I've installed grub like this :

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck

but it did not work. Humm... tried again, many times, and finaly a boot

but looking my history I've seen a "mistake" with the last try : I've forgotten the "/efi"

grub-install --target=x86_64-efi --efi-directory=/boot/ --bootloader-id=arch_grub --recheck

but paradoxaly it did the trick

well, I decided to do the thinks properly, umounted /boot/efi, cleaned the directory, mounted it again then

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck
grub-mkconfig -o /boot/efi/EFI/arch_grub/grub.cfg

and rebbot. But all what I get is a grub> invite

I'm lost !

by the way... I don't now how to use EFI shell. Is it the grub invite ?

Last edited by vintherine (2013-09-27 17:55:53)

Offline

#5 2013-09-27 18:00:44

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

Re: dual boot Arch / Windows 8 with grub, uefi and gpt

@vintherine: Everything you mentioned in the 1st post is correct. In your case the correct commands should be:

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck
grub-mkconfig -o /boot/grub/grub.cfg

because the above grub-install command is equivalent to

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --boot-directory=/boot --recheck

where "--boot-directory=/boot" is implied (unless overridden, of course). Grub always searches for <boot-directory>/grub/grub.cfg , independent of the efisys part.

EDIT: Are you able to boot Windows independent of GRUB, ie. directly from the firmware boot menu?

EDIT: Can you try (note the extra line : "set gfxpayload=keep")

menuentry "Microsoft Windows Vista/7/8 x86_64 UEFI-GPT" {
  set gfxpayload="keep"
  insmod part_gpt
  insmod fat
  insmod search_fs_uuid
  insmod chain
  search --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2 7CD3-EE8E
  chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

Last edited by the.ridikulus.rat (2013-09-27 18:05:31)

Offline

#6 2013-09-27 18:23:50

vintherine
Member
Registered: 2013-09-27
Posts: 5

Re: dual boot Arch / Windows 8 with grub, uefi and gpt

the.ridikulus.rat wrote:

@vintherine: Everything you mentioned in the 1st post is correct. In your case the correct commands should be:

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck
grub-mkconfig -o /boot/grub/grub.cfg

Thanks. I've tried that, get now a single line with Windows, which does not work

EDIT: Are you able to boot Windows independent of GRUB, ie. directly from the firmware boot menu?

I've tried F12 key, found a menu, started on the HD, found a new menu corresponding with the EFI directories (arch_grub, Microsoft....). Microsoft entry sent me on... grub menu

EDIT: Can you try (note the extra line : "set gfxpayload=keep")

It's time for diner (i'm in France). I'll see this in the next hour.

Many thanks

Offline

#7 2013-09-27 18:25:30

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

Re: dual boot Arch / Windows 8 with grub, uefi and gpt

vintherine wrote:
the.ridikulus.rat wrote:

@vintherine: Everything you mentioned in the 1st post is correct. In your case the correct commands should be:

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck
grub-mkconfig -o /boot/grub/grub.cfg

Thanks. I've tried that, get now a single line with Windows, which does not work

EDIT: Are you able to boot Windows independent of GRUB, ie. directly from the firmware boot menu?

I've tried F12 key, found a menu, started on the HD, found a new menu corresponding with the EFI directories (arch_grub, Microsoft....). Microsoft entry sent me on... grub menu

EDIT: Can you try (note the extra line : "set gfxpayload=keep")

It's time for diner (i'm in France). I'll see this in the next hour.

Many thanks

Seems like the actual Windows bootmgfw.efi was overwritten by grubx64.efi or something else. In the boot menu Windows's entry (created by Windows installer) is usually titled "Windows Boot Manager".

EDIT:
Try this. Copy the files from Windows's C:\Windows\Boot\EFI to <EFISYS>/EFI/Microsoft/Boot/ . Overwrite any exisitng files, and make sure <EFISYS>/EFI/Microsoft/Boot/BCD file exists. That is the Windows equivalent of grub.cfg (although BCD cannot be read easily since it is not a text file). Try your menuentry again.

Last edited by the.ridikulus.rat (2013-09-27 18:29:09)

Offline

#8 2013-09-27 18:55:09

vintherine
Member
Registered: 2013-09-27
Posts: 5

Re: dual boot Arch / Windows 8 with grub, uefi and gpt

Seems like the actual Windows bootmgfw.efi was overwritten by grubx64.efi or something else. In the boot menu Windows's entry (created by Windows installer) is usually titled "Windows Boot Manager".

nop ! ls -al tells me "jan 30"

EDIT:
Try this. Copy the files from Windows's C:\Windows\Boot\EFI to <EFISYS>/EFI/Microsoft/Boot/ . Overwrite any exisitng files, and make sure <EFISYS>/EFI/Microsoft/Boot/BCD file exists. That is the Windows equivalent of grub.cfg (although BCD cannot be read easily since it is not a text file). Try your menuentry again.

Windows is hibernated, refused to mount. Failed to mount /dev/sda4

Offline

#9 2013-09-27 19:01:28

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

Re: dual boot Arch / Windows 8 with grub, uefi and gpt

vintherine wrote:

Windows is hibernated, refused to mount. Failed to mount /dev/sda4

There is your answer. Most likely Windows is failing to resume from Hibernation. That is why you are not getting any output from the menuentry. Unfortunately this looks like a Windows, not related to GRUB. Try booting Windows directly from the firmware or UEFI Shell. It may help.

Offline

#10 2013-09-27 20:47:32

vintherine
Member
Registered: 2013-09-27
Posts: 5

Re: dual boot Arch / Windows 8 with grub, uefi and gpt

EDIT:
Try this. Copy the files from Windows's C:\Windows\Boot\EFI to <EFISYS>/EFI/Microsoft/Boot/ . Overwrite any exisitng files, and make sure <EFISYS>/EFI/Microsoft/Boot/BCD file exists. That is the Windows equivalent of grub.cfg (although BCD cannot be read easily since it is not a text file). Try your menuentry again.

OK. I've finaly mounted Windows partition with read only option and done the copy. It works. Thats mean that I have actualy one line (and only one) on my grub menu, with Windows entry, and I can start W8. Thanks for that.

Now can I take advantage of your kindness to advise me for the continuation? Will I come back to commands that have previously failed?

Offline

#11 2013-09-27 23:07:23

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: dual boot Arch / Windows 8 with grub, uefi and gpt

the.ridikulus.rat wrote:

Most likely Windows is failing to resume from Hibernation.

Note that Windows 8 has a "fast startup" feature that turns system shutdown operations into suspend-from-disk operations. This is very bad news for dual-booters, since partitions are not properly unmounted when Windows "shuts down." The result is filesystem corruption. It's therefore imperative that you disable this feature, as described here (among other places):

http://www.eightforums.com/tutorials/63 … s-8-a.html

Offline

#12 2013-09-28 07:36:58

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

Re: dual boot Arch / Windows 8 with grub, uefi and gpt

vintherine wrote:

EDIT:
Try this. Copy the files from Windows's C:\Windows\Boot\EFI to <EFISYS>/EFI/Microsoft/Boot/ . Overwrite any exisitng files, and make sure <EFISYS>/EFI/Microsoft/Boot/BCD file exists. That is the Windows equivalent of grub.cfg (although BCD cannot be read easily since it is not a text file). Try your menuentry again.

OK. I've finaly mounted Windows partition with read only option and done the copy. It works. Thats mean that I have actualy one line (and only one) on my grub menu, with Windows entry, and I can start W8. Thanks for that.

Now can I take advantage of your kindness to advise me for the continuation? Will I come back to commands that have previously failed?

Everything you mentioned in your 1st post https://bbs.archlinux.org/viewtopic.php … 3#p1330143 is correct. But I do not understand what you mean by continuation. If you suspect there are more issues in grub.cfg, but the full set of commands you used to install grub and generate grub.cfg and also /boot/grub/grub.cfg file. I suggest reinstalling grub once and regenerating grub.cfg again to check whether that fixes the issue.

Offline

Board footer

Powered by FluxBB