0

I had ubuntu 18.04 together with windows 10. I wanted to reinstall ubuntu but wasn't able to boot from usb. So I formatted the drive containing ubuntu without realizing how it would affect boot record. Now I am staring at GNU GRUB screen. Is there a way to recover from this? I if I can somehow reinstall ubuntu without having to reinstall windows as well? I have looked up but every post explains how to recover from grub rescue screen. Are these two the same thing? I'm very new to ubuntu.

  • Since you formatted the space with Ubuntu then you will have to reinstall it and choose that space to install Ubuntu and grub should be again installed to the efi partition! – George Udosen Dec 24 '18 at 20:31
  • @George Udosen I was able to boot from windows and then reinstall ubuntu on same partition. Thankyou – Tehreem Fatima Dec 24 '18 at 22:08
0

You can change the boot order so that you can use windows.Type the following in your terminal

sudo gedit /etc/default/grub

Find the line GRUB_DEFAULT=0 and change to GRUB_DEFAULT=saved.

Then execute command to update grub using

sudo update-grub

to change the boot order, execute the folowing

sudo grub-set-default n (n is the windows listed in grub, count from 0,1 and so on)

as boot items are count from 0 to n, not 1 to n. If uh want to change again the grub boot loader you need to execute the

grub-set-default

Hope this helps you. Thank you.!

  • Will OP not reinstall Ubuntu after this? – George Udosen Dec 24 '18 at 20:45
  • @cloud.0009 I was able to reinstall ubuntu on same partition after booting from windows. Thank you for help – Tehreem Fatima Dec 24 '18 at 22:09

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.