Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] GRUB2 stops at command prompt
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
bheinze
n00b
n00b


Joined: 12 Apr 2005
Posts: 34

PostPosted: Sat Aug 18, 2018 10:23 pm    Post subject: [Solved] GRUB2 stops at command prompt Reply with quote

Hi all,

I installed gentoo, compiled and installed (make install) a kernel and then ran grub-mkconfig successfully. However when I try to boot I only get to the GRUB2 command prompt.
Can anyone give me some pointers how to find out what's going wrong?

BR
Bernd


Last edited by bheinze on Sun Aug 19, 2018 9:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
oreo
n00b
n00b


Joined: 14 Aug 2018
Posts: 31

PostPosted: Sat Aug 18, 2018 11:36 pm    Post subject: Reply with quote

I'm sorry I'm not sure I understand what you mean by GRUB2 command prompt. Elaborate? What does your screen look like? Do you get a black screen? Do you see no boot options? Do you see the split-second "welcome to grub" or something like that? (Can't remember the exact message.)

Also, you say you ran grub-mkconfig, you probably also did this, but did you run grub-install?

Some system specs? EFI or BIOS? Architecture? GPT or MBR?

Post the output of either "fdisk -l /dev/sda" if you're using MBR or "gdisk -l /dev/sda" if you're using GPT from a liveCD.

-oreo
_________________
"One does not simply, install gentoo."
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sun Aug 19, 2018 1:47 pm    Post subject: Reply with quote

when grub2 has been installed and is booted but can not find or can not read grub.cfg it defaults to a command prompt.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
bheinze
n00b
n00b


Joined: 12 Apr 2005
Posts: 34

PostPosted: Sun Aug 19, 2018 3:58 pm    Post subject: Reply with quote

The screen looks like this:
https://imgur.com/a/t53j3J5

Quote:
when grub2 has been installed and is booted but can not find or can not read grub.cfg it defaults to a command prompt.


Is there any way to debug this and find out where grub is looking for the file or causing it to hiccup?
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3941
Location: Dallas area

PostPosted: Sun Aug 19, 2018 4:15 pm    Post subject: Reply with quote

Did you set a default target?
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7552
Location: Goose Creek SC

PostPosted: Sun Aug 19, 2018 5:54 pm    Post subject: Reply with quote

first step would be to boot the install media, mount the gentoo root partitions, run
Code:
ls /mnt/gentoo/boot
If the output shows something like:
ls /mnt/gentoo/boot wrote:
grub
a separate boot partition was not mounted at the time grub-mkconfig -o /boot/grub/grub.cfg was run. If you did not create a separate boot partition and do not intend to have one, having /mnt/gentoo/boot/grub reside on the root partition is correct. In that case the /mnt/gentoo/boot/ directory should also contain a copy of the kernel (and may contain system.map and config).Run
Code:
cat /mnt/gentoo/boot/grub/grub.cfg
to verify that grub.cfg exists.
If you did intend to use a separate boot partition, but it was not mounted when
Code:
grub-mkconfig -o /boot/grub/
was run:
Continue into the chroot as described in the handbook. Mount the boot partition, nominally:
Code:
mount /dev/sda2 /boot # followed by
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
emerge wgetpaste
wgetpaste -t /boot/grub/grub.cfg
mount | wgetpaste -t
ls -lR /boot | wgetpaste -t
Post the url's returned by wgetpaste here; verify there is a /boot/grub/grub.cfg and that it looks reasonable .
_________________
Defund the FCC.
Back to top
View user's profile Send private message
bheinze
n00b
n00b


Joined: 12 Apr 2005
Posts: 34

PostPosted: Sun Aug 19, 2018 9:12 pm    Post subject: Reply with quote

DONAHUE wrote:
Continue into the chroot as described in the handbook. Mount the boot partition, nominally:
Code:
mount /dev/sda2 /boot # followed by
grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg


That's where I realised my mistake: I outputted the config file to grub.conf :oops:
What's so bad about grub-legacy's grub.conf that we have to change it? :roll:

Anyway, I renamed the .conf to .cfg, and works like a charm now. Thanks for your help!

BR
Bernd
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