-
Cloning a harddisk
First off, i am more experienced in using Windows (all flavors since 3.1) than in using Linux.
Not that i'm 100% new to Linux, i have been working with Linux every now and then and i know some of the basics, but Linux still does hold a lot of secrets for me, especially the CLI commands do because there are so much of them.
I have done a search on this forum and read the FAQ here, but i couldn't find anything that seems to aplly to my problem.
Now that you know a bit about my background, here's my problem:
I have two equally sized harddisks (160GB), i'll call them #1 and #2.
#1 is starting to decay rapidly, so i want to move all my data over to #2. My question now is; is there a command or program that comes on the Knoppix CD (using 3.2 now) and that lets me clone an entire harddisk from one HDD to another? Maybe something that works like Norton Ghost.
On #1, i use Xp, i have both Fat, Fat32 and NTFS partitions, the MBR should be copied too, if possible.
#2 is clean, there is not even a partition table present.
I am getting rather desperate because i have a lot of data on my harddisks that i definitely do not wish to lose.
I really hope that someone can (and wants to
) help me here because i may lose all my data soon....
-
Open a terminal (konsole or rxvt etc) and type:
apt-cache show parted
That will give you a description of parted (partition manipulation program). If you want a gui parted version - try qtparted.
Cheers
rob
PS g4u - is another way of doing it: http://www.feyrer.de/g4u/
-
Junior Member
registered user
DD
You can try using the command "dd". If the disks are identical (excactly same size down to the byte) you can simply do a "dd if=/dev/hda of=/dev/hdb" that will write all the contents of /dev/hda to /dev/hdb. WARNING all data on the of=/dev/xxx drive will be overwritten!
-

Originally Posted by
monkymind
Open a terminal (konsole or rxvt etc) and type:
apt-cache show parted
That will give you a description of parted (partition manipulation program). If you want a gui parted version - try qtparted.
Cheers
rob
PS g4u - is another way of doing it:
http://www.feyrer.de/g4u/
Thanks for the suggestions monkeymind, but it seems like Knoppix 3.2 does not have qtparted on board, but if it does, where would i be able to find it? I mean the path, or the location in the KDE start menu.
After looking through the readme of parted, it looks like parted is a program for manipularting individual partitions, what i really need is a track and sector copy program to make an idential copy of the old harddisk to the new one in one go.
g4u is not an option, my system does not meet the system requirements.
Again, i appreciate your input, but it seems that this is not the type of program/command that i was looking for.
-
Re: DD

Originally Posted by
tommydl
You can try using the command "dd". If the disks are identical (excactly same size down to the byte) you can simply do a "dd if=/dev/hda of=/dev/hdb" that will write all the contents of /dev/hda to /dev/hdb. WARNING all data on the of=/dev/xxx drive will be overwritten!
Yes, the disks are identical, in the sense that it's the same brand, type and size.
Before i dare trying this, i need to be 100% sure about something.
HDD #1 is the primary slave and #2 is the secondary master.
I think that means that #1 is /dev/hdb and #2 is /dev/hdc, correct?
And how about error handling? Can it ignore bad clusters and/or read errors?
Oh, and overwriting HDD #2 is exactly what i want, thanks for the warning though.
I'm really scared to screw this up as you can probably tell, so please forgive me my insecurity and apperhensiveness.
-
Senior Member
registered user
sorry no. dd will make a 100% copy of the errors aswell... there are not many programs able to reliably recover those data, atleast not below 5k euro, and then not 100%gaurantee, sorry.
hmm, where did my earlyer reply go?? oh well.
-

Originally Posted by
OErjan
sorry no. dd will make a 100% copy of the errors aswell... there are not many programs able to reliably recover those data, atleast not below 5k euro, and then not 100%gaurantee, sorry.
Copying the errors would be okay i guess, i have other (Windows- and DOS based) programs that may be able to recover some lost data.
As long as DD does not freak over bad clusters and such, i would be very, VERY happy.
hmm, where did my earlyer reply go?? oh well.
I think it's got eaten by the moof-monster. 
Oh, almost forgot, was i correct in assuming that the primary slave is /dev/hdb and the secondary master is /dev/hdc?
I am very nervous about trying anyting now, i have tried other things and it didn't work. I am so afraid of losing what's left of my data, i can hardly think straight....
-
Senior Member
registered user
why not check? do that should give some info. and if you then do a check to see which disk has which files... might help some aswell, perhaps can give some further info. if you do these it should become clear which disk is which. if not. ask and i will try to answer.
btw, as long as dd gets input it SHOULD not crash, if the disk otoh has i/o issues... it might.
-

Originally Posted by
OErjan
why not check? do dmesg |grep hd that should give some info. and if you then do a check to see which disk has which files...
Thank you, when i do dmesg |grep hd i get this (trimmed the report a bit for readability):
Code:
ide_setup: hda=scsi
ide_setup: hdb=scsi
ide_setup: hdc=scsi
ide_setup: hdd=scsi
ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:pio, hdb:DMA
ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:DMA
hdb: WDC WD1600JB-00EVA0, ATA DISK drive
hdc: WDC WD1600JB-00EVA0, ATA DISK drive
hdb: 312581808 sectors (160042 MB) w/8192KiB Cache, CHS=19457/255/63
hdc: 312581808 sectors (160042 MB) w/8192KiB Cache, CHS=19457/255/63
So, if i understand correctly, the system sees both harddisks. What i don't understand is why the report says "hdX=scsi", is that standard? (i hope it is)
fdisk -l might help some aswell,
It tells me the following:
Code:
Can't open /dev/hdc
Can't open /dev/hdb
I'm not sure what that means, does it mean that those disks are present but not mounted?
perhaps mount can give some further info. if you do these it should become clear which disk is which. if not. ask and i will try to answer.
Mount seems to show the mounted disks only and i haven't mounted the harddisks (yet) because i am just too afraid to damage anything, even though i do know that mounting them from KDE only mounts them in read-only mode.
btw, as long as dd gets input it SHOULD not crash, if the disk otoh has i/o issues... it might.
Well, thank you for making me even more nervous!
-
Senior Member
registered user
sorry, i just say it might, not likely but... and if you have important stuff not yet backed up to oter edia i would reomend leaving the disk to a profesional recovery lab. the cost is high but it is safest i can give advice on, if you do not have the budget... what will you loose?
Similar Threads
-
By ferrel in forum General Support
Replies: 2
Last Post: 07-02-2005, 01:39 PM
-
By eon in forum General Support
Replies: 6
Last Post: 04-02-2005, 11:14 AM
-
By drjawn in forum General Support
Replies: 10
Last Post: 01-17-2005, 12:23 PM
-
By xeoron in forum Hdd Install / Debian / Apt
Replies: 5
Last Post: 09-03-2004, 10:31 AM
-
By MethodMan in forum Hdd Install / Debian / Apt
Replies: 0
Last Post: 08-30-2004, 09:25 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Dell 6P85J 4TB ST4000NM0063 7.2k 6Gb/s 3.5” SAS SED Hard Drive with Tray
$39.99

Western Digital HUS726T4TAL5204 4TB 7.2K SAS 12Gb/s 3.5" 512e HDD NetApp X375A
$64.00

DELL 2TB Enterprise HDD (7200RPM, 3.5", SATA III, 128MB Cache) HUS722T2TALA600
$49.95

(ST8000NM0045) SEAGATE ENTERPRISE 8TB 7200RPM 4Kn SATA 6Gb/s 3.5" HARD DRIVE
$199.99

Seagate ST500DM009 BarraCuda 500 GB 3.5" SATA III Desktop Hard Drive
$14.99

Seagate ST4000NM0034 Enterprise 4TB 7200RPM SAS 12Gb/s HDD v4
$39.00

Dell ST6000NM0034 1HT27Z-150 NWCCG 6TB SAS 3.5 7.2K ENTERPRISE SERVER DRIVE
$68.99

HGST HUS724040ALA640 HDD 4TB SATA 6Gb/s 7.5K 3.5" 0F19459 512 b/s
$78.00

Seagate ST8000NM0075 Enterprise Capacity 3.5 HDD 8TB SAS Hard Drive 8TB EXOS
$184.99

Seagate ST12000NM0127 12TB 256MB 7200RPM 3.5" SATA 6.0Gb/s Enterprise Hard Drive
$318.99