Backup grub to a USB drive for emergency [Solved]

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Duocatti
Level 1
Level 1
Posts: 3
Joined: Wed Jan 08, 2020 6:49 pm

Backup grub to a USB drive for emergency [Solved]

Post by Duocatti »

Hello friends. is there a simple way to backup grub to a USB drive for emergency boot. a similar way to "creating windows repair disk".
I tried repairing grub from a live Mint USB but I never succeeded.

I'm running dual boot windows 10 and Linux Mint.
Last edited by Duocatti on Fri Jan 10, 2020 11:34 pm, edited 1 time in total.

User avatar
kukamuumuka
Level 16
Level 16
Posts: 6327
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Backup grub to a USB drive for emergency

Post by kukamuumuka »

If your computer is using UEFI, rEFind CD or USB can boot systems. If you use msdos disks, Super Grub 2 CD or USB can boot systems.

The mode can check via Terminal using command

Code: Select all

[ -d /sys/firmware/efi ] && echo "UEFI mode" || echo "Legacy mode"
Of course you can make boot USB yourself too.
msdos version:
1. Check the media

Code: Select all

sudo fdisk -l
2. Umount USB

Code: Select all

sudo umount /dev/sdXY ## where X=drive and Y=partition
3. Make a filesystem to the USB partition. An example /dev/sdb1 -->
sudo mkfs.ext2 /dev/sdb1 . You can use GParted also.
4. Mount USB partition -->

Code: Select all

sudo mount /dev/sdb1 /mnt
5. Install grub to USB -->

Code: Select all

sudo grub-install --boot-directory=/mnt/boot /dev/sdb
6. Copy /boot -folder to the USB partition -->

Code: Select all

sudo cp -R /boot* /mnt/
7. Umount USB

Code: Select all

sudo umount /mnt
UEFI version by pbear : Full Install to USB Drive: Four Options -> viewtopic.php?t=287353

Duocatti
Level 1
Level 1
Posts: 3
Joined: Wed Jan 08, 2020 6:49 pm

Re: Backup grub to a USB drive for emergency

Post by Duocatti »

kukamuumuka wrote:
Thu Jan 09, 2020 1:30 pm
If your computer is using UEFI, rEFind CD or USB can boot systems. If you use msdos disks, Super Grub 2 CD or USB can boot systems.

The mode can check via Terminal using command

Code: Select all

[ -d /sys/firmware/efi ] && echo "UEFI mode" || echo "Legacy mode"
Of course you can make boot USB yourself too.
msdos version:
1. Check the media

Code: Select all

sudo fdisk -l
2. Umount USB

Code: Select all

sudo umount /dev/sdXY ## where X=drive and Y=partition
3. Make a filesystem to the USB partition. An example /dev/sdb1 -->
sudo mkfs.ext2 /dev/sdb1 . You can use GParted also.
4. Mount USB partition -->

Code: Select all

sudo mount /dev/sdb1 /mnt
5. Install grub to USB -->

Code: Select all

sudo grub-install --boot-directory=/mnt/boot /dev/sdb
6. Copy /boot -folder to the USB partition -->

Code: Select all

sudo cp -R /boot* /mnt/
7. Umount USB

Code: Select all

sudo umount /mnt
UEFI version by pbear : Full Install to USB Drive: Four Options -> viewtopic.php?t=287353
Thanks for info. yes I'm running PC on UEFI.
The easiest option for me was to make a "super grub 2" USB. It has options to boot into the OS's but I couldn't find the repair grub option in it. So I presume I'm supposed to be able to repair the grub after booting into the OS? am I correct? if yes. Could you please give me some instructions on how to repair the grub please..

User avatar
kukamuumuka
Level 16
Level 16
Posts: 6327
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Backup grub to a USB drive for emergency

Post by kukamuumuka »

Duocatti wrote:
Thu Jan 09, 2020 6:20 pm
Could you please give me some instructions on how to repair the grub please..
I suppose that bootrepair is included in Mint 19 ISOs. If not, bootrepair can download from https://sourceforge.net/projects/boot-repair-cd/files/

Duocatti
Level 1
Level 1
Posts: 3
Joined: Wed Jan 08, 2020 6:49 pm

Re: Backup grub to a USB drive for emergency [Solved]

Post by Duocatti »

Thanks you to kukamuumuka for the easy and helpful guidance :D

Post Reply

Return to “Newbie Questions”