Grub - how to boot a copy of Linux (full system backup) | Unix Linux Forums | UNIX for Advanced & Expert Users

  Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Grub - how to boot a copy of Linux (full system backup)

UNIX for Advanced & Expert Users


Tags
backup, boot, directory, grub, tar

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-23-2013
coolatt's Avatar
coolatt coolatt is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 21 October 2014, 5:12 AM EDT
Location: Mauritius
Posts: 93
Thanks: 13
Thanked 2 Times in 2 Posts
Debian Grub - how to boot a copy of Linux (full system backup)

Hi All,

I have successfully backup & restore (using tar) one of my Debian Lenny Servers.

On the restore server (standby machine), everytime i have to erase the disk & extract the tar backup.

I want to extract the tar on the running restore server on a directory for e.g /systembackup-01, /systembackup-02, etc.. & be able to boot one of the backup using grub.

Thanks to help me on this.

coolAtt
Sponsored Links
    #2  
Old 01-28-2013
botao's Avatar
botao botao is offline
Registered User
 
Join Date: Mar 2006
Last Activity: 9 December 2013, 8:21 AM EST
Location: brazil
Posts: 86
Thanks: 0
Thanked 3 Times in 3 Posts
Hammer & Screwdriver consider "mondo" :)

- have you heard about "mondo" ?

- it's GPL disaster recovery solution.

--> Mondo Rescue - GPL disaster recovery solution

- checki it out, and if possible, give it a try...

BTW in order for grub to boot from some partition, it must be able to find a "boot sector" (or "boot record") already there.

(in your case, you should at least use `dd' to save your boot sector, and restore it along with your 'tar' stuff..

ok ?

HTH

good luck, and success !

alexandre botao
("comets never dodge")
Sponsored Links
    #3  
Old 01-29-2013
coolatt's Avatar
coolatt coolatt is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 21 October 2014, 5:12 AM EDT
Location: Mauritius
Posts: 93
Thanks: 13
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by botao View Post
- have you heard about "mondo" ?

- it's GPL disaster recovery solution.

--> Mondo Rescue - GPL disaster recovery solution

- checki it out, and if possible, give it a try...

BTW in order for grub to boot from some partition, it must be able to find a "boot sector" (or "boot record") already there.

(in your case, you should at least use `dd' to save your boot sector, and restore it along with your 'tar' stuff..

ok ?

HTH

good luck, and success !

alexandre botao
("comets never dodge")
I think u didnt understand me.
Let me clarify.
I do FULL backup of my Debian Lenny 5 server (machine A) using tar.
The restore of tar backup is Ok..its working great on the spare machine (machine B).


Code:
/
 etc
 dev
 root
 bin
 etc...

Now on the above running system (the spare machine) i want to create a directory
named "SystemBackup02":



Code:
/
 etc
 dev
 root
 bin
 SystemBackup02
 etc...

Next time I want to
1. untar the contents of my backup in the "SystemBackup02"
directory.
2.change ip in /SystemBackup02/etc/network/interfaces & modify other confs
3.add an entry in grub, telling grub that it can also boot from this directory.

so the aim is to be able to boot from several versions of system backup
    #4  
Old 01-29-2013
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
who?
 
Join Date: Dec 2003
Last Activity: 29 October 2014, 3:36 PM EDT
Location: /dev/ph
Posts: 4,826
Thanks: 64
Thanked 431 Times in 399 Posts
OK, first question - are you using GRUB Legacy or GRUB2? Second question - will SystemBackup02, etc, be on a separate partition or filesystem?
Sponsored Links
    #5  
Old 01-30-2013
coolatt's Avatar
coolatt coolatt is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 21 October 2014, 5:12 AM EDT
Location: Mauritius
Posts: 93
Thanks: 13
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by fpmurphy View Post
OK, first question - are you using GRUB Legacy or GRUB2? Second question - will SystemBackup02, etc, be on a separate partition or filesystem?
1. Am using Debian Lenny 5 & its using GRUB Legacy.

2. "SystemBackup02" will be on the same disk, created in / (root)
Sponsored Links
    #6  
Old 02-02-2013
Praveen_218 Praveen_218 is online now
Registered User
 
Join Date: Feb 2008
Last Activity: 30 October 2014, 1:56 PM EDT
Location: Linux Machines @Mumbai & Bangalore
Posts: 165
Thanks: 7
Thanked 28 Times in 26 Posts
Its easy, a two step process.
You only need to edit grub.conf to add another boot option only for the vmlinux image you get into SystemBackup02/boot directory. Run 'install-grub /dev/<device holding SystemBackup02>'.

Hope both primary and backup machines have same architecture & device configurations!!!

A word of caution: It's a bit risky with little scope for mistakes; however don't assume that you are doomed on your mistake (until you delete your own data), if the backup system doesn't boot. You'll need to re-boot them again with a backup CD images and mount the drives temporarily and re-do the process correctly, BUT this time differently (mind that mounting may change paths). I've landed into mess and bounced back too but tensions run always high.
Sponsored Links
    #7  
Old 02-04-2013
coolatt's Avatar
coolatt coolatt is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 21 October 2014, 5:12 AM EDT
Location: Mauritius
Posts: 93
Thanks: 13
Thanked 2 Times in 2 Posts
Quote:
Originally Posted by Praveen_218 View Post
Its easy, a two step process.
You only need to edit grub.conf to add another boot option only for the vmlinux image you get into SystemBackup02/boot directory. Run 'install-grub /dev/<device holding SystemBackup02>'.

Hope both primary and backup machines have same architecture & device configurations!!!

A word of caution: It's a bit risky with little scope for mistakes; however don't assume that you are doomed on your mistake (until you delete your own data), if the backup system doesn't boot. You'll need to re-boot them again with a backup CD images and mount the drives temporarily and re-do the process correctly, BUT this time differently (mind that mounting may change paths). I've landed into mess and bounced back too but tensions run always high.
Do I need to absolutely reinstall Grub? (Its a bit scary for me even though its not a PROD Machine )

Also note that the "SystemBackup02" is just another directory on the same disk /dev/sda.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to make a full system backup excluding data and restoring it to a new system pagaille UNIX for Advanced & Expert Users 7 12-13-2010 05:32 PM
HP-UX Full System Backup with fbackup miskin HP-UX 4 09-25-2010 06:55 PM
full system backup mm00123 Solaris 1 04-17-2008 02:30 AM
linux will not boot, boot to grub prompt hassan2 Red Hat 7 01-05-2005 06:38 PM
Can't get GRUB to boot Linux!!! cstovall UNIX for Dummies Questions & Answers 2 03-03-2003 02:15 PM



All times are GMT -4. The time now is 02:13 PM.