Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Help, Installing grub2 on GPT with UEFI
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
tava
n00b
n00b


Joined: 15 Nov 2005
Posts: 16

PostPosted: Mon Nov 16, 2015 8:46 pm    Post subject: [solved] Help, Installing grub2 on GPT with UEFI Reply with quote

I will despair with my gentoo installation, especially with GPT, UEFI and Grub2. My new motherboard supports UEFI and boots well with a Ubuntu UEFI live stick. I have followed the steps from the gentoo manual, read a lot of documents about GPT and UEFI, but I'm unable to setup GRUB2 with the correct settings. Hopefully you can help me!

Regarding my kernel configuration, I assume all required EFI parameters are enabled
Quote:

CONFIG_EFI_PARTITION=y
CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
CONFIG_EFI_VARS=y


The kernel version is 3.14.56 (I require a stable 3.x kernel). The kernel was build with the make, make modules_install and make install command.

Regarding my partition schema

Quote:
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: ATA INTEL SSDSA2CT04 (scsi)
Disk /dev/sda: 40.0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 135MB 134MB fat32 boot boot, esp
2 135MB 40.0GB 39.9GB ext4 rootfs


Quote:
/dev/sda1 /boot vfat defaults,errors=remount-ro,noatime,nodiratime 1 2
/dev/sda2 / ext4 defaults,errors=remoutn-ro,noatime,nodiratime 0 1



The partition layout is GPT, the partition type of sda1 is EF00 and the partition file system type of sda1 is FAT32 (not FAT12, not FAT16). The partition table was created with parted.

Regarding grub
I have installed grub2 with the configuration parameters GRUB_PLATFORMS="efi-64" for my 64-Bit Intel board. The grub configuration files keeps untouched. I have installed grub with the commands listed in the handbook,
Quote:
grub-install --target=x86_64-efi --efi-directory=/boot
and with
Quote:
grub-mkconfig -o /boot/grub/grub.cfg
. Grub installation was without any failures.

My folder structure regarding the boot directory:
Quote:

boot
- efi (automatically generated by grub command)
-- gentoo
---grubx64.efi


After rebooting my system, the gentoo installation is not listed within UEFI list. I'm unable to select my kernel image. Grub menu list will never be shown. System does nothing.

Do you have any ideas?


Last edited by tava on Tue Nov 17, 2015 8:35 pm; edited 2 times in total
Back to top
View user's profile Send private message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 281
Location: Canada

PostPosted: Mon Nov 16, 2015 10:35 pm    Post subject: Reply with quote

How I installed Grub2 on EFI was to first mount the EFI boot partition to /boot/efi/.
Then just running ~ # grub-mkconfig -o /boot/grub/grub.cfg
Code:
~ # mount /dev/sda2 /boot/efi/
~ # grub-install /dev/sda
~ # grub-mkconfig -o /boot/grub/grub.cfg


To make sure it worked, you can install sys-boot/efibootmgr to check EFI boot list.
Code:
~ # emerge -av sys-boot/efibootmgr
~ # efibootmgr -v
BootCurrent: 0015
Timeout: 0 seconds
BootOrder:
...
Boot0015* gentoo   HD(-,GPT,-----UUID------------------------)/File(\EFI\gentoo\grubx64.efi)
...
Back to top
View user's profile Send private message
tava
n00b
n00b


Joined: 15 Nov 2005
Posts: 16

PostPosted: Tue Nov 17, 2015 8:34 pm    Post subject: Reply with quote

Thanks for your reply. Efibootmgr was very helpful to find my fault.
Back to top
View user's profile Send private message
ShanaXXII
Apprentice
Apprentice


Joined: 29 Jun 2014
Posts: 281
Location: Canada

PostPosted: Tue Nov 17, 2015 8:54 pm    Post subject: Reply with quote

No problem ;)
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