Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
configuring grub [SOLVED]
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
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1741

PostPosted: Thu Jan 03, 2019 1:49 am    Post subject: configuring grub [SOLVED] Reply with quote

First time installing with gpt (still using bios, though :) ).

I quote from https://wiki.gentoo.org/wiki/GRUB2

Quote:
When using a BIOS-based system, set GRUB_PLATFORMS variable to pc to avoid unneeded dependencies.


That does not work.

Code:

# grub-install /dev/sda
grub-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.


# ls /usr/lib/grub/
i386-pc/


Partition table begins (sda2 is boot and sda4 is /):

Code:

Device         Start       End   Sectors   Size Type
/dev/sda1       2048      8191      6144     3M BIOS boot
/dev/sda2       8192    131071    122880    60M Linux filesystem
/dev/sda3     131072   8388607   8257536     4G Linux swap
/dev/sda4    8388608  41943039  33554432    16G Linux filesystem


Is the directive on the wiki page incorrect, or am I doing something wrong?


Last edited by curmudgeon on Fri Jan 04, 2019 6:18 am; edited 1 time in total
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1591

PostPosted: Thu Jan 03, 2019 7:56 am    Post subject: Reply with quote

Code:
  grub-install --grub-setup=/bin/true /dev/sda


Control of the installation.--> "020" is expected,
Code:
 hexdump -v -s 0x80 -n  2 -e '2/1 "%x" "\n"'  /dev/sda


if not
Code:
 grub-install --recheck /dev/sda

_________________
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1741

PostPosted: Thu Jan 03, 2019 8:42 am    Post subject: Reply with quote

Quote:

Code:
grub-install --grub-setup=/bin/true /dev/sda



Code:

# grub-install --grub-setup=/bin/true /dev/sda
grub-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.


Quote:

Code:
 hexdump -v -s 0x80 -n  2 -e '2/1 "%x" "\n"'  /dev/sda



Code:

# hexdump -v -s 0x80 -n  2 -e '2/1 "%x" "\n"' /dev/sda
00


Quote:

Code:
 grub-install --recheck /dev/sda



Code:

# grub-install --recheck /dev/sda
grub-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1591

PostPosted: Thu Jan 03, 2019 8:54 am    Post subject: Reply with quote

curmudgeon,
that seems strange to me.

Can you please post the result of:
Code:
 emerge grub -pv

_________________
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1741

PostPosted: Thu Jan 03, 2019 10:57 pm    Post subject: Reply with quote

Marlo wrote:

Can you please post the result of:
Code:
 emerge grub -pv



Sure.

Code:

# emerge -pv grub

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] sys-boot/grub-2.02-r1:2/2.02-r1::gentoo  USE="device-mapper nls sdl -debug -doc -efiemu -fonts -libzfs -mount -multislot -static (-test) -themes -truetype" GRUB_PLATFORMS="pc -coreboot -efi-32 -efi-64 -emu -ieee1275 -loongson -multiboot -qemu -qemu-mips -uboot -xen -xen-32" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1591

PostPosted: Fri Jan 04, 2019 12:47 am    Post subject: Reply with quote

Thanks, curmudgeon,

I have 2 additional USE enabled in my installation.
Code:

fonts           Build and install fonts for the gfxterm module
mount           Build and install the grub-mount utility


Otherwise, everything is the same.
_________________
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1741

PostPosted: Fri Jan 04, 2019 6:17 am    Post subject: Reply with quote

Marlo wrote:

I have 2 additional USE enabled in my installation.
Code:

fonts           Build and install fonts for the gfxterm module
mount           Build and install the grub-mount utility


Otherwise, everything is the same.


I knew those can't be required.

Went back to the wiki page, and saw:

Quote:

grub-install accepts a --target option to set the CPU architecture and system platform. If unspecified, grub-install will attempt to guess the correct values; on an amd64/x86 system it will use i386-pc by default.


So I tried:

Code:

# grub-install --target=i386-pc /dev/sda


And that came back:

Code:

Installing for i386-pc platform.
Installation finished. No error reported.


No guarantee that it boots, but at least it is progress.
Back to top
View user's profile Send private message
Marlo
Veteran
Veteran


Joined: 26 Jul 2003
Posts: 1591

PostPosted: Fri Jan 04, 2019 7:50 am    Post subject: Reply with quote

yes, reading is always good. :D
_________________
------------------------------------------------------------------
http://radio.garden/
Back to top
View user's profile Send private message
pamela
n00b
n00b


Joined: 30 Dec 2018
Posts: 3

PostPosted: Mon Jan 07, 2019 5:15 am    Post subject: Reply with quote

curmudgeon wrote:
Marlo wrote:

I have 2 additional USE enabled in my installation.
Code:

fonts           Build and install fonts for the gfxterm module
mount           Build and install the grub-mount utility


Otherwise, everything is the same.


I knew those can't be required.

Went back to the wiki page, and saw:

Quote:

grub-install accepts a --target option to set the CPU architecture and system platform. If unspecified, grub-install will attempt to guess the correct values; on an amd64/x86 system it will use i386-pc by default.


So I tried:

Code:

# grub-install --target=i386-pc /dev/sda


And that came back:

Code:

Installing for i386-pc platform.
Installation finished. No error reported.


No guarantee that it boots, but at least it is progress.


Surely I miss this wiki section, thanks for the post.
Back to top
View user's profile Send private message
ctylin
n00b
n00b


Joined: 31 Dec 2018
Posts: 3

PostPosted: Tue Jan 15, 2019 6:23 pm    Post subject: Reply with quote

Very helpful don't know what to do if I didn't find this post. Thanks!
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