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.
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
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
Hope this helps you. Thank you.!