PDA

View Full Version : [ubuntu] Restore backup copy of Grub



carusoswi
October 7th, 2012, 02:18 PM
So, I'm running 12.04 desktop. Last weekend, I had to reinstall the system because it stopped booting - something about a broken pipe.

At any rate, the install disc must have been bad and corrupted my grub so that my dual boot machine was not accessible on boot.

I reinstalled an version 10.10 of Ubuntu and it restored a grub that allowed me to regain access. I then downloaded 12.04 again, burned a new disc, and proceeded to reinstall without incident.

After that, I wanted to change the boot order, and, in the course of following instructions on how to edit grub, was advised to back up the file, which I did.

My question is this (and please pardon the long lead-in). How might I go about restoring the back-up copy of grub if my grub file becomes corrupted again?

Since such a corruption blocks access to the computer, how would one get in to rename that file?

Just curious.

Thanks.

Caruso

ajgreeny
October 7th, 2012, 03:31 PM
I downloaded 12.04 again, burned a new disc, and proceeded to reinstall without incident.

After that, I wanted to change the boot order, and, in the course of following instructions on how to edit grub, was advised to back up the file, which I did.

My question is this (and please pardon the long lead-in). How might I go about restoring the back-up copy of grub if my grub file becomes corrupted again?

Since such a corruption blocks access to the computer, how would one get in to rename that file?

Just curious.

Thanks.

Caruso
What instructions did you follow and what was the "file" that you backed up? It is difficult to give you any further help without knowing what you have already done.

carusoswi
October 21st, 2012, 05:41 PM
What instructions did you follow and what was the "file" that you backed up? It is difficult to give you any further help without knowing what you have already done.

I do not remember which instructions I followed - these are easy to find on the forum and elsewhere on the web. I reviewed multiple sets of these instructions before doing anything.

In the past, I have edited the Grub file manually. This time, I tried a GUI - grub customizer, I think it is called. I wanted to change the boot order.

Most of the instructions caution one to back up Grub before attempting to edit it - good advice, I think.

So, I copied Grub to Grubbak before editing the Grub file.

The editing went well, so I have no problems with my machine or its dual boot setup.

I was just wondering what I would do if, for some reason, I messed up and foiled my Grub file.

If you were unable to access either operating system (Ubuntu/Win7), how might I recover without having to re-install at least Ubunut.

Just hoping to learn something in the event that I run into this problem one day.

(actually, I have run into it several times, and, generally, I just re-install from an Ubuntu Live CD).

Thanks for any advice.

Caruso