Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!gem.mps.ohio-state.edu!ginosko!uunet!ibmpa!bass.tcspa.ibm.com!webb From: webb@bass.tcspa.ibm.com (Bill Webb) Newsgroups: comp.unix.aix Subject: Re: How do you clone a disk? Keywords: disk clone Message-ID: <2531@ibmpa.UUCP> Date: 11 Oct 89 21:38:39 GMT References: <363@cs.columbia.edu> Sender: news@ibmpa.UUCP Reply-To: uunet!ibmsupt!webb Organization: IBM AWD Paloalto Lines: 45 > 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. > ... > # 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. >... > /ji I've been considering writing a utility that would use the BIOS calls to clone disks or partitions. Having written a program to change the partition table by opening /dev/hd00 I'm surprised that you were able to write hd32 at all - you first have to issue an ioctl (HDIOWRT - see ) before any I/O will work on a whole disk partition such as /dev/hd00. (I assume - it didn't appear to be documented anywhere that I saw). I suggest that you try the above after writing a program ( hdiowrt ; dd if=/hd00 bs=... ) > /dev/hd32 Of course non of this is for the faint of heart - writting directly to a hard disk can be very, very dangerous if you don't do it EXACTLY right (I assume thats why the ioctl is there in the first place). We have found that we could copy whole disks if we used the IBM 6152 AOS 4.3 standalone disk copy utility, but that's probably not available to everybody (it essentially uses BIOS to access the disk). You also have to make sure that you use the 'chparm' command to change the name of the new machine after booting it for the first time, and also use the boot menu to change the node name as well. If you're installing DOS/MERGE you should do that on the actual machine that its running on as it must run on the same hardware its installed on because it takes a BIOS image (see the documentation). Note of the above should be taken as any IBM support for the practice of disk cloning, however I hope that it helps you get the job done. Good Luck! ---------------------------------------------------------------- The above views are my own, not necessarily those of my employer. Bill Webb (IBM AWD Palo Alto), (415) 855-4457). UUCP: ...!uunet!ibmsupt!webb