I've installed my debian along a version of Windows 10. I have encrypted my debian lvm volume with luks. The grub2 boot file I installed on a USB stick. I would like to make a exact copy of the USB stick containing the grub2 in case if I loose my existing one.
Can anyone guide me how to achieve this, as I have tried numerous tutorials but I was unable to fully complete it.
Thanks
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
Create grub2 backup
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Create grub2 backup
You should list all of the methods you have already tried (along with full, verbatim error messages in the case of failure) in order to prevent duplication of effort by those who chose to assist you.fant0mask wrote:I have tried numerous tutorials but I was unable to fully complete it
I would use
Code: Select all
# cp /dev/sdX /dev/sdY ; sync
deadbang
Re: Create grub2 backup
Thank you for your reply.
I have tried to execute
After booting, I get the following error:
I have tried to:
and after I get again the error: attempt to read or write outside of partition
I have tried to execute
Code: Select all
# cp /dev/sdX /dev/sdY ; sync
Code: Select all
error: attempt to read or write outside of partition
Entering rescue mode...
grub rescue>
Code: Select all
set root=(hd0,msdos1)
set prefix=(hd0,msdos1)/boot/grub
insmod normal
- Head_on_a_Stick
- Posts: 14114
- Joined: 2014-06-01 17:46
- Location: London, England
- Has thanked: 81 times
- Been thanked: 132 times
Re: Create grub2 backup
OK, a few things:
Is your system UEFI?
How _exactly_ did you do this:
The `cp` command should do that but you could save time by using dd(1) instead.
- Did you actually type "/dev/sdX" & "/dev/sdY"? That won't work.
- Was stick Y at least as big (if not bigger) than stick X?
Is your system UEFI?
How _exactly_ did you do this:
If this is a non-UEFI system on an msdos partition table then I think you only need the first 447 bytes of the MBR on the stick to boot.The grub2 boot file I installed on a USB stick
The `cp` command should do that but you could save time by using dd(1) instead.
deadbang