Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GRUB2 boots to promt, no menu.
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
Spanik
Guru
Guru


Joined: 12 Dec 2003
Posts: 457
Location: Belgium

PostPosted: Sat Sep 17, 2016 12:39 pm    Post subject: GRUB2 boots to promt, no menu. Reply with quote

I'm installing a small Dell E4300 laptop and as usual I run into trouble with GRUB2.

Followed the handbook, same partition scheme
/dev/sda1 grub bios_boot
/dev/sda2 /boot (ext2)
/dev/sda3 swap
/dev/sda4 / (xfs)

Used GTP table and parted, I can see the boot flag is set to /dev/sda2.

No errors when installing Grub2 or when running grub-config, it found vmlinuz-4.4.6-gentoo. I can also see that this kernel is copied to /boot and that in /boot/grub/grub.conf there is a menu entry for this kernel.

When I boot it gives me just the "GRUB>" prompt, nothing more.
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sat Sep 17, 2016 1:42 pm    Post subject: Reply with quote

Quote:
/dev/sda2 /boot (ext2)


afaik only vfat is allowed when your box is an uefi box, most newer hardware are

ext2 is allowed for antique machines with legacy bios

You may read the documentation for grub2 again, like gentoo handbook, gentoo wiki, arch linux wiki and such. basically always the same instructions on how to proceed
Back to top
View user's profile Send private message
Spanik
Guru
Guru


Joined: 12 Dec 2003
Posts: 457
Location: Belgium

PostPosted: Sat Sep 17, 2016 1:47 pm    Post subject: Reply with quote

Roman_Gruber wrote:
Quote:
/dev/sda2 /boot (ext2)


afaik only vfat is allowed when your box is an uefi box, most newer hardware are

ext2 is allowed for antique machines with legacy bios


It is an antique machine with bios, no uefi, forgot to mention that.
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sat Sep 17, 2016 1:51 pm    Post subject: Reply with quote

my approach always was to install a binary distro like linux mint. i had a working linux, a working grub => should be the fastest way in my point of view. I did that on several boxes. when you do not want a backup distro installed (10gb for backup distro usually), just remove the partions and go on.

than i hacked in a full section for gentoo and never update mint again, mint will overwrite and destroy hole boot configs and files

--

I did the handbook appraoch for grub in the old days. with grub2 i always did the install a binary distro first thing

--

no idea if gpt table is allowed for older boxes. i usually used grub 1 with ordinary msdos partition talbe for e.g. t9500 cpu, turion mt32 box in the past
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sat Sep 17, 2016 5:23 pm    Post subject: Reply with quote

references:
https://wiki.gentoo.org/wiki/GRUB2
https://wiki.gentoo.org/wiki/GRUB2_Quick_Start
Quote:
eselect news read 18
2016-08-11-grub2_multislot_default
Title Grub2 multislot default setting is changing
Author William Hubbs <williamh@gentoo.org>
Author Ian Stakenvicius <axs@gentoo.org>
Posted 2016-08-11
Revision 1

The multislot use flag in sys-boot/grub-2.x is no longer enabled by
default.

When the flag is enabled, all upstream binaries and documentation are
renamed to "grub2" so as not to collide with grub-0. Now that the use
flag is no longer default-enabled, these names will revert back to
their upstream defaults. For example, grub2-mkconfig will become
grub-mkconfig, grub2-install will become grub-install, etc.

If you wish to retain the previous naming scheme, please make sure to
explicitly enable USE="multislot" on sys-boot/grub in the usual manner.

comments:
/boot/grub/grub.conf is not part of a grub2 installation. /boot/grub/grub.conf was a symlink to /boot/grub/menu.lst used in the original incarnation of grub now called grub legacy and still available here by emerging grub-static. grub-config is not the correct command to use to create /boot/grub/grub.cfg , the configuration file that grub2 uses to create the boot menu.
Either grub-static (legacy grub) or grub2 will work with a gpt labeled disc but they can not be mixed.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Spanik
Guru
Guru


Joined: 12 Dec 2003
Posts: 457
Location: Belgium

PostPosted: Sat Sep 17, 2016 5:42 pm    Post subject: Reply with quote

Sorry, but I don't get this. You refer to grub (1, legacy) but this was never installed on the system. I just followed the handbook which is Grub2 exclusively (since years IIRC). So how can it that there is a grub.conf on /boot/grub if that is not compatible with grub2? The only thing I did was install and configure grub2.

Also the grub.conf on the HD is a script (thus for grub2), not the old grub.conf menu list.

I really don't follow this.
_________________
Expert in non-working solutions
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sat Sep 17, 2016 6:02 pm    Post subject: Reply with quote

Quote:
No errors when installing Grub2 or when running grub-config, it found vmlinuz-4.4.6-gentoo. I can also see that this kernel is copied to /boot and that in /boot/grub/grub.conf


I think the guy wants to piont out, that you may use grub1 config file with grub2 installer script which may not work at all.

You may check the path variable / symlink / link on those grub scripts and than you see what binary / script is called.

My grub installation here from sysrescuecd from a year ago is not compatible with recent grub from arch-linux / sysrescue livecd and such ...

You may redo the hole bootloader stuff from the handbook and see if its gone.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


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

PostPosted: Sat Sep 17, 2016 6:05 pm    Post subject: Reply with quote

you said you have /boot/grub/grub.conf obtained by running grub-config, I am commenting that grub-config is not a grub2 command and /boot/grub/grub.conf is not a grub2 file.
boot the install media, mount the gentoo partitions, run
Code:
wgetpaste --tee -c 'ls -l /mnt/gentoo/boot/grub'
and post the url returned here.

oops! edit of /boot to /boot/grub
oops2! edit of /boot/grub to /mnt/gentoo/boot/grub
_________________
Defund the FCC.


Last edited by DONAHUE on Sat Sep 17, 2016 11:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
Spanik
Guru
Guru


Joined: 12 Dec 2003
Posts: 457
Location: Belgium

PostPosted: Sat Sep 17, 2016 8:31 pm    Post subject: Reply with quote

I never ran grub-config, I ran

Quote:
Next, install the necessary GRUB2 files to the /boot/grub/ directory via the grub-install command. Presuming the first disk (the one where the system boots from) is /dev/sda, one of the following commands will do:
When using BIOS:
root #grub-install /dev/sda
When using UEFI:
root #grub-install --target=x86_64-efi --efi-directory=/boot
 Note
Modify the efi-directory setting to the root of the vfat EFI System Partition. This is necessary if the /boot partition was not formatted as vfat.
 Important
Make sure the EFI system partition has been mounted before running grub-install. It is possible for grub-install to install the GRUB EFI file (grubx64.efi) into the wrong directory without providing indication the wrong directory was used.

Next, generate the GRUB2 configuration based on the user configuration specified in the /etc/default/grub file and /etc/grub.d scripts. In most cases, no configuration is needed by users as GRUB2 will automatically detect which kernel to boot (the highest one available in /boot/) and what the root file system is.

To generate the final GRUB2 configuration, run the grub-mkconfig command:
root #grub-mkconfig -o /boot/grub/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.16.5-gentoo
Found initrd image: /boot/initramfs-genkernel-amd64-3.16.5-gentoo
done

The output of the command must mention that at least one Linux image is found, as those are needed to boot the system. If an initramfs is used or genkernel was used to build the kernel, the correct initrd image should be detected as well. If this is not the case, go to /boot/ and check the contents using the ls command. If the files are indeed missing, go back to the kernel configuration and installation instructions.


just like it is in the Gentoo handbook right now!

Now I checked the desktop (grub2) I'm typing this on, and there I have /boot/grub/grub.cfg.
_________________
Expert in non-working solutions
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