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: 41

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: 7651
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: 41

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
Watchman
Watchman


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

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

Did you set a default target?
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
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: 41

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
gerul
n00b
n00b


Joined: 24 Sep 2005
Posts: 8
Location: Rzeszow Poland

PostPosted: Wed Jul 22, 2020 3:39 pm    Post subject: Reply with quote

bheinze wrote:

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


Well, today after one week of frustration, hate and screaming curses, I realized I saved my config under grub.cnf... I did it hundreds of times, since I've ommited typo due to using repeated commands (cursor keys up/down) instead of typing commands... Please have mercy...
Thank you for this topic.
_________________
GERUL
General Electronic Repair and Utility Lifeform
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