| Read making space first! This is Troy's check list
for restoring an old dump onto a new harddrive.
- Install a new Hard Drive to the system.
- Boot the system with a Boot and Root floppies.
- At the stand/sysinstall Main Menu, choose 5 Configure.
- At the FreeBSD Configuration Menu, choose F Fdisk.
Note: If you are booting multi os's from the same disk, next few steps will vary, but
we will assume you are using the entire disk for FreeBSD.
- At the FDISK partition Editor press A and accept with a YES.
- Use the arrow key to hilight da0s1[wd0s1 for non-SCSI drives] in Name column and press S
and then Q.
NOTE : DO NOT PRESS "W" AT THIS TIME. IT WILL CAUSE YOU GRIEF LATER.
- Choose (*) Standard at Install Boot Manager.
- At the FreeBSD Configuration Menu, choose L Label.
- At FreeBSD Disk Lable Editor :
Create at least /, swap, /var, and /usr.
Press w and accept with a YES.
- Press q and at the Free BSD Configuration Menu, choose E Exit.
- At the stand/sysinstall Main Menu, choose F Fixit.
- At the Please choose a fixit option, choose 2 Floppy.
- Insert Fixit floppy and press enter.
- Follow the directions and press Alt-F4 and do the following.
Note: Troy is using a scsi DLT tape drive. Replace /dev/rsa0 with a
appropriate device if an IDE tape drive is used. If nothing happens in rewind, the
tape is at the beginning.
Now we start the Magnetic Tape manipulating program.
mt fsf NUMBER
where NUMBER = File Number of the particular system. See STATUS TABLE above.
The value for the "specify next volume #: " is 1 since each file system is
dumped with an option "a". Troy writes:
Without the "a" option, the "dump" program will automatically
calculate and break up the file system in X number of volumes. Since I already know
the size of my DLT tape is larger than the whole hard drive, I can safely tell the
"dump" program to write until the end of the tape. If the hard drive size
is larger than the DLT tape size(which is 30GB with compression), then the "a"
option maybe dangerous. Since I do not have any hard drive larger than 30GB yet, I
have not tested that part. I may update it when that time comes. Thus, the
volume number "1" is used. Part of "man dump" says : A dump that
is larger than the output medium is broken into multiple volumes. On most media
the size is determined by writing until an end-of-media indication is returned. This
can be enforced by using the -a option.
Fixit# mt rewind
Fixit# cd /mnt
Fixit# restore rf /dev/rsa0
Note: Ignore all warning messages.
Fixit# cd /mnt/var
Fixit# mt fsf 1
Fixit# restore rf /dev/rsa0
Fixit# cd /mnt/usr
Fixit# mt fsf 2
Note: One may choose to use restore rf /dev/rsa0 but, it did not restore all /usr so I
restored only
/usr/bin, /usr/sbin, /usr/lib, and /usr/libexec. Swap space might be the problem.
Fixit# restore -i
restore > cd bin
restore > add *
restore > cd ../sbin
restore > add *
restore > cd ../lib
restore > add *
restore > cd ../libexec
restore > add *
restore > extract
You have not read any tapes yet.
Unless you know which volume your file(s) are on you
should start with the last volume and work towards
the first.
specify next volume #: 1
set owner/mode for '.'? [yn] y
Note: man restore has this to say about set mode:
All the directories that have been added to the ex-
traction list have their owner, modes, and times set;
nothing is extracted from the dump. This is useful
for cleaning up after a restore has been prematurely
aborted.
restore > quit
Fixit# exit
Reboot the system at this time and login in as a root. Now restore the whole /usr
file system.
# cd /usr
# mt fsf 2
# restore -i
To walk around restore, type '?' at the restore > prompt.
restore > ls
Add everything except bin, sbin, lib, and libexec.
restore > add home
restore > add local
.
.
.
restore > extract
You have not read any tapes yet.
Unless you know which volume your file(s) are on you
should start with the last volume and work towards the first.
specify next volume #: 1
set owner/mode for '.'? [yn] y
restore > quit
#reboot
The new Hard Drive will be running with the same configuration as before. |