5.2. Restoration
These instructions assume you are running tomsrtbt . If you are using a different Linux for your restore system, you may have to adjust these instructions a bit. For example, you should always run these scripts as root even if some other user gives you the requisite privileges.
Once the restoration Linux has booted and you have a console, mount the ZIP drive. It is probably a good idea to mount it read only:
# mount /dev/sda1 /mnt -o ro
Check to be sure it is there:
# ls -l /mnt
On Knoppix or finnix , you may want to make a directory under /mnt and mount it there, like so:
# mkdir /mnt/zip # mount /dev/sda1 /mnt/zip -o ro
At this point, you can run the restoration automatically or manually. Use the automated restore if you don't need to make any changes as you go along.
One consideration here is whether you have multiple hard drives. If your Linux installation mounts partitions on multiple hard drives, you must mount the root partition first. This is to ensure that mount point directories are created on the partition where they belong. The script first.stage will run the scripts to mount the drives in the order in which they are created. If you have created them (in the script save.metadata ) in the order in which they cascade from root, the mounting process should work just fine.
If you have multiple hard drives, and they cross-mount, you are on your own. Either combine and edit the scripts to mount them in the correct order, or do it manually.
5.2.1. Automated
The automatic process calls each of the manual scripts in proper order. It does not allow for manual intervention, say for creating file systems that this HOWTO does not support. To run the first stage restore automatically, enter the command:
# /mnt/root.bin/first.stage
If you want to check for back blocks, add the -c option.
5.2.2. Manually
To run the process manually, change to the directory where the scripts are on the ZIP drive.
# cd /mnt/root.bin
Now run the script(s) that will restore the partition information and create file systems. You may run them in any order. e.g.:
# ./make.dev.hda
If you want to check for back blocks, add the -c option.
This script will:
Clean out the first 1024 bytes of the hard drive, killing off any existing partition table and master boot record (MBR).
Recreate the partitions from the information gathered when you ran Knoppix .
Make ext2 and ext3 file system partitions and Linux swap partitions as appropriate. If you provide the -c option to the script, it will also check for bad blocks.
Make some types of FAT partitions.
Now is a good time to check the geometry of the drive. Sometimes different versions of Linux pick up different geometries, so the geometry implicit in the file dev.hdX is incorrect. To force it to be correct on Knoppix , edit tomsrtbt . Use the -C, -H and -S options to fdisk to specify the cylnders, heads and sectors, respectively. Those you can get from the file fdisk.hdX in the root directory of the ZIP drive. Then re-run it.
NOTE
If you have other operating systems or file systems to restore, now is a good time to do so. When you've done that, reboot to your restoration Linux and continue restoring.
Now run the script(s) that create mount points and mount the partitions to
* License

