LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 08-19-2003, 02:03 PM   #1
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Question Cloning from working pc to black harddrives


Ok, at the moment I currently have 1 pc containing a Win98SE FAT32 40gig drive with 3 partitions, and a 20gig linux drive containing 5 partitions. I also have cd and cd-rw drives.

I'm planning to buy a second pc, almost identical stats, and wish to clone the windows install at least, so I dont have to bother re-install. I might clone the linux one and edit a few drive and monitor settings, as it'll be hard to repatch a fresh install (I could get some more cds to burn the packages on to).

So my questions is: How can I copy one drive's contents exactly onto another if I cant have linux and the two windows drives in the pc at once, and cant copy the windows data onto the linux drive temporarily?
Could I put a few apps on a floppy? Would a non-harddrive-using linux distro be the answer? Can I remove one of the cd drives to attach the new harddrive?
And what problems might I encounter?
 
Old 08-19-2003, 02:40 PM   #2
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
Take a look at:

http://www.partimage.org/

http://www.gnu.org/software/parted/

http://qtparted.sourceforge.net/
 
Old 08-19-2003, 04:00 PM   #3
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Original Poster
Rep: Reputation: 116Reputation: 116
And how exactly are they going to help if I dont have 30+ cds to feck with to copy 40 gigs, or not being able to have a linux drive connected at the time?

Partimage: Are empty blocks not important when trying to ensure the windows clone works straight off?-Swap page file etc.

Parted: Will the boot disk simply try to boot a linux drive, or run a stand alone tiny kernel and then parted?

QtParted: Gui not needed, and seems very beta.

Can I not replace a cd drive with the new harddrive and then move data? I'd like to not break my working system swapping these things about.
 
Old 08-20-2003, 04:41 PM   #4
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Original Poster
Rep: Reputation: 116Reputation: 116
Anyone, simply questions: Can I have 3 harddrives in my pc at once with my current system?
 
Old 08-21-2003, 12:45 PM   #5
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
usually you can have 4 IDE devices (harddisk, cdrom, dvd, burner )

modern borads have 1 primary ( master + slave device possible ) and 1 secondary ( master + slave device possible ) controller.
 
Old 08-22-2003, 12:29 AM   #6
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Original Poster
Rep: Reputation: 116Reputation: 116
Thank you.
I spoke to the guy I'm ordering my custom pc from, and he's talked me through how we're gunna try this.

If I change a cd drive for a hard drive, what will I need to change apart from /etc/fstab?
 
Old 08-22-2003, 12:35 AM   #7
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Try looking at the command dd.

Its usually used to copy boot blocks, but I have used it to clone harddrives before.

dd -if=/dev/hda -of=/dev/hdc cbs=1048576

Copy a meg at a time from device at hda to hdc.

This is a Block for Block copy, SO Its best if both devices are the same size.

Its best to boot from something else to do this, as it won't interfere with your set up then, a rescue disk should do (It'll probably have the command dd as well)
 
Old 08-23-2003, 05:21 AM   #8
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
>modern borads have 1 primary ( master + slave device possible )
master: /dev/hda
slave: /dev/hdb
>and 1 secondary ( master + slave device possible ) controller.
master: /dev/hdc
slave: /dev/hdd

you migh want to buy/borrow an additional PCI IDE card for even more devices ( /dev/hde, /dev/hdf, etc.) or disconnect a cdrom/burner device and attach a HDD there
 
Old 08-23-2003, 01:20 PM   #9
liontech2002
LQ Newbie
 
Registered: Aug 2003
Location: Vermont
Distribution: Slackware 9, SuSE 8.2, Redhat 9, Xandros 1, Knoppix 3.2
Posts: 6

Rep: Reputation: 0
XCOPY C:\*.* /s /v

This command on a Dos or Win 3.0 - 98se (include the destination drive letter at the end [a formated and active (bootable) fat32 partition] after booting to a command prompt only will do what you want. I am still a newbie to linux so i can't give you a command for that yet. Hope this helps.

 
Old 08-23-2003, 06:12 PM   #10
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Using CDs are ugly when making an image of a 10 gigabyte hard drive or bigger. Who wants to shuffle around with about 20 or more CDs. I suggest buying a 120 gigabyte hard drive or bigger. A 5400 RPM hard drive will be just fine. For each drive or partition make an image to the 120 gigabyte hard drive or to the biggest hard drive.

When using dd, make sure you un-mount the input and output drives first for a block to block copy. If you are outputting to a file, you only need to un-mount the input drive. Not all filesystems work with dd.

You can copy all your LINUX configurations files to a few floppies. With Windows, you have to resort to disk imaging for a perfect copy. xcopy sometimes work perfectly.
 
Old 08-25-2003, 02:26 PM   #11
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Original Poster
Rep: Reputation: 116Reputation: 116
Ok, so what'll happen if I use dd and the target drive/partition is larger than the source?

Is Windows's XCOPY command reliable for copying a running Windows partition to a new drive?

I'm thinking I'll get a nice 70 or 80 gig 7200rpm drive for linux, not sure if i'll stick windows as the first OS on it, or risk re-using a 4 year+ old drive. Either way I could be badly screwed if a drive fails. Would a second new ~30gig drive be worth it for just windows?
 
Old 08-25-2003, 06:07 PM   #12
liontech2002
LQ Newbie
 
Registered: Aug 2003
Location: Vermont
Distribution: Slackware 9, SuSE 8.2, Redhat 9, Xandros 1, Knoppix 3.2
Posts: 6

Rep: Reputation: 0
DOS/WIN XCOPY or XCOPY32

Yes it is reliable, I have used it many, many times in the past 12 years as a PC technician. It is not an image copy or block for block copy, and won't work on NTFS partitiions. For DOS FAT or FAT32 it is fine. After copying file for file (*.*) you just run FDISK and make the new partition HD active. If it didn't boot after that, just boot up to a WIN system disk and use the SYS C: command to reintall the system files. You can also use FDISK /MBR in case the master book record is not working right. These additional steps should not be needed as long as the newly copied file system resides on the first partitiion of the first hard drive in the system when it is booted up for the first time. And will work fine as long as the Windows registry or startup files aren't making calles to other drives or partitions that are no longer in existence at the same drive letter specs.

Hope this helps.
 
Old 08-25-2003, 08:28 PM   #13
AltF4
Member
 
Registered: Sep 2002
Location: .at
Distribution: SuSE, Knoppix
Posts: 532

Rep: Reputation: 31
first create and format your destination partition on your new HDD

after that you can:

1) use xcopy

2) mount both partitions under linux and use "cp -R" (man cp) to copy the entire structure
e.g.
### log on as root
### create source & destination
mkdir /dos1
mkdir /dos2
### mount source partition read-only
mount -r -t vfat /dev/hda1 /dos1
### mount destination partition
mount -t vfat /dev/hdc1 /dos2
### go to source
cd /dos1
cp -R * ../dos2
###or if you are paranoid:
find . -depth -print | cpio -pdvm ../dos2

3) use "partimage" etc. under linux

4) use commercial cloning tools like "partition magic" under dos

dd is unlikely to work and possibly dangerous if you do not REALLY REALLY know what you are doing :-)
 
Old 08-26-2003, 06:51 PM   #14
rocaddict
LQ Newbie
 
Registered: Aug 2003
Distribution: Mandrake
Posts: 2

Rep: Reputation: 0
Wink Re: XCOPY C:\*.* /s /v

Quote:
Originally posted by liontech2002
This command on a Dos or Win 3.0 - 98se (include the destination drive letter at the end [a formated and active (bootable) fat32 partition] after booting to a command prompt only will do what you want. I am still a newbie to linux so i can't give you a command for that yet. Hope this helps.

Don't forget the /a to catch any hidden files.
SYSTEM.DAT and USERS.DAT come to mind
 
Old 08-26-2003, 08:40 PM   #15
liontech2002
LQ Newbie
 
Registered: Aug 2003
Location: Vermont
Distribution: Slackware 9, SuSE 8.2, Redhat 9, Xandros 1, Knoppix 3.2
Posts: 6

Rep: Reputation: 0
Talking

Oops, yeah sorry that would not work right without /a...

 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
cloning cpvjagadeesh Linux - Software 1 04-11-2005 05:09 AM
Cloning OS madetheswitch Linux - Software 4 01-03-2005 03:09 PM
cloning with DD and NC scoob8000 Linux - Software 3 11-12-2004 11:34 AM
Installing BCJ-80 printer caused X to stop working - black screen davespod Linux - Hardware 0 06-07-2004 03:27 PM
Black Shades, looks interesting but not working lets-eat-gary Linux - Games 3 10-18-2003 11:28 AM


All times are GMT -5. The time now is 12:52 AM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration