Section 11.4. Alt-Boot Full Image Method


11.4. Alt-Boot Full Image Method

This example is the simplest of all the procedures, making it the most likely procedure for Windows users who are not familiar with Linux. This method requires the the system to be offline (booted into Knoppix), and it works regardless of what operating system you're using. It does require the system to be down and requires enough space for a copy of the entire root drive.

11.4.1. Create the Bare-Metal Backup

Use the following steps to create a bare-metal backup of your system.

11.4.1.1. Back up the important metadata

This method does not require this step because the metadata is backed up and restored when you back up the entire hard disk as one image.

11.4.1.2. Boot the system from alternate media

First, place the Knoppix CD into the drive and reboot, booting you into Knoppix. By default, Knoppix starts KDE (a windowing environment) as user knoppix. After switching to the root user (which has no password initially), create a mount point, and mount an NFS directory as /backups:

knoppix@0[knoppix]$ su - # mkdir /backups # mount nfsserver:/data08/curtis /backups

See the previous section "Assumptions"if either DHCP or NFS isn't available.


11.4.1.3. Back up the operating system with a native utility

You can back up the entire disk using dd to a file in the NFS directory. This command specifies to back up the root hard drive (/dev/hda) to a file called /backups/hda.dd.

# dd if=/dev/hda of=/backups/hda.dd

Alternatively, if you want to save space, you could run this command. Depending on where your bottleneck is, this may speed up or slow down the backup.

# dd if=/dev/hda |gzip c > /backups/hda.dd.gz

11.4.2. Perform a Bare-Metal Recovery

Use the following steps to recover your system from bare metal.

Trash Your Hard Drive!

If you're trying to test the recovery of your operating system hard drive, you might want to trash it before you start to make sure the procedure works. (We assume you're working on a test system.) The first dd command blows away both the boot block and the disk's partition information. The other commands mess up the first 50 MB of each partition. Although the root filesystem is still there, you couldn't find it if you wanted to!

Boot into Knoppix, and then run the following commands:

# dd if=/dev/zero of=/dev/hda bs=512 count=1 # dd if=/dev/zero of=/dev/hda1 bs=1024k count=50 # dd if=/dev/zero of=/dev/hda2 bs=1024k count=50 # dd if=/dev/zero of=/dev/hda3 bs=1024k count=50 # dd if=/dev/zero of=/dev/hda4 bs=1024k count=50 # reboot Boot Failure Insert Boot diskette in A: Press any key when ready.


11.4.2.1. Boot the system from alternate media

The first step in recovering this system is to place the Knoppix CD into the CD drive and boot the system. As before, open a terminal window, and switch to the root user, and then mount your NFS directory:

knoppix@0[knoppix]$ su - # mkdir /backups # mount nfsserver:/data08/curtis /backups

See the previous section "Assumptions"if either DHCP or NFS isn't available.


11.4.2.2. Restore the boot block information

This step is accomplished when you perform the dd of the entire disk.

11.4.2.3. Prepare the new root drive

This step is accomplished when you perform the dd of the entire disk.

11.4.2.4. Restore the operating system

To restore the entire disk, run this command:

# dd if=/backups/hda.dd of=/dev/hda

If you used the compress command during backup, you should use this command to restore instead. Depending on where your bottleneck is, this may speed up or slow down the restore.

# gzip dc /backups/hda.dd.gz|dd of=/dev/had

All you have to do now is remove the Knoppix CD and reboot the system. Your system should be fully operational. Wasn't that easy?





Backup & Recovery
Backup & Recovery: Inexpensive Backup Solutions for Open Systems
ISBN: 0596102461
EAN: 2147483647
Year: 2006
Pages: 237

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net