Accidently installed grub to usb
Solution 1
From your booted Ubuntu system, open a terminal, then use the following commands :
sudo grub-install /dev/sdX
sudo update-grub
Replacing sdX
with the actual drive, which will probably be sda
, but use disk utility to double check if you are unsure.
Solution 2
You can wipe your USB stick by Format. Plug it into your Windows machine, go to My Computer, and then right click your USB stick and select "Format".
If you don't like formatting, you can try deleting the partition on the USB with GParted and recreate the partition. But remember to backup.
To reinstall GRUB:
Make a new Ubuntu Live CD and Boot from it.
Install
boot-repair
using these commands:sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair
Click "Recommended repair". This will reinstall GRUB in the MBR of the adequate disk(s). Then reboot.
Related videos on Youtube
Comments
-
Detnuomnu over 1 year
While doing a fresh ubuntu install (dual boot with XP using resize), I somehow managed to install grub to the source usb instead of to the harddrive. Normal harddrive boot goes straight to XP. Booting from USB leads me to grub. From there i can boot into ubuntu. Pretty cool actually, but not what I had in mind.
How do I install Grub to HD?
How do I recover my USB?
-
Web-E almost 12 yearsfor GUI based approch see this askubuntu.com/q/129254/35775
-
Detnuomnu almost 12 yearswas unable to mount usb when grub from stick was used. after grub restored on hd it was possible to access my data again. plugging into another computer the live ubuntu on stick also usable... accepting answer
-
-
Detnuomnu almost 12 yearsThis got me booting normally again. Ideas on the USB stick?