February 25, 2006
Operating System |
Platform |
Application(s) |
Database(s) |
Other |
|
|
N / A
|
N / A
|
N / A |
If you have experience installing the IRIX operating system on SGI hardware, you know it can be quite annoying. CD swapping and the install boot-up intricacies are more trouble than you want to do often. Once you get that perfect fresh installation on you system, it is a good idea to just image that drive, and wrap it up and tuck it away for later. That way, if you mess up your installation - all you have to do is put that image drive next to the other one and copy your good image over the messed up one!
Using dd would be the easiest method, but that only works if both drive are the exact same size. In this example, I am using a 9GB drive for the original (1st drive) and an 18GB drive for the backup (2nd drive). So, we will be using two IRIX native tools: xfsdump and xfsrestore. For this guide I used an Octane2 and IRIX 6.5.27m. I also tested it with an Origin 200. It should work with most versions of IRIX and SGI hardware.
Place your backup drive in the second bay. Boot the system and enter the shell (as root). Now enter single user mode (with the init s command) and partition the drive as follows (to create a system disk):
# sync
# fx -x (choose the backup drive, which should be device dksc, ctlr 0, drive 2)
fx> r
fx/repartition> ro (choose the default, xfs)
fx/repartition> ../exit |
Next we need to copy over sash and ide to the volume header on the second drive:
# dvhtool -v get sash /stand/sash
# dvhtool -v get ide /stand/ide
# dvhtool -v list /dev/rdsk/dks0d2vh (nothing should be there if it is a new drive)
# dvhtool -v creat /stand/sash sash /dev/rdsk/dks0d2vh
# dvhtool -v creat /stand/ide ide /dev/rdsk/dks0d2vh
# dvhtool -v list /dev/rdsk/dks0d2vh (sash and ide should be listed) |
First we need to create the xfs filesystem on the backup drive:
| # mkfs_xfs /dev/rdsk/dks0d2s0 |
Now that the secondary drive is ready, we will dump the contents of the first to the second, using the xfsdump and xfsrestore process to move the data:
# mkdir /drive2
# mount -v /dev/dsk/dks0d2s0 /drive2
# cd /drive2
# sync
# xfsdump -l0 - /dev/rdsk/dks0d1s0 | xfsrestore -p60 - . |
This will take a while. Be sure that in the last line above, you enter the -l0 as the letter L and number zero... and don't forget that period at the end. That tells it to put all the data in your current directory (/drive2). Time to sync up and shut down:
# sync
# rmdir drive2
# cd /
# sync
# umount -v /drive2
# rmdir drive2
# init 0 (shutdown) |
|