You are not logged in.

#1 2011-09-07 10:18:16

jaen
Member
Registered: 2010-12-24
Posts: 21

UEFI, GRUB2, Arch and Windows 7 - slight boot problems

Getting such a setup to more-or-less work required jumping through a lot of hoops, like grub2-efi failing to run properly unless pulled straight from repo through the AUR package or Windows BSoDing with Intel HD Graphics driver installed (my experience with my newly bought Asus U41SV shows that Linux has way better hardware support than Windows : D, maybe except ACPI not giving me any fans in /proc/acpi), but it more or less work now.

The problem is I thought GRUB2 was installed in UEFI mode, but it turns out it may not be the case.
Evidence to the contrary is:
a) Windows 7 is not recognized as a valid boot option from GRUB2 when added as a menuentry per this Ubuntu wiki:
https://help.ubuntu.com/community/UEFIB … 4_UEFI-GPT
That is it doesn't boot from it with - if I remember correctly - signature invalid error. Will check it and update the post shortly.
b) Windows 7 certainly boots in UEFI mode since, well, it boots at all (I read it wouldn't boot under BIOS+GPT config) and it has a bootloader entry in the UEFI screen while the GRUB2 does not
c) modprobe efivars goes smoothly, but efibootmgr acts as if no access to UEFI is given to it

I'm not too sure what should I do now, because I'm pretty sure I followed the procedure for installing GRUB2 with EFI support as per Arch Wiki and it doesn't seem to work anyway.
If you need to have any additional information provided to help me troubleshoot this, then fire away.

Offline

#2 2011-09-07 13:29:09

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: UEFI, GRUB2, Arch and Windows 7 - slight boot problems

jaen wrote:

The problem is I thought GRUB2 was installed in UEFI mode, but it turns out it may not be the case.

Evidence to the contrary is:
a) Windows 7 is not recognized as a valid boot option from GRUB2 when added as a menuentry per this Ubuntu wiki:
https://help.ubuntu.com/community/UEFIB … 4_UEFI-GPT
That is it doesn't boot from it with - if I remember correctly - signature invalid error. Will check it and update the post shortly.

That means you are trying to chainload Windows UEFI-GPT using grub2-bios which fails.

b) Windows 7 certainly boots in UEFI mode since, well, it boots at all (I read it wouldn't boot under BIOS+GPT config) and it has a bootloader entry in the UEFI screen while the GRUB2 does not
c) modprobe efivars goes smoothly, but efibootmgr acts as if no access to UEFI is given to it

efibootmgr command will work only if you have booted the system in UEFI mode itself, since it requires access to UEFI Variables which are available only in UEFI boot mode. There are many threads which deal with how to make efivars+efibootmgr work. Shor answer - try https://gitorious.org/tianocore_uefi_du … I_boot_USB .

One way to check whether efibootmgr can work is to check whether there are files in /sys/firmware/efi/ . If that dir is empty, then efibootmgr command will not work.


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#3 2011-09-07 16:26:47

jaen
Member
Registered: 2010-12-24
Posts: 21

Re: UEFI, GRUB2, Arch and Windows 7 - slight boot problems

If I understand it correctly, I can boot from this disk image into UEFI mode and install UEFI-enabled GRUB2 as a bootloader without having to reinstall my whole Arch sertp. Right/wrong?

Offline

#4 2011-09-07 16:47:57

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: UEFI, GRUB2, Arch and Windows 7 - slight boot problems

jaen wrote:

If I understand it correctly, I can boot from this disk image into UEFI mode and install UEFI-enabled GRUB2 as a bootloader without having to reinstall my whole Arch sertp. Right/wrong?

Yes, provided you mount the partitions at the appropriate mountpoint inside Archboot setup script.


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#5 2011-09-07 17:18:28

spoked
Member
Registered: 2011-09-03
Posts: 30

Re: UEFI, GRUB2, Arch and Windows 7 - slight boot problems

I've gone through a lot of trouble to make UEFI+GPT work, but it is possible using Archboot. For efibootmgr, you have to make sure to boot the installer with UEFI. You can insure this by setting the BIOS to boot from UEFI only. Extract the archboot iso to a fat32 partition on a usb stick and you should be good to go.

Offline

#6 2011-09-12 06:57:14

jaen
Member
Registered: 2010-12-24
Posts: 21

Re: UEFI, GRUB2, Arch and Windows 7 - slight boot problems

So I tried this on two laptops, this one and an Asus X53SV which should be hardware-wise very similar to mine and on the both of them UEFI boot hangs just after the echo for ramdisk initialization. And what is even weirder - even though the hardware should be similar - Windows 7 UEFI boot hangs on the Windows logo on the other Asus which it didn't do on mine.

I also had a realization I should have had sooner - when I entered the UEFI shell and ran the UEFI GRUB2 I installed on my laptop it displayed only the command line because how the hell should it see the grub.cfg that's in /boot and not on the UEFI partition before it well, boots? Yes, that's pretty common sense-ish, but still I didn't see it anywhere in GRUB2 UEFI install instructions that I should copy the file over, which would be nice to have been mentioned.
Anyway, that didn't help much, the local GRUB2 also froze. I didn't update it from bazaar repo since the install (that's about the date of the first post), though I'm not sure if there were any significant commits in the meantime.

How should I go about debugging the boot process now to see where it exactly hangs? How do I log the boot process? Does GRUB2 have to be compiled in some sort of debug mode?

Also I kind of started doubting if maybe that's hardware provider doing something wrong?
If even Windows 7 installer hangs on one of the PCs which booted fine on mine (UEFI GRUB2 didn't work on either), then maybe really Asus is implementing something in a non standard way that confuses the hell out of bootloaders?

Really, any help would be appreciated.

Offline

#7 2011-09-12 16:01:51

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: UEFI, GRUB2, Arch and Windows 7 - slight boot problems

jaen wrote:

Also I kind of started doubting if maybe that's hardware provider doing something wrong?
If even Windows 7 installer hangs on one of the PCs which booted fine on mine (UEFI GRUB2 didn't work on either), then maybe really Asus is implementing something in a non standard way that confuses the hell out of bootloaders?

Have you flashed your mobos with latest firmware? I think if Windows itself cannot boot in UEFI, then it should be a firmware issue, since most of the mobo manufacturers (try) make sure Windows boots properly with their firmwares.


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#8 2011-09-13 21:52:16

jaen
Member
Registered: 2010-12-24
Posts: 21

Re: UEFI, GRUB2, Arch and Windows 7 - slight boot problems

I updated UEFI firmwares on both laptops and it didn't change anything, that is on mine Windows still boots in UEFI as should an on the other laptop the installer fails to boot.
I gave up on the other laptop and installed in BIOS-mode there, but it would be really great if I could debug why GRUB EFI hangs on loading ramdisk on my laptop, since Windows boots nice here.

Please do tell me how can I enable verbose booting output in GRUB2 and/or kernel so I can see where exactly it hangs.

Offline

#9 2011-09-17 18:08:13

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: UEFI, GRUB2, Arch and Windows 7 - slight boot problems

jaen wrote:

I gave up on the other laptop and installed in BIOS-mode there, but it would be really great if I could debug why GRUB EFI hangs on loading ramdisk on my laptop, since Windows boots nice here.

https://wiki.archlinux.org/index.php/GR … ms_in_UEFI

Please do tell me how can I enable verbose booting output in GRUB2 and/or kernel so I can see where exactly it hangs.

Add

set pager=1
set debug=all

to grub.cfg .


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#10 2011-09-20 16:37:21

jaen
Member
Registered: 2010-12-24
Posts: 21

Re: UEFI, GRUB2, Arch and Windows 7 - slight boot problems

With debug output enabled it turned out that I have a similar error as this guy here:
https://bbs.archlinux.org/viewtopic.php … 64#p887664

I attach the output here:
zpqP2s.jpg

Looks like the issue has not been solved yet ; c

Offline

#11 2011-09-20 17:00:02

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: UEFI, GRUB2, Arch and Windows 7 - slight boot problems

jaen wrote:

With debug output enabled it turned out that I have a similar error as this guy here:
https://bbs.archlinux.org/viewtopic.php … 64#p887664

I attach the output here:
http://i.imgur.com/zpqP2s.jpg

Looks like the issue has not been solved yet ; c

Did you try the attached patches at http://www.mail-archive.com/grub-devel@ … 16883.html ? You should take this up in grub-devel ML so that this is corrected in upstream bzr repo.


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#12 2011-09-20 20:04:02

jaen
Member
Registered: 2010-12-24
Posts: 21

Re: UEFI, GRUB2, Arch and Windows 7 - slight boot problems

Will do both as soon as I read up on how to patch stuff and how that works with packagebuilds and how to participate in mailing lists.
Haven't done either before ; f

Offline

#13 2011-09-24 09:01:16

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: UEFI, GRUB2, Arch and Windows 7 - slight boot problems

@jaen: Can you try grub-legacy-efi-fedora https://aur.archlinux.org/packages.php?ID=47979 or elilo-git https://aur.archlinux.org/packages.php?ID=45565  instead of grub2?


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#14 2011-10-15 09:07:05

jaen
Member
Registered: 2010-12-24
Posts: 21

Re: UEFI, GRUB2, Arch and Windows 7 - slight boot problems

It took me a bit long to get around to patching this, but there is no file the patch points to. There are files called mmap.c which probably are this file renamed, but there is more than one of them.
I'll try out the grub2 experimental package and then those two you mentioned and go show up at the mailing list.

Offline

Board footer

Powered by FluxBB