19

I installed Linux Mint on my laptop along with a pre-installed Windows 10. When I turn on the computer, the normal GRUB menu appears most of the time:

GRUB menu

But after booting either Linux or Windows then rebooting, I GRUB starts in command line mode, as seen in the following screenshot:

GRUB command line

There is probably a command that I can type to boot from that prompt, but I don't know it. What works is to reboot using Ctrl+Alt+Del, then pressing F12 repeatedly until the normal GRUB menu appears. Using this technique, it always loads the menu. Rebooting without pressing F12 always reboots in command line mode.

I think that the BIOS has EFI enabled, and I installed the GRUB bootloader in /dev/sda.

Why is this happening and how can I ensure that GRUB always loads the menu?

Edit

As suggested in the comments, I tried purging the grub-efi package and reinstalling it. This did not fix the problem, but now when it starts in command prompt mode, GRUB shows the following message:

error: no such device: 6fxxxxx-xxxx-xxxx-xxxx-xxxxxee.
Entering rescue mode...
grub rescue>

enter image description here

I checked with the blkid command and that is the identifier of my linux partition. Maybe this additional bit of information can help figure out what is going on?

  • IMHO Windows 10 has an update that sabotages (albeit possibly through incompetence) this kind of setup. You will need to get into your Linux, through the sequence of commands you mentioned or a live CD and fix the grub-efi package. Try purging and reinstalling grub-efi. – datUser Dec 12 '16 at 22:12
  • What is the output of cat /etc/default/grub? – Shashank Vyas Dec 17 '16 at 10:53

10 Answers 10

21

The boot process can't find the root partition (the part of the disk, that contains the information for starting up the system), so you have to specify its location yourself.

I think you have to look at something like this article: how-rescue-non-booting-grub-2-linux

short: in this grub rescue> command line type

ls

... to list all available devices, then you have to go through each, type something like (depends what is shown by the ls command):

ls (hd0,1)/
ls (hd0,2)/ 

... and so on, until you find

(hd0,1)/boot/grub   OR (hd0,1)/grub

In case of efi

(hd0,1)/efi/boot/grub OR (hd0,1)/efi/grub

... now set the boot parameters accordingly, just type this with the correct numbers and after each line press return

set prefix=(hd0,1)/grub
set root=(hd0,1)
insmod linux
insmod normal
normal

now it should boot and after starting a commandline and entering

sudo update-grub

... it should boot next time If not, you have to go through the steps again an might have to repair or install grub again (look at this article: https://help.ubuntu.com/community/Boot-Repair)
hope I understood your question right and this is what you are looking for

  • 1
    I will try this, but this answer does not explain why sometimes grub is able to find the partition, but if I press F12 before it loads, it is then able to find the partition. – Antoine Aubry Dec 17 '16 at 18:45
  • Maybe a bios update/upgrade, do you find something on the ASUS site? Or is it something with uefi/legacy boot (bios configuration) - I don't know, does something have to be tweaked in GRUB for working with uefi? – eli Dec 18 '16 at 15:59
  • This did not work for me. ls gives: (hd0) (hd0,gpt2) (hd0,gpt1) etc. then I tried, ls (hdo), ls (hdo)/ and got error: no server is specified. I tried: ls (hdo,gpt2)/ and got error: disk hdo,gpt2' not found`. – user2205916 Jul 10 '18 at 17:24
  • @user2205916 ls gave you (hd0) ... this is a 'zero' as in '01234', and you wrote you tried ld (hdo)/ with an 'o' as in '..LMNOPQRS..' - you have to use the number 0 "zero" – eli Jul 11 '18 at 8:01
4

This is some funny thing happening to many PC dual booting with Windows 10. Happened to me and friends recently. Please note that I don't know why, I can only speculate this depends on some Windows 10 updates. As someone said, indeed this is due to the boot process not finding the root partition for some reason, so GRUB asks you to tell him where it is via CLI.

this is what I got

Anyway thanks for asking this question, I found it trying to fix my problem and I created this account just to answer this. The fix is super easy :

  • go to BIOS/UEFI
  • check the boot partitions: are there ok or too many? do you recognize all of them? Remove the ones that are not needed.
  • reset the boot order to default
  • restart, you should see the usual GRUB menu
  • This was exactly my case when installing Manjaro. After rebooting it would always go to the grub shell, which was a hassle. The problem was that in the UEFI boot options, the order for the hard rive was: 1. Live CD (not connected anymore). 2. Windows Boot Manager (the one that actually went to the grub shell). 3. Manjaro (which is actually Manjaro's grub). After putting Manjaro first in the UEFI boot order, the computer starts up and goes to grub as it's supposed to. – Arkenan Feb 9 at 18:16
  • Changing the boot order worked for me: I had Windows 10 installed on Dell laptop, then installed Ubuntu 16.04 on an external SSD hard drive but somehow managed to end up with grub coming up on boot. I changed the boot order to Windows first and now it boots straight to Windows - I'm happy to F12 to boot to Ubuntu for now. – WillC Jul 11 at 0:03
2

Your Windows may be installed in UEFI boot mode and Mint in BIOS boot mode. The two modes are not compatible and you can only dual boot from UEFI/BIOS menu and may have to turn on or off UEFI or BIOS boot settings. Grub can only dual boot other installs in same boot mode as you booted grub. You can use Boot-Repair to convert a BIOS.

2

You can boot your linux system through Super Grub2 disk, Download the iso from here and create a bootable USB

After successfully booting kali linux , reinstall grub-efi as follows :

grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=debian --recheck --debug /dev/sda
update-grub
1

Reinstall Linux on same partition, take care of foll. things this time:

  1. Start Live and then install
  2. Once installation is over, DO NOT Reboot
  3. Close the dialog box, and open Terminal Ctrl + Alt + T
  4. Type following command- sudo update-grub

Check for Line *"Found Windows Boot Manager ..."*

  1. Reboot if successfully done
1

I ran into the same issue. And I found that sometimes when booting in windows 10 the boot order is changed. I have two SSDs in my laptop. One has ubuntu and grub and the other has windows installed. The boot order is sometimes changed when windows 10 updates and puts the windows SSD first, causing the system to always boot into windows. Recently it randomly changed it and I started seeing the system boot into the grub prompt. Once I changed the boot order in BIOS, the grub menu loaded normally.

0

The same issue occurred on my dell laptop with windows 10 and Linux mint 19. So what happened was I was working windows and suddenly the hdd was missing from the disk list. Window was working fine since it was on ssd drive. After being confused for a while I wanted to make sure if the hdd was functioning so I run a diagnostic from the bios after it was done I restarted the machine and got my grub listing back.

0

I suddenly found that after some updates Windows has set the Fast boot option to enabled. And that caused my ubuntu boot problem)) Fast boot option can be found somewhere in your BIOS/boot settings

-1

I hope this helps to give you a better understanding of how to look. I made this very simple for you and other linux beginners. Please just pay it forward with kindness. These people are brilliant here, but they need to remember they were once beginners

Take notice to how y our system boots. As well all know this could be a different issue that others maybe discover. So some history, I go thru linux distros like i do socks. I wear a lot of different socks btw. I have a.full installation, no dual boot, that's the mppont of thisn lat top. But heres the kicker. I normally have no issues saving my data (home/user), but this time grub said it wouldn't install. I lost may data, and learned I am.capable of profanity I never knew I had... anyways Gurb acted like it wasnt installing, but it did. Then... someone dropped my laptop during an update....inirsmfs restored what I need it too, but here what followed

Power button-> Grub 2.02:

If you first boot and you get a red menu in regards to secure booting blah blah.. its vague. But it let's you click "okay" (vague as in the windows has a 3 -word title, and before clicking okay I think there may be 6 words (Haha complain if I'm wrong on the count, sorry). Bottom line,.you boot into grub.

My case, check gurn to verify You can enter cmpath=hd0 (in my case). Then prefix=(hd0,.gpt2)... Ending in insmod normal Normal

And.booted

So I though about it and checked out my boot/efi/EFI directory ls.-al

d. parrot d. Ubuntu

I rebooted to see what the damn BIOS SAID AND LOW AND BEHOLD:

(hd0,gpt2)boot/grub parrot... ubuntu as boot priotiy

So I tried this....

Went into bios, and now demonize me or not I'm actually helping. Indont claim to be an expert but I along with everyone deserves respect not ignorance and comments from people who couldn't resolve this. Issues happen due to EFI-NOW this isnspeculative. Please fee free to comment on that statement.

Fom Grub type exit -> enter BIOs Go to boot. NOTICE THE BOOT OPETIONS : -PARROT -youll likely see hd0, gpt2)/grub/boot Urgh in my case insane ubuntu, so you can mock me for that Haha Go to boot disable quiet boot if disabled, no problem

Now disable secure boot if applicable and if applicants select custome

If you can find it well it's the end of the WORLD!!!

Haha but seriously check out your boot priority... you'll likely see Parrot Hd0,gpt2 Haha and I saw Ubuntu.

Now disable the obvious---> FOR ME UBUNTU

SAVE AND RESTART... THEN JUST BE HAPPY

PAY IT FORWARD WITH KINDNESS. THESE GINUSES SOMETIMES FORGET THAT PEOPLE DONT DESERVE TO BE DOWN RIGHT BULLIES TO.

FYI: my name isnt what is says. Its Eric Supple

-1

After installing Linux Mint 19.1 the system would only boot to the grub rescue> prompt and displayed an error just above it indicating it could not find hd0. Thanks to this thread I accessed the BIOS and under "Storage/Storage Options" I changed the SATA emulation from AHCI RAID to Native Mode IDE and now the system boots up to the proper menu which allows me to choose my Linux Distribution and continue booting successfully.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.