Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems installing Grub2
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
micaldas
n00b
n00b


Joined: 12 Mar 2018
Posts: 37

PostPosted: Wed Mar 28, 2018 9:05 am    Post subject: Problems installing Grub2 Reply with quote

Hi,

I'm installing gentoo amd64, no multilib, in Virtualbox vm.
As I was trying to install gentoo with an EFI system, as I try to install (emerge --ask --update --newuse --verbose sys-boot/grub:2), I got the this error message:

grub2-install: error: /boot doesn't look like an EFI partition.

As i Looked in the internet for an answer I found this forum post with the same problem as I did (https://forums.gentoo.org/viewtopic-t-1031686-start-0.html), that suggested creating a /boot/efi folder to solve the problem. I created one, as per suggestion, but got the same results.

Then I changed my /dev/sda2 partition (my /boot partition), to a fat file system, but now I gent this error message:

EFI variables are supported in this system.

Again I looked to the internet for answers and saw a post that suggested that the efivar kernel module might not be loaded. I installed the sys-libs/efivar package, but it didn't make a difference.

If anyone could tell me what I am doing wrong that would be greatly appreciated.
[/code]
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10590
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Mar 28, 2018 11:38 am    Post subject: Reply with quote

I have not yet worked through an install on an EFI system but it looks like there needs to be kernel support for the EFI variable filesystem. Try ensuring that the following items are set in your kernel .config
  • CONFIG_EFI
  • CONFIG_EFIVAR_FS (probably as a module)
and rebuild your kernel. It's the latter item that your second research post is referring to.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
micaldas
n00b
n00b


Joined: 12 Mar 2018
Posts: 37

PostPosted: Wed Mar 28, 2018 6:26 pm    Post subject: Reply with quote

Hi John,

Thank you for answering, but I am unsure on how to proceed regarding your advice.
I went to /usr/src/linux-4.9.76-gentoo-r1/.config and saw that "CONFIG_EFI" is already enabled but "CONFIG_EFIVAR_FS" isn't.
How can I enable CONFIG_EFIVAR_FS? Should I manually configure the kernel through pciutils? And if so, where should I look to configure it? I imagine I shouldn't alter the kernel.config file as it explicitly says so inside.

Thanks for all the help
Back to top
View user's profile Send private message
skellr
l33t
l33t


Joined: 18 Jun 2005
Posts: 976
Location: The Village, Portmeirion

PostPosted: Wed Mar 28, 2018 6:56 pm    Post subject: Reply with quote

It's in the kernel config it's just in another area.
→ File systems → Pseudo filesystems → EFI Variable filesystem
Back to top
View user's profile Send private message
micaldas
n00b
n00b


Joined: 12 Mar 2018
Posts: 37

PostPosted: Wed Mar 28, 2018 7:34 pm    Post subject: Reply with quote

Thank you Skellr, I eventually found it.
I'm rebuilding now the kernel, will update when it's over.
Back to top
View user's profile Send private message
djentoo
n00b
n00b


Joined: 17 Oct 2017
Posts: 37

PostPosted: Thu Apr 05, 2018 9:54 pm    Post subject: Reply with quote

FAT is what you want for EFI. The output is telling you that the EFI stuff isn't in the boot location. From personal trial and error, I'd guess that you missed a step or followed the incorrect step for EFI. Try this:

Code:
echo 'GRUB_PLATFORMS="efi-64"' >> /etc/portage/make.conf
emerge --ask sys-boot/grub:2
emerge --ask --update --newuse --verbose sys-boot/grub:2
grub-install --target=x86_64-efi --efi-directory=/boot
grub-mkconfig -o /boot/grub/grub.cfg


To format the boot partition for EFI, try this:

Code:
mkfs.fat -F 32 /dev/sda2


Check your partition table with parted to ensure that it is vfat. Then update fstab.
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