cp /dev/hda3 /dev/hdb3

Jan Kokoska kokoskaj at seznam.cz
Mon Oct 11 13:01:51 UTC 2004


On Mon, 2004-10-11 at 05:28 +0200, wrote:

> A)Why did cp /dev/hda3 /dev/hdb3 mess up hda3

This is an insane thing to do. "cp" is for files and direcotries on a
mounted filesystem. Trust rather manpage than Usenet.

Use GNU parted to move your partitions as in "parted /dev/hda",
"move /dev/hda3 /dev/hdb3" after making the /dev/hdb3 partition, which
you can from parted already.

> B)How do I fix the partition table or what ever so that linux knows its an
> ntfs partition?

Well try to mount it as ntfs if you have the support in your kernel...
alternatively just read it with less.. if you page through the garbage
and see strings you would expect on the ext2 partiton, you are in
trouble and the ntfs partition is gone. If not, try switching the
paritition type using cfdisk/fdisk and check the partition layout too
(numbering and sizes). If this is the same as originally and type is
ntfs and you can't mount it and windoze doesn't recognize it either and
CHKDISK in windoze fails then I am afraid you have lost the data.

Try these, be optimistic, make backups (next time..) and read "man
parted".

Regards,
Jan





More information about the ubuntu-users mailing list