Hi I know I should be able to do this, but many years of using Ghost have made my brain go soft. Can someone talk me through cloning 12 identical machines? I was assuming something like tar, tftp and lilo, but the sites I found on the subject just confused me... Cheers Chris
On Wednesday 22 January 2003 8:48 am, Chris Puttick wrote:
I know I should be able to do this, but many years of using Ghost have made my brain go soft. Can someone talk me through cloning 12 identical machines? I was assuming something like tar, tftp and lilo, but the sites I found on the subject just confused me... I did this yesterday on my own machine when my main hard disk overheated and started making funny noises - however I had the new and old hard disks connected to the same machine.
All I had to do was dd if=/dev/hda of=/dev/hdb - although I had to do much agonising before hitting return just to make sure I was doing the copy in the correct direction. Note that this takes ages as you copy the entire disk surface, not just the area covered in files, and the destination drive has to be at least as big as the source. I've not done this over a network, but if I had to, my instinct would be to boot up a floppy based distribution (maybe keeper?) and arrange things so that I could see the source drive or a tar.gz image of it somewhere over the network, and then use the dd command to do the work. However, I'm sure that someone who actually knows what they are doing might be aware of a better way :) Cheers -- Phil Driscoll
On Wednesday 22 January 2003 10:10 am, Phil Driscoll wrote:
On Wednesday 22 January 2003 8:48 am, Chris Puttick wrote:
I know I should be able to do this, but many years of using Ghost have made my brain go soft. Can someone talk me through cloning 12 identical machines? I was assuming something like tar, tftp and lilo, but the sites I found on the subject just confused me...
I did this yesterday on my own machine when my main hard disk overheated and started making funny noises - however I had the new and old hard disks connected to the same machine.
All I had to do was dd if=/dev/hda of=/dev/hdb - although I had to do much agonising before hitting return just to make sure I was doing the copy in the correct direction. Note that this takes ages as you copy the entire disk surface, not just the area covered in files, and the destination drive has to be at least as big as the source.
This also has the problem that if the two drives don't have the same geometry it may not work. Generally if they have the same number of heads and sectors and the cylinders is greater on the target you'll be okay. It does work in other circumstances but it's not guaranteed. It's a case of suck-it-and-see. Also, bear in mind that if the source is mounted at when you're copying, you may end up with an inconsistant target with filesystems needing fscking etc. If you're going to do this, I'd suggest switching to runlevel 1 to close down as many services as possible, and 'sync' before starting. If possible unmount or remount read-only whatever you can. For best results, run your system from a 3rd HD.
I've not done this over a network, but if I had to, my instinct would be to boot up a floppy based distribution (maybe keeper?) and arrange things so that I could see the source drive or a tar.gz image of it somewhere over the network, and then use the dd command to do the work.
I would try and avoid even a modest clone over a network these days. The smallest drive CCL sells is a 30GB disk. Without doing any maths, I would say that even over a 100MB LAN, that's going to take a while, and that's after all the other technical problems.
However, I'm sure that someone who actually knows what they are doing might be aware of a better way :)
Cheers
-- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
On Wed, Jan 22, 2003 at 09:24:39AM +0000, Gary Stainburn wrote:
On Wednesday 22 January 2003 10:10 am, Phil Driscoll wrote:
On Wednesday 22 January 2003 8:48 am, Chris Puttick wrote:
I know I should be able to do this, but many years of using Ghost have made my brain go soft. Can someone talk me through cloning 12 identical machines? I was assuming something like tar, tftp and lilo, but the sites I found on the subject just confused me...
I did this yesterday on my own machine when my main hard disk overheated and started making funny noises - however I had the new and old hard disks connected to the same machine.
All I had to do was dd if=/dev/hda of=/dev/hdb - although I had to do much agonising before hitting return just to make sure I was doing the copy in the correct direction. Note that this takes ages as you copy the entire disk surface, not just the area covered in files, and the destination drive has to be at least as big as the source.
This also has the problem that if the two drives don't have the same geometry it may not work. Generally if they have the same number of heads and sectors and the cylinders is greater on the target you'll be okay. It does work in other circumstances but it's not guaranteed. It's a case of suck-it-and-see.
Also, bear in mind that if the source is mounted at when you're copying, you may end up with an inconsistant target with filesystems needing fscking etc. If you're going to do this, I'd suggest switching to runlevel 1 to close down as many services as possible, and 'sync' before starting. If possible unmount or remount read-only whatever you can.
For best results, run your system from a 3rd HD.
Or more easily a RAM disk or CDROM. These are supplied with most distributions or a Knoppix CDROM will do perfectly well. -- Mark Evans St. Peter's CofE High School Phone: +44 1392 204764 X109 Fax: +44 1392 204763
Both Gary and Mark have mentioned that the raw copy of a disk is best only used when the disks have identical geometry. I don't know the first thing about how the kernel drivers actually access the drives, but surely on a modern machine it's no longer by cylinder head sector any more? Isn't LBA the norm these days - and if that's the case, surely - for once :) - size matters, and not geometry. -- Phil Driscoll
On Wednesday 22 January 2003 10:50 am, Phil Driscoll wrote:
Both Gary and Mark have mentioned that the raw copy of a disk is best only used when the disks have identical geometry. I don't know the first thing about how the kernel drivers actually access the drives, but surely on a modern machine it's no longer by cylinder head sector any more? Isn't LBA the norm these days - and if that's the case, surely - for once :) - size matters, and not geometry.
If you look at /proc/ide/hda/geometry, it will show you both the physical and logical geometry of a HD. The physical one can realistically be ignored but the logical one is the one used by the partition managements s/w such as fdisk - compare against fdisk -l /dev/hda. (BTW, for EVERY linux box you have, run 'fdisk -l /dev/hda|lpr' and keep it safe for when you splat you partition tables). This geometry controls the start/end points of partitions, e.g. starting at beginning of cylinder etc. Therefore, you can clone a disk with c/h/s of 1025/255/63 to a disk of 2096/255/63 without any problems, but a waste of 2096-1025 cylinders, while cloning to (theoretical) 1025/63/255 won't work. -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
On Wednesday 22 January 2003 10:14 am, Gary Stainburn wrote:
If you look at /proc/ide/hda/geometry, it will show you both the physical and logical geometry of a HD. The physical one can realistically be ignored but the logical one is the one used by the partition managements s/w such as fdisk - compare against fdisk -l /dev/hda.
Sadly I no longer have my old hard disk connected up so I can't look at its gemoetry, however the old disk was a 60Gb IBM drive and the new one is a 120Gb Maxtor, so I guess the likelihood of very different logical geometries is high. Yet after doing the raw copy of the smaller disk, all the tools I have to hand (fdisk, SuSE yast partitioner, win NT disk administator) tell me I have an unused 60Gb block at the end of my disk. This implies to me that dd copied the first 60Gb worth of blocks of the small drive onto the first 60Gb worth of blocks on the second. If I'm wrong about this, then the data on my hard disk is stored very strangely, and I can't believe it would still work. I have one copy of NT on the drive and 3 different linux installations. All seem to work perfectly. Cheers -- Phil Driscoll Confused of Leeds
On Wednesday 22 January 2003 11:30 am, Phil Driscoll wrote:
On Wednesday 22 January 2003 10:14 am, Gary Stainburn wrote:
If you look at /proc/ide/hda/geometry, it will show you both the physical and logical geometry of a HD. The physical one can realistically be ignored but the logical one is the one used by the partition managements s/w such as fdisk - compare against fdisk -l /dev/hda.
Sadly I no longer have my old hard disk connected up so I can't look at its gemoetry, however the old disk was a 60Gb IBM drive and the new one is a 120Gb Maxtor, so I guess the likelihood of very different logical geometries is high. Yet after doing the raw copy of the smaller disk, all the tools I have to hand (fdisk, SuSE yast partitioner, win NT disk administator) tell me I have an unused 60Gb block at the end of my disk. This implies to me that dd copied the first 60Gb worth of blocks of the small drive onto the first 60Gb worth of blocks on the second. If I'm wrong about this, then the data on my hard disk is stored very strangely, and I can't believe it would still work. I have one copy of NT on the drive and 3 different linux installations. All seem to work perfectly.
Cheers
I'm now drifting to the realms of guesswork and probability, but as physical and logical geometries are not related, it could well be that a 60GB and a 120GB HD would have same LOGICAL heads and sectors, at which point the clone would work. -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
Doesn't Ghost 'do' or 'clone' Linux these days? I maybe way off here, but the original post mentioned Ghost, and I thought I saw that Linux drives were supported on the Ghost packaging I was having a look at. I may be completely wrong. Of course, I assume you need to actually do all this from a Windows install to use Ghost? If I was having to deal with 'geometry', an 'cylinders', and 'probably', I know what I'd do... -- Matt Johnson __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com
On Wednesday 22 January 2003 11:28 am, Matt Johnson wrote:
Doesn't Ghost 'do' or 'clone' Linux these days? I maybe way off here, but the original post mentioned Ghost, and I thought I saw that Linux drives were supported on the Ghost packaging I was having a look at. I may be completely wrong.
Of course, I assume you need to actually do all this from a Windows install to use Ghost?
If I was having to deal with 'geometry', an 'cylinders', and 'probably', I know what I'd do...
The problem is that the OP was for cloning to laptop's. To use ghost, or dd etc. required the original and target drives to be in the same machine. Presumably Chris wants to avoid opening the laptops up. -- Gary Stainburn This email does not contain private or confidential material as it may be snooped on by interested government parties for unknown and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
The problem is that the OP was for cloning to laptop's. To use ghost, or dd
etc. required the original and target drives to be in the same machine.
Presumably Chris wants to avoid opening the laptops up.
The newer versions of ghost allow you to burn an image file straight to CDR which you could then pop in the other laptops. Assuming of course that the laptops have CDR's in them matt -
On Wed, Jan 22, 2003 at 10:50:15AM +0000, Phil Driscoll wrote:
Both Gary and Mark have mentioned that the raw copy of a disk is best only used when the disks have identical geometry. I don't know the first thing about how the kernel drivers actually access the drives, but surely on a modern machine it's no longer by cylinder head sector any more? Isn't LBA the norm these days - and if that's the case, surely - for once :) - size matters, and not geometry.
LBA still pretends to use a C/H/S geometry, but not every drive or every BIOS interprets LBA in the same way. -- Mark Evans St. Peter's CofE High School Phone: +44 1392 204764 X109 Fax: +44 1392 204763
On Wed, Jan 22, 2003 at 10:10:48AM +0000, Phil Driscoll wrote:
On Wednesday 22 January 2003 8:48 am, Chris Puttick wrote:
I know I should be able to do this, but many years of using Ghost have made my brain go soft. Can someone talk me through cloning 12 identical machines? I was assuming something like tar, tftp and lilo, but the sites I found on the subject just confused me... I did this yesterday on my own machine when my main hard disk overheated and started making funny noises - however I had the new and old hard disks connected to the same machine.
All I had to do was dd if=/dev/hda of=/dev/hdb - although I had to do much agonising before hitting return just to make sure I was doing the copy in the correct direction. Note that this takes ages as you copy the entire disk surface, not just the area covered in files, and the destination drive has to be at least as big as the source.
Best only to try this disks having exactly the same geometry.
I've not done this over a network, but if I had to, my instinct would be to boot up a floppy based distribution (maybe keeper?) and arrange things so that I could see the source drive or a tar.gz image of it somewhere over the network, and then use the dd command to do the work.
Far more efficent is to create the file systems you want, then use "cp -a". Which will work with just as well with an NFS mount as a local HDD. Though you will need to then use a boot FDD/CDROM and run LILO. Does this help or do you need more details? -- Mark Evans St. Peter's CofE High School Phone: +44 1392 204764 X109 Fax: +44 1392 204763
participants (6)
-
Chris Puttick
-
Gary Stainburn
-
Mark Evans
-
Matt Johnson
-
Matt Williams
-
Phil Driscoll