Reinstalling Grub from an USB

Here is how to reinstall your Grub if it has been wiped out by a Windows install for example. This will deal with a small Debian Live USB.

The easiest solution would be to create an Ubuntu Live USB and to follow these instructions. For small USB keys, it’s best to use a Debian netinstall, which weighs around 10M.

Create live usb

First, we need to ensure the usb has a partition with the correct format. As a superutilisateur run:

whire /dev/sdc is your USB partition (the whole device, so not /dev/sdc1 which is a partition). Then create a FAT32 partition:

Make it FAT32:

Make it bootable and write the change to disks

Finally, format it, just to be sure :

Now we need to copy an image on it. The first solution is to use a program called unetbootin and follow the instructions.

If it does not work, get the .iso and write it on the device (not the partition):

Reinstall grub

Now boot from the USB, start install and go to partitoning step. Then go the the shell with Alt-F2. Mount the partition containing your root folder, along with /dev :

Chroot into it and reinstall grub (to the correct device, which should be (hd0) but do not take my word for it):

And there you are, just reboot and everything is back to normal.