LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
LinkBack Search this Thread
Old 11-02-2007, 08:01 AM   #1
neu2linux
Member
 
Registered: Mar 2007
Location: Albuquerque, NM
Distribution: Debian, Slackware, Ubuntu
Posts: 46

Rep: Reputation: 15
what is the best way to mirror a hard drive.


My brother has an "older" dell laptop (PIII) that is simply too slow. At the moment it has Windows 2000 installed on the 8GB hd. I want to add an 8GB partition an external hd that I have and mirror the M$ installation to the new partition. Then wipe his drive clean and install debian. I want the backup in-case he still doesn't like it. That way I can mirror the M$ install back onto the hd for him to sell. What is the best program to do this? (Linux or Windows).
Any input is appreciated. Thanks.

*EDIT* The reason that I ask, is that I do not have a Windows 2000 install disk.

Last edited by neu2linux; 11-02-2007 at 08:05 AM.
 
Old 11-02-2007, 08:29 AM   #2
farkus888
Member
 
Registered: Oct 2006
Distribution: usually use arch
Posts: 103

Rep: Reputation: 15
check out the thread here on learning dd. might be a good start, there are also commercial apps like ghost that create a proprietary compressed image of a partition, but they cost money.
 
Old 11-02-2007, 08:34 AM   #3
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,183

Rep: Reputation: 98
I would use dd and do a raw copy of the hdd to a file on the external hdd:
Code:
dd if=/dev/hda of=/media/disk/windows.bak.img
Edit: didn't realise someone had already answered, that'll teach me to watch films while reading forums.

Last edited by phil.d.g; 11-02-2007 at 08:35 AM.
 
Old 11-02-2007, 08:36 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: back to Arch
Posts: 16,658

Rep: Reputation: 425Reputation: 425Reputation: 425Reputation: 425Reputation: 425
You want the dd command. In your case, you'll need to run from a live CD. You can clone the whole drive, or just a partition. In your case, I think you want the whole thing--mbr, etc.

The simplest example would be:

dd if=/dev/xxx of=/dev/yyy

xxx is the internal drive (as seen by the liveCD Linux--do fdisk -l to make sure what device names to use)
yyy is the external drive (ditto)

This copies with the default block size (512) until there is no more data. You can make it faster with a larger block size.
 
Old 11-02-2007, 08:43 AM   #5
neu2linux
Member
 
Registered: Mar 2007
Location: Albuquerque, NM
Distribution: Debian, Slackware, Ubuntu
Posts: 46

Original Poster
Rep: Reputation: 15
Thanks for the replies. I'll try the dd command tonight and post back. Thanks.
 
Old 11-02-2007, 10:05 AM   #6
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,285
Blog Entries: 1

Rep: Reputation: 103Reputation: 103
Re: what is the best way to mirror a hard drive

dd is a very slow solution for copying file systems. I use partimage to backup and restore partitions and it is very quick because it compresses on-the-fly and it can also skip over empty space in the partition.

If you create a partimage image and then restore it, you will probably save yourself several hours of waiting for dd. Also, partimage displays its progress. If you want to measure the progress of dd, you have to repeatedly run "ls -a", or the equivalent.

I have backed up 8 GB partitions to a drive over the network that only took 30 minutes. That would have been a several hour long job with dd.
 
Old 11-02-2007, 01:42 PM   #7
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,183

Rep: Reputation: 98
partimage support for NTFS and Windows 2000/XP is experimental. dd doesn't care what the file system is because it is a raw copy. For transferring over a network you would do well to pipe the output of dd through gzip or bzip2
 
Old 11-02-2007, 03:45 PM   #8
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,285
Blog Entries: 1

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by phil.d.g View Post
partimage support for NTFS and Windows 2000/XP is experimental. dd doesn't care what the file system is because it is a raw copy. For transferring over a network you would do well to pipe the output of dd through gzip or bzip2
I have been using the "experimental" support for over a year now. It is rock solid. I have been able to backup and restore every type of NTFS partition without any problems.
 
Old 11-02-2007, 05:00 PM   #9
badbrass
LQ Newbie
 
Registered: Nov 2007
Posts: 0

Rep: Reputation: 0
> dd is a very slow solution for copying file systems.

Yep, sure is if you use a small block size. Use a big one,
like 'bs=4096000'. Much faster.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving files from a Linux hard drive to a Windows Vista Premium hard drive WolfMan51 Linux - Hardware 5 07-12-2011 09:19 AM
Ubuntu: Installed to external hard drive; boot to primary hard drive gives error 22 dcorb62 Linux - General 7 09-04-2007 11:28 PM
Can I use Linux to mirror windows onto an external hard drive? Yoshimitsuspeed Linux - Newbie 4 04-28-2006 06:58 PM
mirror 2 hard disk under suse kafnir Linux - General 1 05-11-2005 12:17 AM
2 hard drive in system mirror 1st hard drive sburns76247 Linux - General 2 12-21-2004 01:47 AM


All times are GMT -5. The time now is 05:56 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration