Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
grub2 & efi
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
10B2
n00b
n00b


Joined: 28 May 2013
Posts: 58

PostPosted: Tue Aug 19, 2014 1:05 am    Post subject: grub2 & efi Reply with quote

I would like to dual boot windows 8 and gentoo in UEFI mode with grub2. I am using grub2-p507-r2.

The efi partition is /dev/sdb3. the gentoo boot partition is /dev/sdb7 and the gentoo system is installed in /dev/sdb9.

I installed grub2 in a fat32 usb drive and booted gentoo by the grub2 console (minimal bash-like line editing) with genkernel and initamfs.

Crated /boot/efi directory and here mounted efi partition. Thus, I find /boot/EFI folder, which contains the original 'Boot' and 'Microsoft' directories.

Then installed grub2 in the hard drive (an ssd) executing the command:

grub2-install --target=x86_64-efi --efi-directory=/boot/efi --boot-directory=/boot/efi/EFI --bootloader-id=GRUB2 --no-floppy

...no errors reported ...till now! :?
First question: the option --root-directory=/boot/efi in grub2-install would work or not? Someone in the forum wrote that gentoo does not support the option --root-directory...

Now I try to make the configuration file:

grub2-mkconfig -o /boot/efi/EFI/GRUB2/grub.cfg

grub2-probe: error: failed to get canonical path to 'PARTUUID....

the outcome of the following commands:

grub2-probe -v /root or grub2-probe -v /

is: grub2-probe: info: cannot open '/boot/grub/device.map': no such file or directory
grub2-probe: error: failed to get canonical path.....

I created a dummy /boot/grub/device.map file just adding the line (hd0) /dev/sdb

probing again, the info disappears, the error remains.

This must be a problem related to the UEFI mode! I rebooted the gentoo in legacy mode (BIOS) and grub-2-mkconfig command worked fine...
By the way, the partitions are now named /dev/sdaX and not sdbX as before.

Rebooted in UEFI mode (with usb drive, otherwise only windows 8 boots). If I remember corrrectly, the hd0 and hd1 drives can float in the console commands and sdaX are renamed to sdbX.
Once booted in UEFI mode, I would like to use the grub.cfg file generated. Upon reboot without usb drive, I always get the grub2 console (boot by command line), but not the grub2 menu. I would believe that there are two possible reasons:
1) or grub does not get the grub.cfg file (where does grub-2 look to find the .cfg file? in GRUB2, in /boot/grub or even in /boot/efi/EFI/grub? should the configuration file be called grub.cfg or grub2.cfg)
2) or there are wrong settings in the configuration file (times for the menu to show up, video modules? I cannot really tweak the settings in /etc/default/grub because grub2-mkconfig does not work in UEFI mode). I run grub2-script-check on the configuration file that I generated, and no warning is given.
3) or tertium non datur?

Any suggestion much appreciated

:? :? :? :? :? :? :? :? :?
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2576

PostPosted: Tue Aug 19, 2014 5:11 pm    Post subject: Reply with quote

Since this seems to have been sitting for a respectable amount of time, I'll offer some advice, but it isn't quite the advice you where looking for.

You might want to consider that grub2 isn't an ideal UEFI bootloader. You would almost certainly have an easier time installing and maintaining rEFInd, as described here. Using this requires absolutely no configuration to dual boot since it will detect all your OSs automatically.

Another alternative is to simply use the bios bootloader directly. How to do that is described here.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
10B2
n00b
n00b


Joined: 28 May 2013
Posts: 58

PostPosted: Tue Aug 19, 2014 5:41 pm    Post subject: Reply with quote

Thanks a lot, doctor!

But, you see, I already come from rEFInd experience (... a bad one!) and decided to switch to grub2.

I installed rEFInd both from windows8 and from gentoo side (with install.sh) and was never able to get on boot the rEFInd menu. Windows 8 starts as if I did noting (or almost, because it takes few more seconds than before). I believe that rEFInd is strongly dependent on the Windows 8 boot system. Desabled secure boot but it was enough. There might be a problem with the windows key managment, that I cannot disable from my BIOS/UEFI interface. My machine is a Sony Vaio Tap 11. At least grub 2 is more powerful for key identification, and indeed grub 2 starts, but only the console!

Someone suggested also EASYBCD from windows...would it be another headache? I would prefer insisting with grub2. Legacy grub was very smooth with this other machine. What the hell is happening with grub2? Is it so difficult to manually create its configuration file? Anyone knows a good reference for it?

Thanks

:evil: :evil: :evil: :evil: :evil:
Back to top
View user's profile Send private message
10B2
n00b
n00b


Joined: 28 May 2013
Posts: 58

PostPosted: Wed Aug 20, 2014 12:13 am    Post subject: Reply with quote

Ok, finally it went through!

In grub2 console type 'set' and look at the prefix: grub.cfg has to be there! (eventually you can set new prefix)

'insmod efi_gop' is to be written in grub.cfg if blind screen during boot.

Chainload with /efi/Microsoft/Boot/bootmgfw.efi

and that'all folks!

:D :D :D :D :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum