Peppermint OS

Support => Advanced Topics => Topic started by: insomniacno1 on August 10, 2015, 07:04:13 am

Title: P5 backup and restore GRUB2?
Post by: insomniacno1 on August 10, 2015, 07:04:13 am
Hi, I would like to backup my current GRUB2 settings so I can restore them in case of problems.

Can someone help me with this?

Also I like to know how to restore it again:)

I'm going to install Android kitkat 4.4.2 on the system I'm running Peppermint 5 on, and later I like to set up GRUB2 to Boot from USB - That might screw up the GRUB2 settings so thats why I like to backup:)

Thanks in advance

JBJ
Title: Re: P5 backup and restore GRUB2?
Post by: PCNetSpec on August 11, 2015, 11:38:10 am
it's not that simple, GRUB is spread across many places (partitions/mbr/EFI partition) .. even backing up ALL of these locations wouldn't necessarily give you a working GRUB hen restored after modifying the partition table.
Title: Re: P5 backup and restore GRUB2?
Post by: insomniacno1 on August 11, 2015, 05:21:07 pm
Well the point is that sometimes, a "not friendly linux distrobution" overwrites Grub, and then all your personalization is gone.

In old Grub there were grub.cfg that contained the information and if you modified this file and ran Sudo update-Grub then it would be implemented.

Where is this stored when talking about Grub2?

Title: Re: P5 backup and restore GRUB2?
Post by: PCNetSpec on August 11, 2015, 05:31:03 pm
Grub2 also has grub.cfg (/boot/grub/grub.cfg) .. but as with grub legacy that file won't help if another distro takes control of grub as the new distro will have overwritten the master boot record with a grub stage one that now points to grub stage 2 on the new distros partition .. so the old grub.cfg is now invalid in BOTH distros.

the ONLY way round this (if you remove the new distro) is to reinstall grub from a LiveCD and point it at the old distro.

You can back up grub.cfg if you wish, but it's not going to be of much use to you.