You are not logged in.

#1 2020-08-09 11:24:43

codescriber
Member
Registered: 2017-09-14
Posts: 6

grub starts shell instead of the menu.

Hi.
Made a fresh install of arch on my desktop PC (will be headless, no monitor serves as a server)
all went pretty well up until the reboot.

I installed Arch as EFI installation with a GPT disk, yes the BIOS supports it and boots the installation media and the new installation (and the one before it, before my disk died..).
the partition layout is:
1. EFI (300MB)
2. sawp (16G)
3. root filesystem (around 80GB)

when i pacstraped the root was mounted on /mnt and EFI was mounted as /mnt/boot.

I installed grub according to the wiki ,after arch_chroot:

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB_ARCH

and indeed a new entry was created in the EFI, verified with

efibootmgr -v

. deleted the rest of the entries BTW just in case.

after that i created the grub.cfg:

grub-mkconfig -o /boot/grub/grub.cfg

The installation above was without any error.
BUT after restart i get a GRUB shell... i thought maybe the grub installation was defective but when , in the shell, i entered:

configfile (hd2,gpt1)/grub/grub.cfg

i get the grub menu strait away! no error no nothing and i can boot right into my arch! but since this is to be a server i can't do that all the time, AND i have no explanation as for why grub can't load it's menu.
I tried copying the grub.cfg to /boot as well, but it did not help. fat32 do not have permissions so that's not the issue.
seems like grub doesn't find that grub.conf file otherwise i can't explain why it doesn't start the menu screen.

Yes after i booted into my arch i tried reinstalling grub with the same commands above only this time it's not chroot. so --efi-directory is still /boot and /dev/sdd1 is still mounted as /boot while sdd3 is still mounted as /
Any ideas ???

Offline

#2 2020-08-09 20:20:10

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,277
Website

Re: grub starts shell instead of the menu.

Did you install a kernel?


Para todos todo, para nosotros nada

Offline

#3 2020-08-09 20:47:39

codescriber
Member
Registered: 2017-09-14
Posts: 6

Re: grub starts shell instead of the menu.

Head_on_a_Stick wrote:

Did you install a kernel?

Yes i did, installed along with pacstrap. there is a kernel image in the /boot partition.
again if i use:

grub > configfile (hd2,gpt1)/grub/grub.cfg 

i get the grub menu with the current arch kernel and CAN boot to my system, but i don't get the menu, with 3 seconds timeout, i get a grub shell.

Offline

#4 2020-08-09 21:07:46

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,277
Website

Re: grub starts shell instead of the menu.

Use the set command from the 'grub>' prompt to see where it is looking for the configuration file.

EDIT: removed superfluous suggestion.

Last edited by Head_on_a_Stick (2020-08-09 21:10:42)


Para todos todo, para nosotros nada

Offline

#5 2020-08-10 10:54:20

codescriber
Member
Registered: 2017-09-14
Posts: 6

Re: grub starts shell instead of the menu.

ok, didn't know set and it's nice, now for the weird part....
All the variable are ok.
root points to the right place and s does prefix!
so if i enter:

 grub > configfile $prefix/grub.cfg 

i get the grub boot menu :-\ the only things comes to mind is that maybe for some reason the grubx64.efi fails to start grub with the menu, even though

 strings /boot/EFI/GRUB_ARCH/grubx64.efi 

will show i think in the last line (, gpt1) which is the right place for root. at least partition wise. if a whole embedded script should be there with search (for root) and loadconfig, there isn't any.
should there be ?

Offline

#6 2020-08-11 08:11:16

codescriber
Member
Registered: 2017-09-14
Posts: 6

Re: grub starts shell instead of the menu.

my bad apparently, since in arch we NAME the config i named it grub.conf instead of grub.cfg, since the name of the config file is hardcoded into the grubx64.efi  if i loaded the file manually it worked, because it's accessible and written right, but if the grub is looking for grub.cfg, of course it will fail to find it... stupid bug.

thanks for the effort :-)

Offline

Board footer

Powered by FluxBB