LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-19-2006, 07:52 AM   #1
Shioni
Member
 
Registered: Mar 2006
Posts: 182

Rep: Reputation: 30
Cloning a hard drive!


Hi!
My friend has two computers, one is running XP other Win2000, I want to install Linux on the first one. But my friend doesn't want to lose all Win software, so I decited try to clone HDD. I think both of these HDD has NTFS. Can I just clone it using live CD like this?:
Code:
dd if=/dev/hda of=/mmt/hda2/hdd.iso
and then put it on the Win2000 box and somehow using dd, write it on the disk? is this posible? Thank you!
 
Old 03-19-2006, 08:14 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Yes, but you might want to use partimage as a solution instead;

http://www.sysresccd.org/Main_Page
 
Old 03-19-2006, 09:25 AM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
A LiveCD is totally adequate for the job as documented in the first link of my signature.

Basically you can clone the whole disk if the target is equal or bigger than the source disk. In any case you can clone the partition alone in any other situation.

In cloning with "dd" command the target disk will boot too.
 
Old 03-19-2006, 10:20 AM   #4
Shioni
Member
 
Registered: Mar 2006
Posts: 182

Original Poster
Rep: Reputation: 30
Thank you! I downloaded SystemRescueLiveCD, now the only problem is that PartImage says:
Code:
NTFS Windows NT, 2000 and XP experimental
Both hard drives use NTFS. And another problem.
The used space on the first machine is 9GB, I need to copy that. The disk is 50GB size. The second machine has 250GB disk. First I will put in the live CD and then clone the whole drive and make ISO file. Then I will 'burn' everything on the second machines hard drive. Can I run into any problems with this? for example, the second machine will show, that the hard drive is only 50GB? Thank you!
 
Old 03-19-2006, 10:44 AM   #5
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Never had a problem with partimage (but your mileage may vary). To be sure why not do both, the 'dd' file will be about 50-gig in size.

You may want to make sure the filesystem your recording the backup images (partimage or dd) can handle large files (greater the say 4-gig).
 
Old 03-19-2006, 10:44 AM   #6
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 113Reputation: 113
The thing to remember is if play around with NTFS files the Linux programs are experimental only and may break down.

If you use "dd" then the partition is copied natively in 1s and 0s and no filing system is involved. That is why Linux can clone XP and still makes it bootable even officially it can write on a NTFS partition. The downside is since no filing system is used you don't get a compression. In your case the whole of the 50Gb will be mirrored unless the your XP is in a smaller partition. At 50Mb/s transfer rate obtainable from dd a 50Gb cloning should take about 1000 seconds which isn't much.

What you can improve on is to use a modern LiveCD with QTparted inside to "resize" the XP partition to a smaller size, say 10 or 12Gb. Both Kantotix and Knoppix have QTParted inside the LiveCD. As a rule you should defrag XP before resizing it.

In your case I would clone the partition, say from hda1 to hdb1 by a simple command
Code:
dd if=/dev/hda1 of=/dev/dev/hdb1 bs=32768
The block size 32768 is a product of 64 sectors times 512 bytes per sector, making one full track being cloned at a time. Not providing a size for bs then dd will default to 512 byes. You still have a full 250Gb in the hdb no matter what you do.
 
Old 03-19-2006, 11:39 AM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
And, say... most motherboards have two IDE-chains which means that you can have three hard-drives in addition to the CD-ROM. If you took the approach of adding a third drive for Linux, you could do the work without altering this somewhat-complex XP configuration in the slightest.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cloning different sized hard drives? jaykup Linux - General 3 03-10-2006 01:42 AM
Hard drive cloning sabeel_ansari Programming 2 02-14-2006 01:40 PM
Cloning a hard drive davcefai Debian 3 11-28-2005 05:36 PM
Cloning Hard Drive rls Linux - Software 3 08-23-2003 02:32 PM
cloning hard drives with RH8 willcox Linux - Hardware 0 06-10-2003 07:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration