[comp.unix.aux] 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    ////////////////////////////

steveg@ni.umd.edu (Steve Green) (04/10/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?
>[deleted]

Yes.. you can use dd.  Although I have never done it from sash, sash does have
dd and thus.. why wouldn't it work.. :)

Just make sure all of your drives are low level formatted and type this from
sash.
	dd if=/dev/dsk/cxd0s31 of=/dev/dsk/cyd0s31 bs=512k
where x is the source scsi id and y is the destination scsi id.

As far as I remember, this copies the entire deal.. MacOS, p-map, eschatology,
UNIX, etc.. so after that, you should be good to go..

-- 
Silica gel -- Do not eat.				steveg@ni.umd.edu

Disclaimer:  If anything I said above is incorrect, never mind.

sukes@eng.umd.edu (Tasuki Hirata) (04/11/91)

In article <1991Apr10.025055.1029@ni.umd.edu> steveg@ni.umd.edu (Steve Green) writes:
>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?
>>[deleted]
>
>Yes.. you can use dd.  Although I have never done it from sash, sash does have
>dd and thus.. why wouldn't it work.. :)
>
>Just make sure all of your drives are low level formatted and type this from
>sash.
>	dd if=/dev/dsk/cxd0s31 of=/dev/dsk/cyd0s31 bs=512k
>where x is the source scsi id and y is the destination scsi id.
>
>As far as I remember, this copies the entire deal.. MacOS, p-map, eschatology,
>UNIX, etc.. so after that, you should be good to go..
>

Just remember when using dd, the source disk and the destination
disk has be the same model hard disk or the image will not work.

--
| Tasuki Hirata (sukes@eng.umd.edu) | - This page intentionally left blank - |
| UUCP: uunet!eng.umd.edu!sukes     | 					     |

akkana@Apple.COM (Akkana Peck) (04/11/91)

In article <1991Apr10.025055.1029@ni.umd.edu> steveg@ni.umd.edu (Steve Green) writes:
>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?
>>[deleted]
>
>	dd if=/dev/dsk/cxd0s31 of=/dev/dsk/cyd0s31 bs=512k
>where x is the source scsi id and y is the destination scsi id.

Or even ... cat!  I admit that I haven't tried it on A/UX, but I've
successfully cloned SunOS with commands like "cat /dev/rsd0a >/dev/rsd1a".
(We were going to use dd, but just wanted to see if cat would work,
for the hack value.  It had been a long day. :-) )

	...Akkana		(akkana@apple.com)
Disclaimer: I'm a contractor, and don't speak for Apple.  
Apple does *not* officially recommend using "cat" to install A/UX.

jim@jagubox.gsfc.nasa.gov (Jim Jagielski) (04/11/91)

In article <51392@apple.Apple.COM> akkana@Apple.COM (Akkana Peck) writes:
}In article <1991Apr10.025055.1029@ni.umd.edu> steveg@ni.umd.edu (Steve Green) writes:
}>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?
}>>[deleted]
}>
}>	dd if=/dev/dsk/cxd0s31 of=/dev/dsk/cyd0s31 bs=512k
}>where x is the source scsi id and y is the destination scsi id.
}
}Or even ... cat!  I admit that I haven't tried it on A/UX, but I've
}successfully cloned SunOS with commands like "cat /dev/rsd0a >/dev/rsd1a".
}(We were going to use dd, but just wanted to see if cat would work,
}for the hack value.  It had been a long day. :-) )
}

Of course, in BOTH cases you must make sure that the sizes of the 2 partitions
are the EXACT same, since the SuperBlocks are also copied and they have file-
system size info in them. If, for example, you want to move your 50MB root file
system to a new 100MB partition, DON'T use dd (or cat) or any image copy!

Not that Steve or Akkane were saying that you could, it's just that I've seen
some people try and then wonder why it didn't work :(
--
===========================================================================
#include <std/disclaimer.h>
                                 =:^)
           Jim Jagielski                    NASA/GSFC, Code 711.1
     jim@jagubox.gsfc.nasa.gov               Greenbelt, MD 20771

 "I object to all this sex on the television. I mean, I keep falling off!"

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    ////////////////////////////

chn@lanl.gov (Charles Neil) (04/16/91)

In article <1991Apr10.194542.23087@eng.umd.edu>, sukes@eng.umd.edu (Tasuki Hirata) writes:
 > In article <1991Apr10.025055.1029@ni.umd.edu> steveg@ni.umd.edu (Steve Green) writes:
 > >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?
 > >>[deleted]
 > >
 > >Yes.. you can use dd.  Although I have never done it from sash, sash does have
 > >dd and thus.. why wouldn't it work.. :)
 > >
 > >Just make sure all of your drives are low level formatted and type this from
 > >sash.
 > >	dd if=/dev/dsk/cxd0s31 of=/dev/dsk/cyd0s31 bs=512k
 > >where x is the source scsi id and y is the destination scsi id.
 > >
 > >As far as I remember, this copies the entire deal.. MacOS, p-map, eschatology,
 > >UNIX, etc.. so after that, you should be good to go..
 > >
 > 
 > Just remember when using dd, the source disk and the destination
 > disk has be the same model hard disk or the image will not work.

This is false.
-- 

	-Charlie Neil (chn@lanl.gov)
	 Los Alamos National Laboratory (505) 665-0978

ksand@Apple.COM (Kent Sandvik) (04/17/91)

In article <21474@lanl.gov> chn@lanl.gov (Charles Neil) writes:
>In article <1991Apr10.194542.23087@eng.umd.edu>, sukes@eng.umd.edu (Tasuki Hirata) writes:
> > In article <1991Apr10.025055.1029@ni.umd.edu> steveg@ni.umd.edu (Steve Green) writes:
> > Just remember when using dd, the source disk and the destination
> > disk has be the same model hard disk or the image will not work.
>
>This is false.

Well, my $0.02. It's true and false, true in many cases, but there
are false cases as well. Feel free to find them :-).

Kent


-- 
Kent Sandvik, DTS junkie

steveg@melmac.umd.edu (Steve Green) (04/20/91)

In article <13099@goofy.Apple.COM> ksand@Apple.COM (Kent Sandvik) writes:
>In article <21474@lanl.gov> chn@lanl.gov (Charles Neil) writes:
>>In article <1991Apr10.194542.23087@eng.umd.edu>, sukes@eng.umd.edu (Tasuki Hirata) writes:
>> > In article <1991Apr10.025055.1029@ni.umd.edu> steveg@ni.umd.edu (Steve Green) writes:
>> > Just remember when using dd, the source disk and the destination
>> > disk has be the same model hard disk or the image will not work.
>>
>>This is false.
>
>Well, my $0.02. It's true and false, true in many cases, but there
>are false cases as well. Feel free to find them :-).
>
>Kent

I am pretty sure that it was not me that said the original text but in any
event, I have enclosed a small algorithm for determining if dd will copy
AUX correctly.

-- cut here --
	1.  Try it
	2.  If it works, then it will work.
	3.  If if fails, then it wont work.
-- cut here --

But seriously though, it stands to reason that if the destination disk is
smaller than the origianl, things may get a little ugly.  Other than that,
the odds are that things will work but you may lose access to some of the 
disk since the p-map is copied as well.

-- 
Silica gel -- Do not eat.				steveg@ni.umd.edu

Disclaimer:  If anything I said above is incorrect, never mind.