On Wed, 10 Apr 2002 04:36, Dale A. Sprankle II wrote:
I work for a company that's too cheap to buy any Hard Drive cloning software (i.e. ghost). We are primarily a Windows2000 based org. Creating a network install, is also out of the question. PC's are to be installed identically with the same hardware and software. I want to install everything one time to a Hard Drive that is slaved into my trusty SuSE 7.3 box and clone it over to Hard Drives as the need arises. I am only somewhat familiar with linux, but someone told me that the dd command is a possibility for me. After I install the so called Master Windows Drive and sysprep it, will the dd command in linux work, to make an exact copy? If so, please elaborate! TIA!! Dale
Hi Dale, The problem with the dd command is that both drives have to be exactly the same size. I have been using tar to clone drives quite successfully. Takes a while and it is a bit fiddly but works. Below are the steps I use to clone a drive. Be carefull with the /etc/fstab file using this method otherwise you can get yourself into real trouble. Cloning Hard Disks using tar ==================== 1) Connect the new drive to your system 2) Get the details of your current drive you wish to clone as shown below. (Best to print the details out so that you can add comments, etc) lin-3:~ # fdisk /dev/hda Command (m for help): Disk /dev/hda: 255 heads, 63 sectors, 2434 cylinders Units = cylinders of 16065 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 2 16033+ 83 Linux /dev/hda2 3 35 265072+ 82 Linux swap /dev/hda3 36 1080 8393962+ 83 Linux /dev/hda4 1081 2434 10876005 83 Linux lin-3:~ # cat /etc/fstab /dev/hda2 swap swap defaults 0 0 /dev/hda3 / reiserfs defaults 1 1 /dev/hda4 /home reiserfs defaults 1 2 /dev/hda1 /boot ext2 defaults 1 2 /dev/hdd /cdrom auto ro,noauto,user,exec 0 0 /dev/fd0 /floppy auto noauto,user 0 0 proc /proc proc defaults 0 0 # End of YaST-generated fstab lines 3) Partition the new drive with the same partitions as your original drive. Either fdisk or Yast can be used. I prefer Yast. Note: they do not need to be the same size as the original drive but must the larger than memory used on the partition. Use command df to find out the sizes. 4) Create the file systems on the partitions. You can either use mkfs or Yast. I prefer yast as it is far easier to use. Note: Yast will write a new /etc/fstab with the new partitions added. It also renames the existing fstab to another name. Before doing anything else you must delete the fstab Yast creates and rename the original fstab, otherwise you will have real problems when you reboot the system . 5) You can now clone the partitions. (see below) Clone the /boot partition lin-3:/ # mount -t ext2 /dev/hdb1 /mnt/tmp lin-3:/ # cd /boot; tar -clf - . | (cd /mnt/tmp; tar -xf -) lin-3:/ # umount /mnt/tmp Clone the / partition lin-3:/ # mount -t reiserfs /dev/hdb3 /mnt/tmp lin-3:/ # cd /; tar -clf - . | (cd /mnt/tmp; tar -xf -) edit the /etc/fstab on the new drive as per the partitions you have setup. vi /mnt/tmp/etc/fstab NOTE: this is only necessary if your new partitions are different from the originals. e.g. Your new drive is a SCSI whereas your original is an IDE or you have changed the partition type (ext2 verses resierfs) lin-3:/ # umount /mnt/tmp Clone the /home partition lin-3:/ # mount -t reiserfs /dev/hdb4 /mnt/tmp lin-3:/ # cd /home; tar -clf - . | (cd /mnt/tmp; tar -xf -) lin-3:/ # umount /mnt/tmp lin-3:/home # 6) Shutdown the system and transfer the Hardisk to the new system. 7) Boot the new system using the SuSE CDROM (from the above example the partition would be /dev/hda3 ). 8) Run lilo to setup your mbr 9) reboot the system and it should come up ok. Regards, Graham Smith ----------------------------------------