8

This keep happening when i install the Ubuntu as a dualboot for my laptop.

enter image description here

Above image that keeps appear after boot. I have to enter this command like this:

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

And the grub menu appear. How to make my ubuntu grub menu appear without have to type those command in my grub prompts .

Edit

I tried to do 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 possibility, /dev/sda1 and /dev/sda6, but neither these two works, give the same error message.

/dev/sda1/

enter image description here

/dev/sda6

enter image description here

6
+50

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 && 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.


Caveats

On some systems this annoyance can occur:

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

  • IT WORKS! THANK YOU VERY MUCH – gagantous Dec 31 '18 at 4:21
  • You're welcome. Don't forget to award the bounty... :) – WinEunuuchs2Unix Jan 1 at 2:10
  • I will wait for another answer. If there is no one aswer after the bounty near expired, i will awarded to you :). – gagantous Jan 1 at 4:46
  • 1
    @gagantous Waiting for better answers is a good idea. Indeed, it allowed me to think of ways to improve my answer, which I just did. – WinEunuuchs2Unix Jan 1 at 14:08
4

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 '18 at 1:02
  • You always install grub to a drive like sda, almost never to a partition like sda1 or sda6. – oldfred Jan 1 at 15:56
1

First step would be, after logged in - into Ubuntu in terminal type:

sudo grub-install /dev/sda (or /dev/whatever-harddisk)

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

Second step would be, to update grub with:

sudo update-grub2

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

reboot

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

  • When you perform this answer to repair grub, then boot-repair is not a must ... – dschinn1001 Jan 3 at 22:42

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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