Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
installing grub on bios mbr
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
gomeromer
n00b
n00b


Joined: 02 Apr 2021
Posts: 23

PostPosted: Sun Apr 18, 2021 10:31 am    Post subject: installing grub on bios mbr Reply with quote

I followed the handbook and partitioned my disk like this:
1-boot /boot ext4 type linux
2-swap none swap type swap/solaris
3-root / ext4 type linux

My computer uses bios= it says Lenovo BIOS setup so i assumed that its not uefi....
My disk has a dos-mbr partition table and no empty space at the beginning since the handbook said that for bios/mbr it is not needed.
I installed grub with:
emerge --ask --verbose sys-boot/grub:2

now i need to do grub install.
So i did grub-install /dev/sda and i get:
grub-install: error: cannot find EFI directory.

But the firmware setup says BIOS??????
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Apr 18, 2021 10:36 am    Post subject: Reply with quote

Hi
please check
Code:

ls /sys/firmware/efi/efivars

_________________
:)
Back to top
View user's profile Send private message
gomeromer
n00b
n00b


Joined: 02 Apr 2021
Posts: 23

PostPosted: Sun Apr 18, 2021 10:42 am    Post subject: Reply with quote

alamahant wrote:
Hi
please check
Code:

ls /sys/firmware/efi/efivars



it returns a bunch of lines with numbers
Back to top
View user's profile Send private message
alamahant
Advocate
Advocate


Joined: 23 Mar 2019
Posts: 3879

PostPosted: Sun Apr 18, 2021 10:49 am    Post subject: Reply with quote

You have uefi.
You need that is an esp partition around 200-500M of type esp formated vfat mounted on /boot/efi
Make sure to create a gpt partition table on your disk.

in
make.conf
edit
Code:

GRUB_PLATFORMS="efi-64"

Then run
Code:

emerge -1av grub
grub-install --target=x86_64-efi --efi-directory=/boot/efi

Do not throw your hard work.
Just move it temporarily on a usb stick via rsync and bring it back later.
If this feels too much then you may keep the mbr partition drive and just create an esp.
I hope it will be ok.
_________________
:)
Back to top
View user's profile Send private message
Buffoon
Veteran
Veteran


Joined: 17 Jun 2015
Posts: 1369
Location: EU or US

PostPosted: Sun Apr 18, 2021 1:12 pm    Post subject: Reply with quote

The error is probably because the box was booted in EFI mode, you can still stay with MBR boot, just boot in CSM mode and Grub should be happy.
_________________
Life is a tragedy for those who feel and a comedy for those who think.
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