A/UX or AWS 95: Copy Complete Contents Of A Partition (11/95)

I'm trying to copy the UNIX drive from my Apple Workgroup Server (AWS) 95 to another UNIX drive, in the same computer. How do I do this?
NOTE:
This is a long response, please read it in its entirety before attempting to follow the steps outlined below.

CAUTION:
There are steps in this procedure that will destroy the data on a disk. Please make sure the disk is backed up, and the correct parameters are used because loosing data in this fashion would be non-recoverable.


We do not have a clear understanding of what, "copying the UNIX drive," means. We will assume you are trying to move the data from your AWS 95 root disk to a second hard disk, in other words, creating a copy of the AWS 95 A/UX partition. If this is not correct, the procedure below should work for any partition you want to copy, that is, you could us the same process to copy other A/UX partitions.

Example and Procedure
---------------------
The internal drive, to be copied, is connected to the PDS card with its SCSI address set to 0. Since the root volume is assigned Slice 0, the device name to access this drive would be /dev/dsk/c300d0s0.

The target drive is connected to the external port of the PDS card with its SCSI ID set to 5. Since we are trying to copy the root file system, it should have a partition with Slice 0 assigned to it. The device name to access this drive would be /dev/dsk/c405d0s0.

Also, be certain the partition of the target drive is large enough to contain all of the data in the source partition.

When we refer to using a command, we mean typing the command in a CommandShell window.

Make sure AppleShare Pro is not running.

Step 1
------
Since we are going to copy ONLY the contents of the root partition, make sure you unmount all other partitions, you can use the command:

umount -a

Step 2
------
Run Apple HDSC Setup WHILE IN A/UX -- this is important. If this step is done while in the Mac OS, the disk will be partitioned but the UNIX partitions will not contain a file system. Below are three ways for creating UNIX partitions -- the first is recommended:

* If you use the Apple HDSC Setup program while in A/UX, the program will
ask you for a mount point for the file system being created. Since we
are assuming you are copying the root drive and volume, mount the drive
on a directory called "/s0".

* If the disk was formatted and partitioned while in the Mac OS, a file
system can be created on the UNIX partitions with the command:

newfs /dev/dsk/cX0Yd0sZ (## This erases all data in the partition ##)

Where X = SCSI BUS (1, 2, 3 or 4)
Y = SCSI ID of the drive (0, 1, 2, 3, 4, 5 or 6)
Z = Slice where the file system will be created (0 for root
volume)

The value for Z is chosen when partitioning the drive and creating a
UNIX partition.

* If Apple HDSC Setup will not be used, create a directory called
/s0 and mount the partition using the commands:

mkdir /s0
mount /dev/dsk/c405d0s0 /s0

Step 3
------
Copy the data to the target drive. The following commands will copy the contents of the complete file system preserving access privileges, access times and modification dates:

cd /
find . -print | grep -v /s0 | cpio -pdlmuv /s0

Step 4
------
Unmount the target partition and run fsck on it with the following commands:

umount /s0
fsck /dev/dsk/c405d0s0

The target drive now contains a copy of the source drive's file system.


If you are planning on using this drive as a complete replacement for the internal drive, special care should be taken that the drive contains the following partitions:

* A Macintosh Volume that contains a copy of the contents of the
MacPartition

* A Swap partition that is at least the same size as the amount of RAM
in the AWS 95.


Support Information Services
Published Date: Feb 19, 2012