View previous topic :: View next topic |
Author |
Message |
bheinze n00b
Joined: 12 Apr 2005 Posts: 41
|
Posted: Sat Aug 18, 2018 10:23 pm Post subject: [Solved] GRUB2 stops at command prompt |
|
|
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 |
|
|
oreo n00b
Joined: 14 Aug 2018 Posts: 31
|
Posted: Sat Aug 18, 2018 11:36 pm Post subject: |
|
|
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 |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sun Aug 19, 2018 1:47 pm Post subject: |
|
|
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 |
|
|
bheinze n00b
Joined: 12 Apr 2005 Posts: 41
|
Posted: Sun Aug 19, 2018 3:58 pm Post subject: |
|
|
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 |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Sun Aug 19, 2018 4:15 pm Post subject: |
|
|
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 |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sun Aug 19, 2018 5:54 pm Post subject: |
|
|
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 |
|
|
bheinze n00b
Joined: 12 Apr 2005 Posts: 41
|
Posted: Sun Aug 19, 2018 9:12 pm Post subject: |
|
|
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
What's so bad about grub-legacy's grub.conf that we have to change it?
Anyway, I renamed the .conf to .cfg, and works like a charm now. Thanks for your help!
BR
Bernd |
|
Back to top |
|
|
gerul n00b
Joined: 24 Sep 2005 Posts: 8 Location: Rzeszow Poland
|
Posted: Wed Jul 22, 2020 3:39 pm Post subject: |
|
|
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 |
|
|
|