This keep happening when I install the Ubuntu as a dual boot for my laptop. I get a black that appears when booting with the following messages.

Minimal BASH-like line editing is supported.   
For the first word, TAB lists possible command completions. 
Anywhere else TAB lists possible device or file completions.  


I have to enter these commands like this:

grub> set prefix=(hd0,msdos6)/boot/grub/ 
grub> insmod normal 
grub> normal

And the GRUB menu appears. How to make my GRUB menu appear without having to type those command at my GRUB prompts?

I tried sudo grub-install and it give me this error message.

enter image description here

I tried to check if i have chosen the right disk, which come two possibilities, /dev/sda1 and /dev/sda6, but neither of these two works, and they gave the same error message.


enter image description here


enter image description here

4 Answers 4


Note: If you can't boot Ubuntu at all, use a Live USB to boot Ubuntu, select "Try before installing" and perform steps below.

After booting the hard way, open a terminal with Ctrl+Alt+T and install boot-repair:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair

Then type boot-repair and a menu will appear:

boot-repair menu.png

Select the recommended option.

If your system boots normally after recommended repair great. If not post the link to the problems reported.


On some systems this annoyance can occur:

If this happens to you, visit the link for a solution.

  • 1
    Can someone give this man a medal? May 18, 2022 at 19:27

Once booted into Ubuntu run the following command:

sudo grub-install /dev/sda

This assumes that /dev/sda is your disk that matches (hd0,msdos6) in your grub command, which it likely is. You can run a graphical program like gnome-disks or gparted to confirm it's the correct disk.

The command grub-install will detect any partitions and re-install your bootloader so it can find the bootable partitions.

  • didnt work, see my updated question.
    – gagantous
    Dec 31, 2018 at 1:02
  • You always install grub to a drive like sda, almost never to a partition like sda1 or sda6.
    – oldfred
    Jan 1, 2019 at 15:56

First step would be, after logging into Ubuntu, in Terminal type:

sudo grub-install /dev/sda

(or /dev/whatever-harddisk)

wait until installation of grub is finished, then ...

Second step would be, to update grub with:

sudo update-grub2

wait until updating of grub-config-file is finished.


Then restart of ubuntu should be no problem and you pass by into Ubuntu gdm screen or lightdm screen for desktop again.


Sometimes, it is actually due to having the installer and the OS in the same computer but in different disks and you are booting from the OS. It can not properly detect which is the OS and therefore gives you a GRUB menu. This mostly happens in Android x86. If this happens, please eject the installer disk. If it still happens even if you have ejected it or the installer disk is not present, use the other solution here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .