Maker Pro
Maker Pro

OT! OT! Hard Drive Cloning

J

Jan Panteltje

On a sunny day (13 Jan 2004 14:57:11 -0800) it happened [email protected]
(Harry Conover) wrote in <[email protected]>:

I've cloned both Unix and Linux system disks and found that you have
to shut down the OS and use a stand-alone utility program to do this
successfully, just as you had to do with VMS and Windows. (This is
precisely why the Red Cap distribution of Linux contains such cat /dev/hda > q1a
utility.)
I have Linux on my USB memory stick too, so I am free to plug
it in and copy anything to anything else (runs from ramdisk).
http://www.8ung.at/spblinux/
There is also the Knoppix CD that will give you a Linux running from the RAM disk.
But I think you are wrong abou this, I did copy that harddisk from my running system,
lets try:
mount
panteltje:~# mount
/dev/hda7 on / type ext2 (rw) < Linux is now running here
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/hda5 on /boot type ext2 (rw)
shmfs on /dev/shm type shm (rw)
/dev/hdb1 on /video type ext2 (rw)
/dev/hdb2 on /reiser type reiserfs (rw)
/dev/hda1 on /big type vfat (rw,uid=500,gid=100) < windows 98 disk
/proc/bus/usb on /proc/bus/usb type usbdevfs (rw)

cat /dev/hdb > q1
I do rw-r--r-- 1 root root 52105216 Jan 14 01:54 q1

I now do ctrl C, not enough space.
See it DOES copy:
ls -rtl q1
-rw-r--r-- 1 root root 53223424 Jan 14 01:56 q1
What error message.
You may get stuck when copying /proc/ or so...

See, you need some practice, throw out that MS windows,
get a real OS.

To make a clone hd for a new PC avoiding your fears, you could
take a PC, stick source HD in IDE2 master and the empty in IDE2 slave.
Or use your Linux memory stick.....
This is ultra cool stuff, it allows you to take over any system...
Just enable USB ZIPDRIVE boot in BIOS :)
 
C

Chuck Harris

Harry said:
Evidently you don't understand the problem, becaause neither Unix nor
Linux is capable of performing a cat operation on a file that has been
opened and is currently being used by another system process, such as
operating system itself. (Try it and you'll only get a remakably terse

Actually, it works just fine. If someone is in the process of writing
the file when you try to cat or copy it, it will just a copy of how
things were when the copy occurred.

I routinely do things like "tail /var/log/messages" to watch the
the messages that are dumping into my logs.

The safe way of doing a copy, is to umount the disk, and dd the disk to
the new disk. That way it doesn't matter whether the new disk has any
filesystem, or partitioning on it at all. dd doesn't care, it just does
a bit by bit, track by track copy of the source onto the destination.

dd /dev/hda /dev/hdb <-- note, no partition number!

and you now have an identical pair of disks.

But be warned, they will have the same partition tables, boot sectors,
everything... copy a 20 Gb disk onto a 40 Gb disk, and you will have a
20Gb disk with space you cannot access through the file system.

-Chuck Harris
 
T

Tom Del Rosso

In Chuck Harris typed:
The safe way of doing a copy, is to umount the disk, and dd the disk
to the new disk. That way it doesn't matter whether the new disk has
any filesystem, or partitioning on it at all. dd doesn't care, it
just does a bit by bit, track by track copy of the source onto the
destination.

Can you unmount your boot disk?

But be warned, they will have the same partition tables, boot sectors,
everything... copy a 20 Gb disk onto a 40 Gb disk, and you will have a
20Gb disk with space you cannot access through the file system.

So then do you have to install Windows and Partition Magic? ;-)
 
R

Robert Casey

Jim said:
I haven't done this in years, so could I have everyone's opinion for
best hard drive cloning software?
When I bought a new Maxtor drive, it came with cloning software that worked
pretty well. But as someone else pointed out in this thread, software
like this
may not do other manufacturers' HDs...
 
P

Product developer

Ross Mac said:
I have my system setup this way too...works great and in the event of a
total loss, you are back up and running in moments....I use Norton Ghost
2003 and it copies at about 1.8 gig a minute......Ross

Norton Ghost is a life saver! A clone a day keeps the shrink away.
 
S

Sir Charles W. Shults III

scandisk (noun) from scan + disk 1. A Microsoft utility typically seen
when starting Windows.
 
I

Iwo Mergler

Tom said:
In Chuck Harris typed:



Can you unmount your boot disk?

No, but you can remount it read-only. That guarantees
a consistent file system for the backup.

Regards,

Iwo
 
C

Chuck Harris

Tom said:
Can you unmount your boot disk?

No, but I can easily run linux off a single 1.44mb floppy and
use it to run dd.

If I want an exact clone of a disk, I just dd from the original to
the clone. If I want to transfer the contents of a partition, I
usually partition the new disk, and cat the old partition onto the
new, and run lilo if it is to be a boot partition.
So then do you have to install Windows and Partition Magic? ;-)

Nope, there are standard utilities in linux that allow you to extend
or collapse data filled partitions. There is never any good reason
to use a winblows anything. That is not to say that you aren't
sometimes forced to use windy doze, but being forced isn't a good
reason.


-Chuck
 
Harry Conover said:
Why? Because neither the Windows OS, nor Unix, Linux, or any other
current OS which I am aware since DG's RDOS (1978) provides a utility
or a command capable of true bit-for-bit, segment-by-segment disk
clonings.

Heh heh - you obviously have never used Apple Software Restore -
one of the all too few utilities that CAN actually make a bit-for-
bit copy (and I do mean _100%_ identical) of a disk.... It even
corrects the geometry when going to a different sized device. I
use backup drives that are about half the size because I don't
need to save lots of unused buffers, and I restore several times
a year, usually when IE croaks and scribbles all over my stuff..

Example - try to save a 200+MB JPEG file. IE wants to make a icon
from a thumbnail of it and needs more memory than it has, so it
just keeps going anyway, overwriting the os and who knows what else.

The only down side of ASR is its 4GB limit, which means one has to
keep most apps and data in some other partition(s)... and it doesn't
know pc filesystems, but it does handle Unix quite well.

Billy Y..
 
Paul Wylie said:
BTW: Has anybody had any experience dealing with tech support or sales
since Symantec finished assimilating PQ back in December?

Oh yes, definitely. It S U C K S.

If that's not clear enough, give them a call. First you'll be
forced to endure their sales pitch for paid support over the
phone. Nothing you dial will blow that lengthy, slowly spoken
message away. And you will get every thime you call, no matter
what, unless you pay, period.

Then, try to get actual answers out of anyone there. For example
ask them what "save the disk's signature" or whatever it's really
called means? They won't know. It's supposed to save whatever
XP writes on your disk to authenticate your use of it, by the way...

Or let's say you have a disk with a couple partitions you're trying
to restore, but all you're getting is errors or something unrealable
("can't enumerate directory..") after attempting to do that. Again,
they will be worth less than no help at all. They will start
talking about 'fixmbr' and all that crap, when they should be telling
you to simply run chkdsk -r on the damn thing, which will move every-
thing into the same one partition and at least get you something you
can then work with (by fixing boot.ini to point to the right partition).

That only takes a couple more hours for about 5 gigs worth of files.
After a 2+ hour restore due to the 16-bit scsi path....

How did I find all this out? By feeding some well-chosen key words
into various search engines. And it only took me maybe a week or
so, since I know (knew...) just about nothing about windows (when I
started this little project).....

Then there's PQ's claim they support JAZ drives via the USB port.
But that does not work when booted from the DI cdrom. Then they
use MS's crappy boot code which doesn't support very many SCSI and
such adapters either. It was only by pure luck that I found the
MS-included "sparrow" driver will work with a certain Adaptec
pcmcia (16-bit) card, so there went another US$99 down the drain
to Adaptec for one of those. Luckily at least Adaptec still sells
the damn things - you will not find anything that old in a shop
these days..... Searchhing the web I did find one vendor on the
entire planet with one, and oddly enough he is only a few miles
away from me - but he wants US$179 for the damn thing. Probably
cause he's sat on it forever already, heh.....

And speaking of law enforcement and what they use, the ones I know
suggested trying Atlanta Data Recovery's utility (a commercial
product) which would have been fine if the damn disk didn't die
before I could get a complete copy of it that way. They also do
reverse cloning (starting from the end of the disk, not the top
of it) which is good on drives where there are read errors at
the beginning of the media. The only problem with this otherwise
excellent tool is it doesn't know abouut XP filesystems (or whatever
that's called..) so you can't use it to look at or fix directories
and that sort of stuff.

Finally, take a look at http://www.logicube.com for an interesting
hardware-only approach to all this...

Billy Y..
 
Dave Baker said:
I had a 6 GB drive partitioned into 2 partitions, one with Win98 (1 GB) & one
with WinXP (5 GB)

This is exactly the sort of situation that will make one
seriously regret using DI to attempt to make a copy......

Billy Y..
 
I

Ian Stirling

In sci.electronics.design Jan Panteltje said:
On a sunny day (13 Jan 2004 14:57:11 -0800) it happened [email protected]
(Harry Conover) wrote in <[email protected]>:

I've cloned both Unix and Linux system disks and found that you have
What error message.
You may get stuck when copying /proc/ or so...

You cannot image copy an active filesystem, and be sure of having a
faithfull copy.

For example, if you delete a file half way through the copy, which has
half it's blocks on the first half, and half on the second, then
what happens?

At best, you'll end up with the file either corrupt or nonexistant after
a filesystem check.
At worst, it ends up in shreds, almost hopelessly corrupt.
 
C

clare @ snyder.on .ca

Norton Ghost is a life saver! A clone a day keeps the shrink away.

Except I've never been able to get Ghost to work on the USB external
ide drive, nor to copy from 1 small (1.8gb) drive to a large (8 gb or
better) drive and have the whole drive capacity available. I finally
gave up and resorted to Fdisking and formatting the drive, the
XXcopying the data and OS across. A couple extra steps, but I preserve
my sanity. ANYTHING from Symantec is a royal pain in the posterior -
particularly if you need what they have the gall to call "support".
 
Ian Stirling said:
You cannot image copy an active filesystem, and be sure of having a
faithfull copy.
For example, if you delete a file half way through the copy, which has
half it's blocks on the first half, and half on the second, then
what happens?

Well, if the directory has already been copied, and deleting something
just changes said directory to mark its blocks as free, and if nothing
else scribbles on said blocks in the interim - then nothing at all, not
a damn thing, happens...

But the usual person would not be attempting anything else whilst said
copy is in progress, right?

Billy Y..
 
B

Bob Nielsen

You cannot image copy an active filesystem, and be sure of having a
faithfull copy.

For example, if you delete a file half way through the copy, which has
half it's blocks on the first half, and half on the second, then
what happens?

At best, you'll end up with the file either corrupt or nonexistant after
a filesystem check.
At worst, it ends up in shreds, almost hopelessly corrupt.

You don't really want to copy /proc anyway, since it isn't really a
filesystem. From man(5) proc:

DESCRIPTION
/proc is a pseudo-filesystem which is used as an interface to kernel
data structures rather than reading and interpreting /dev/kmem. Most
of it is read-only, but some files allow kernel variables to be
changed.
 
I

Ian Stirling

In said:
Well, if the directory has already been copied, and deleting something
just changes said directory to mark its blocks as free, and if nothing
else scribbles on said blocks in the interim - then nothing at all, not
a damn thing, happens...

It's not quite that simple.
In most modern filesystems, the information about what blocks contain
a file is spread over the disk.
When a large file is deleted, this may need to be noted in many locations
over the disk.

Especially true if the file is fragmented.
Deleting half a file (or adding new ones, overwriting, or altering)
will cause errors on the next disk check.
At best it's benign, at worst it's not detected and causes corruption
in other files.
But the usual person would not be attempting anything else whilst said
copy is in progress, right?
Unless you've made the filesystem read-only, or taken the system into
maintainance mode (and verified that nothing else will run) normal
background activity can cause files to be changed.
 
K

Keith R. Williams

In Keith R. Williams typed:

I use it, and I've wondered if it defrags when moving or resizing. I
didn't think of checking when I last did it. What if resizing couldn't
be done without defragging? And if it does, then I would hope that they
do it in a way that's recoverable if there's a power loss or something
in the middle of the operation. (I know it's dangerous if moving a
partition and the new location overlaps the old.)

AFAIK, it doesn't defrag. It simply copies data structures from
one filesystem to the other.
I think the last statement was supposed to be PQMagic, right?

<blush> yes.
 
K

Keith R. Williams

I guess I'm still confused. Maybe I need to explain further.

I have an essentially full drive: the C-drive with all the files and the OS.
I know I could put the backup image on the same disk in another partition if
there was room, and then copy it to my removable drive. So what I was
asking was: how would I get the image directly onto the removable drive
with PQMagic and what would be the advantage of doing it that way as opposed
to using Dive Image?

I *think* the later versions of PQMagic will copy to true
removables (I.e. CDROMS), but I'm not sure. OTOH, if you're
talking about hard disks in caddies, yes it certainly will work.
Advantage? You can store multiple copies of the same partition
on the target drive. If you have PQMagic (doesn't everyone ;-),
the function is free.
Hope I haven't added to the confusion.

Nope. I hope I've been clear enough.

I've been using PQMagic since V1.0 was available (for OS/2 only,
BTW). I used it so much for work I had them buy me a
"professional license" of 3.0 (just shy of $1K, at the time). I
tried PQDI and PQDC to clone drives for system testing, but there
was no advantage over PQMagic and a lot of "issues". Since, we
have a corporate license for PWMagic (and I think PQDI), so I no
longer buy the licenses for work. If you can't get PQDC free (it
comes with some drives) it's not worth the effort and even then
it may not be worth it.
 
J

Jan Panteltje

You cannot image copy an active filesystem, and be sure of having a
faithfull copy.

For example, if you delete a file half way through the copy, which has
half it's blocks on the first half, and half on the second, then
what happens?

At best, you'll end up with the file either corrupt or nonexistant after
a filesystem check.
At worst, it ends up in shreds, almost hopelessly corrupt.
Not always a disaster, run fsck whatever, drop that file.
It is sane not to do anything else while performing such things...
But running from RAM with my USB memory stick with Linux, or as
others pointed out from a floppy with Linux, or using the CDROM drive
with Knoppix, you are 100% safe.
I have my memory stick and also Knoppix CD as rescue disk :)
It is a MUST (ever forgot your root password?)
I am always root (99%), always doing things with the system.
Last week I made a mistake, renamed /usr/lib/libc.so.6 (wanted
to link against some other version), but THAT was no longer possible,
as mv also uses libc, so nothing worked anymore.
Knoppix CD, boot from CDROM, mount old system, rename it back,
reboot, done.
It is all in the game, done in a minute, you can write in Usenet about it for days...
Rarely I make such a mistake (4 years ago I whiped out all of X11 dirs).
But I admit that for people new to Linux the learning curve is steep.
Once you get the hang of it, it is a great OS.
MS windows gets my blood pressure up very quickly, even if it was for
the ever 'reboot' do do anythying (I still run the old win98 for some progs
they forgot to port to Linux).
 
Top