Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Grub-install error (please, specify --target...
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
enrico68
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2016
Posts: 130

PostPosted: Fri Feb 03, 2017 3:51 pm    Post subject: [Solved] Grub-install error (please, specify --target... Reply with quote

Hello,

My present sdd is partitioned like so:

sdd1 fat32 /boot
ssd2 ext4 /

but when I run the command

Code:
grub-install --target=X86 64-efi --efi-directory=boot


it gives me an error (modinfo.sh does not exist; please specify --target or --directory).

I have run before:

Code:
echo 'GRUB_PLATFORMS="Efi-64"' >> /etc/portage/make.conf


I did the same procedure on another PC a few days ago, and it worked...where is the error?? The only difference between this setup and the one before is that this time I did not create a BIOS boot partition. Could it be the culprit? Is the BIOS boot partition always necessary?


Last edited by enrico68 on Sat Feb 04, 2017 7:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7132
Location: Saint Amant, Acadiana

PostPosted: Fri Feb 03, 2017 4:32 pm    Post subject: Reply with quote

I do not use Grub2, but to my knowledge the so called BIOS partition is required for Grub2.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
enrico68
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2016
Posts: 130

PostPosted: Fri Feb 03, 2017 5:19 pm    Post subject: Reply with quote

I thought so, thanks!
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7132
Location: Saint Amant, Acadiana

PostPosted: Fri Feb 03, 2017 5:52 pm    Post subject: Reply with quote

There are other bootloaders you could use that do not require this partition.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


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

PostPosted: Sat Feb 04, 2017 10:06 am    Post subject: Reply with quote

It looks like you're trying to install on an EFI machine.

EFI machines will require an EFI System Partition (ESP) which needs to be FAT16 or FAT32, and is not a grub2 requirement (I've installed grub2 directly to an ext3 root partition - but this machine is a legacy MBR boot machine.)

Though I've not actually yet "officially" installed grub2 to an EFI machine, I've gotten an EFI machine to boot grub2 - and it only had two partitions, the ESP and Linux/Gentoo root partition. The basics is to get Portage to build grub2 as an EFI binary (grub.efi) and install it on your FAT16/FAT32 ESP. Then it will use the efibootmgr tool to ensure that grub2 is loaded as your boot EFI application. The only EFI machine that I've used I cheated and swiped the grub2.efi binary and moved it to the ESP default boot path, which for my x86 efi machine, \EFI\BOOT\BOOTIA32.efi .
_________________
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
fcl
n00b
n00b


Joined: 31 Dec 2016
Posts: 72

PostPosted: Sat Feb 04, 2017 11:24 am    Post subject: Reply with quote

OP, fyi I think you're missing a slash there in the grub-install command

grub-install --target=X86 64-efi --efi-directory=/boot
Back to top
View user's profile Send private message
enrico68
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2016
Posts: 130

PostPosted: Sat Feb 04, 2017 1:12 pm    Post subject: Reply with quote

This time I created a BIOS boot partition, but the error remains. here is my partition, using parted:

sdd1 2MB fat32 grub
sdd2 134MB fat32 boot
ssd3 1000MB swap none
sdd4 50GB ext4 rootfs
sdd5 185GB ext4 home

To partition the ssd, I followed the official Gentoo Handbook.

I never had this problem before, and now it is the second time in a row...just in case, I checked ssd2, and it is mounted on /mnt/gentoo/boot.

What is wrong with my setup?

EDIT: as it is shown above, the BIOS boot partition has a fat32 fs. What happens is I do "mkfs.fat -F 32 /dev/sdd2" (the boot partition) but, somehow, after I hit enter, also the ssd1 partition shows up as formatted in fat32. I tried that twice, but fat32 shows up on ssd1, no matter what. Maybe that is why I get my error message...

EDIT2: I believe the error lies with the boot partition not being ESP, the Handbook says: "On an UEFI installation, the boot and esp flags will show up on the boot partition". I do not see ESP, only boot, and I have to investigate why my system won't run in EFI mode..that is where the issues is...
Back to top
View user's profile Send private message
enrico68
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2016
Posts: 130

PostPosted: Sat Feb 04, 2017 4:02 pm    Post subject: Reply with quote

not a chance...the boot partition has a "boot,esp" flag this time, but I keep getting the same error message...I don't know what else to do....
Back to top
View user's profile Send private message
enrico68
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2016
Posts: 130

PostPosted: Sat Feb 04, 2017 7:06 pm    Post subject: Reply with quote

The above issue has been solved, it took me a while, but I was able to solve it! :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