[comp.sys.mac.misc] cloning the A/UX root partition

dejesus@bourbon.ee.tulane.edu (Francisco X DeJesus) (04/10/91)

    Is there any program out there (preferably under MacOS) that can do an
image copy of an entire SCSI partition, from one drive to another?

    I have a site license for 10 computers to run A/UX. I have one of them
set up in very specific way (local accounts, all the local files needed for
X11, directories for mounting NFS, local hosts files, man pages, etc etc).
I want to see if I can "clone" this setup by copying the entire root partition
(slice 0) from the internal drive, to an external, and copy it back into
the rest of the computers. This would facilitate the process of setting up
all the computers (better than going one by one trying to redo each change).
It will also provide me with a backup copy from which to restore the system
when A/UX crashes -  and in the "open" environment where the computers are,
A/UX crashes a lot!

    I have looked all over for any program that will do this with no luck.
What it basically has to be able to do is to perform an image copy of a SCSI
partition. It *cannot* be a file copy, since it is an A/UX partition. Anyone
have any clues as to where such a program may be available?

    Since I want to be able to use this copy to restore A/UX, doing it from
A/UX is not very helpful (I'd need to be running it to install it!). Still,
if that is the only option left to me - how could I do it? I have tried
several ways.... a staright file copy is no good because it would change all
the owner/group/permissions at the destination. Using dcopy would require
the root file system to be unmounted. Cpio would work, if I could get a
recursive list of all the files in the partition, with full paths - "ls"
does not provide any listing like that. Any other possibilities I can see
would require either having TWO copies of the file system on the external HD
(a waste!), or some extra hardware I do not have. Any options I overlooked?
Any way to make the previous alternatives work?

    Please email any responses, and I will gladly forward any info I receive
to anyone who's interested, or post a summary. Thanks in advance...
--
   ___ /      _______________________________      - Francisco X DeJesus
   |- / \/                                  \\
   ' /  /\    dejesus@bourbon.ee.tulane.edu  \\__________________________
    /         ak662@cleveland.freenet.edu    ////////////////////////////

pearce@dsdlmail.ee.iastate.edu (04/11/91)

In article <6962@rex.cs.tulane.edu> dejesus@bourbon.ee.tulane.edu (Francisco X
DeJesus) writes:
>
>    Is there any program out there (preferably under MacOS) that can do an
>image copy of an entire SCSI partition, from one drive to another?

sure, just use dd under A/UX.  You don't have to worry about unmounting the
root file-system, but you should probably be in single-user mode when you do it
(unless you can boot A/UX from one drive, and copy from a second drive to a
third).  The command would look something like this:

dd if=/dev/rdsk/c2d0s31 of=/dev/rdsk/c3d0s31

which would copy all of the disk at SCSI address 2 onto the disk at SCSI
address 3 - note that slice 31 refers to the entire disk, and that dd likes to
act on the 'raw' device, hence the /dev/rdsk vs /dev/dsk.  Making image disk
copies only works for drives which are exactly the same size as each other, and
that support hardware sparing, since the altblk maps would be different for
each drive.

Mike Pearce, DSDL/SETFourth System Administrator
Iowa State University Dept. EE/CprE
email: pearce@dsdlmail.ee.iastate.edu

dejesus@bourbon.ee.tulane.edu (Francisco X DeJesus) (04/15/91)

    Well, after a ton of email and reply posts, this is what I did: To clone
the A/UX root partition (slice 0) from one SCSI drive to another, I used the
following command typed in from A/UX Startup (sash):

dd if=/dev/dsk/cXd0s0 of=/dev/dsk/cYd0s0

    Where X and Y are the source and destination drive's SCSI ID's,
respectively. Since this was run under A/UX Startup, A/UX itself was not
really running so it was doing this from MacOS. It worked great and took
about an hour each time. If the destination drive did not contain A/UX
before doing this, use some kind of partitioning software to make the
necessary A/UX partitions on it (I was using Silverlining). In addition,
and though I was not sure this was necessary, I booted from the "cloning"
drive and made unix file systems on the destination drive's A/UX partitions.

    Another solution proposed to me was using "find -depth -print" in
combination with "cpio" under A/UX itself. Although I did not try it, it
certainly seems it should work, since it gives cpio the recursive listing
of all the files with the full pathnames.

    I received serveral other interesting approaches, but they all involved
being in A/UX or A/UX Startup. I never heard of any MacOS program that would
clone just a partition. A couple of people suggested using the Apple utility
SCSI Cloner, but that would clone and entire drive, not just a partition,
which I couldn't do because I was using at least four different drive sizes.

    Thanks a lot to everyone who responded... there were too many to thank
individually but you know I appreciate your help.
--
   ___ /      _______________________________      - Francisco X DeJesus
   |- / \/                                  \\
   ' /  /\    dejesus@bourbon.ee.tulane.edu  \\__________________________
    /         ak662@cleveland.freenet.edu    ////////////////////////////