How do you clone a disk?

John Ioannidis ji at cs.columbia.edu
Sat Oct 7 12:27:06 AEST 1989


I have a bunch of PS/2-80's (and a lot more soon to arrive) with 330MB
ESDI drives and I want to be able to have a master disk and clone every
machine off that `master' disk.

SO far I've tried some things, but none have worked satisfactorily.
Since there is NO documentation on how to install a second drive (but
FLAME ON they'll tell ou about 6.023E+23 times where the Enter key is
and that the prompt is a '$' sign FLAME OFF) I tried to do various
logical things, none of which really worked. 

Here's what I tried:

First I used minidisks(1m): the program can figure out that there is a
second disk on the controller and correctly display its partitions (I
wonder how), but it won't `name' them (first field in the menu) so I
can't change partition sizes and stuff.

Then I tried to figure out what the minor device numbers for the
second disk should be. It turned out that they start at 32, with the
32 being the entire disk, 33 being what was hd1 when the disk was the
first disk of another machine etc. I guessed that if I were to 

	# mknod /dev/hd32 b 3 32
	# dd if=/dev/hd00 of=/dev/hd32 

it would copy the entire first disk onto the second. Ha! It copied
about 700 blocks and then gave me an I/O error.

SO next I tried copying it partition by partition; I successfully
copied the / and the /<machinename> partitions, but it took an
ENORMOUS amount of time, like forty-five minutes to copy ~130M of
stuff. After a couple of fsck's I got the machine with the cloned disk
to reboot correctly, but I'm not yet satisfied.

DOes anyone have any clean and fast way to clone disks? Is there a
lower-level program than minidisks (which won't let you touch the hard
drive if the parameters it sees on it do not match /etc/filesystems,
but it won't tell you which parameters DONT match so that you can fix
them) that I can use? LIke format() on the suns, f'r instance? 

Thanks,

/ji



More information about the Comp.unix.aix mailing list