Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub Boot Problems.
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
Metalhead730
n00b
n00b


Joined: 05 Oct 2018
Posts: 2

PostPosted: Sun Oct 07, 2018 6:40 am    Post subject: Grub Boot Problems. Reply with quote

I was attempting to install grub2 using an MBR. After emerging grub2, and running a grub-install or grub-install /dev/sda I getting the following error

Code:
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.



My partition table is laid out:

Code:

Device     Boot   Start       End   Sectors  Size Id Type
/dev/sda1  *       2048    268287    266240  130M 83 Linux
/dev/sda3        268288   6559743   6291456    3G 82 Linux swap / So
/dev/sda4       6559744 117231407 110671664 52.8G 83 Linux


I think I made a few mistakes along the way with the part tables, and not sure how to fix it. I tried playing with gparted, and it is still not working. Any suggestions would be most helpful.
Back to top
View user's profile Send private message
Muso
l33t
l33t


Joined: 22 Oct 2002
Posts: 986
Location: The Holy city of Honolulu

PostPosted: Sun Oct 07, 2018 6:45 am    Post subject: Reply with quote

Your boot partition should be a vfat partition, not an ext* partition for efi.

Here's my fstab as an example :

Code:
/dev/sda2               /boot           vfat            noauto,noatime  0 2
/dev/sda3               none            swap            sw              0 0
/dev/sda4               /               ext4            noatime         0 1
/dev/sr0                /mnt/cdrom      auto            noauto,ro       0 0
/dev/sdc1               /storage        ext4            noatime         0 2


So you will need to change your boot partition to vfat.

Metalhead730 wrote:
I think I made a few mistakes along the way with the part tables, and not sure how to fix it. I tried playing with gparted, and it is still not working. Any suggestions would be most helpful.


Which iso are you using to install?
_________________
Time is a great teacher, but unfortunately it kills all its pupils.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7163
Location: almost Mile High in the USA

PostPosted: Sun Oct 07, 2018 7:30 am    Post subject: Reply with quote

OP: If you really wanted to use MBR, did you accidentally set GRUB_PLATFORMS to efi-64 in your /etc/portage/make.conf?

Doing so will build the EFI version, which isn't what you want. It may still have built MBR, I'm not sure, you may need to add i386-pc to that variable and rebuild grub.

If you installed more than one platform you could try adding --target=i386-pc to use MBR:
Code:
# grub-install --target=i386-pc /dev/sda

Make sure the partition /boot is on is mounted if needed, and it can be ext2 or anything grub understands. For EFI GRUB2 installs, grub needs to be installed on the ESP and thus would need to be FAT formatted as EFI does not understand EXT2fs.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Metalhead730
n00b
n00b


Joined: 05 Oct 2018
Posts: 2

PostPosted: Sun Oct 07, 2018 7:35 am    Post subject: Reply with quote

I am using the hybrid iso. I also reformatted /dev/sda1 as vfat, edited /etc/fstab. Still coming up the same errors.
I am installing this on an old MacBook, which I believe has a 32bit efi, despite having a 64bit cpu, hence wanting to go MBR.
Back to top
View user's profile Send private message
Muso
l33t
l33t


Joined: 22 Oct 2002
Posts: 986
Location: The Holy city of Honolulu

PostPosted: Sun Oct 07, 2018 7:39 am    Post subject: Reply with quote

Metalhead730 wrote:
I am using the hybrid iso. I also reformatted /dev/sda1 as vfat, edited /etc/fstab. Still coming up the same errors.
I am installing this on an old MacBook, which I believe has a 32bit efi, despite having a 64bit cpu, hence wanting to go MBR.


Then you have no need for vfat.

Read the handbook very carefully as you install. Read it twice before each step. Anything pertaining to efi can be ignored, as you are doing an MBR install.
_________________
Time is a great teacher, but unfortunately it kills all its pupils.
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