LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   General (https://www.linuxquestions.org/questions/general-10/)
-   -   copying windows xp via a hdd backup to linux (https://www.linuxquestions.org/questions/general-10/copying-windows-xp-via-a-hdd-backup-to-linux-510522/)

dj2187 12-14-2006 06:38 PM

copying windows xp via a hdd backup to linux
 
how to i go about copying my hdd from my windows xp laptop to my linux laptop. i suspect it wont boot from my flash drive because the bootable file is not linux compatible. however, i would like to copy it. is there a special program?

jschiwal 12-14-2006 06:50 PM

Are you wanting the Linux laptop to store a file containing an image of your windows XP laptop, or do you want to replace the harddrive contents in its entirety which would wipe out linux?
the dd command is often used to make images of devices such as drives or partitions. You could boot up the Windows laptop using a linux live distro disk or a Linux rescue disk and copy the image to a Linux share. Or you could copy an image file to an external drive and then use the image file on the drive as the source from the linux computer.
( Note: either format such an external drive as ext3 or reiserfs instead of vfat32 in case the image file is larger than 2GB in size. )

dj2187 12-14-2006 08:59 PM

:confused: ok well i think i understand the image file part. problem is, my flash drive is only 1 gb. i know norton ghost can backup an entire hdd to a floppy disk than copy it over. i want something like that.

basically i want the windows laptop hard drive to clone entirely to the linux desktop.

jschiwal 12-14-2006 09:12 PM

I doubt that you will get your entire image file compressed that down to 1GB. If you boot up with a live distro or a linux rescue disk, you will be able to send the file over the network.
It might be a better idea getting an external drive of adequate size and saving the image there. Why do you want to save it on the linux desktop? Does your linux laptop have that much extra disk space to waste?

dj2187 12-14-2006 09:12 PM

well and plus whats linux live

dj2187 12-14-2006 09:14 PM

no what im trying to do is copy windows to the linux computer. i have no windows xp cd's and it takes days to download it, not to mention that its illegal. so basically i want my linux desktop to become a windows desktop. linux just isnt compatible with enough things, otherwise it would be a better operating system.

sn68 12-14-2006 09:17 PM

Quote:

Originally Posted by dj2187
well and plus whats linux live

Linux live is the OS which runs from removable media like CD/DVD etc and is preinstalled as image on the media so that booting from media provides full functionality of installed OS

dj2187 12-14-2006 09:24 PM

ok so its basically linux booting from a cd. what i really need is something that can copy my hard drive from my windows laptop to my linux one, wiping out the linux one entirely. i know its possible between 2 windows machines, in my computer class my teacher used to ghost like 20 hard drives to make them all the same. and he would use floppies. i need this except... windows hard drive on linux.

I realize that it wont boot as is because my linux desktop does not recognizxe exe files, and the backup i created was for windows.

my only solution seems to be to format the hard drive to nothing and then use this acronis backup to load the os from my laptop. ideally, it would copy the entire contents of my laptop, os and all.

sn68 12-14-2006 09:35 PM

What is being suggested here is
1. boot from live CD
2. connected to your windows machine
3. use dd command to transfer image of windows to laptop
(the OS installed on laptop does not matter since one is booting from CD)

However image transfer works only between machines of SAME specifications and will not work in your case since drivers needed for laptop are different.

jschiwal 12-14-2006 10:07 PM

So you want to start using the 2nd laptop using XP instead of the first. Are they identical. Copying an image instead of installing may not work. If the laptops were identical that would be another story. Also, your winXP transfered installation will notice the new hardware and may refuse to run until you call Microsoft for a code.

To transfer the image over the network, since you will be wiping out the Linux installation, you will need to run a live distro on both computers. Then either use netcat or setup a tcp pipe to transfer the image and write to the hard disk device. You can look in /usr/share/doc/packages/netcat/ if you have it installed on your linux laptop. One of the mods on this site had a oneliner that could be used to transfer data to another machine on the network. The ghost floppy disk that you spoke of would do the same thing, set up communications on the network and then send the image to clone. If it clones to 20 computers at a pop, then it is sending broadcasts and replicating the image that way.

Search this site for other threads which dealt with it. Here is one persons solution using ssh and dd to push an image onto a device.
http://www.linuxquestions.org/questi...t=tcp+dd+clone

dj2187 12-15-2006 02:42 PM

ok well i found an old hdd containing windows and i believe that dd can recover the data and image it the the functioning drive. i am just not sure as to the commands that i would need to use. The hard drive i have found is an unmountable volume and happens to be the one the computer had previously. as i said, i am relatively positive dd can copy from the old to the new, i am just unsure, however, how this works.

jschiwal 12-15-2006 05:26 PM

The easiest way to transfer an image is to install both drives onto the same computer. This isn't so easy with a laptop. Read the link I gave in post #10. The post #9 example might work.

There was a recent posting where the moderator gave an example of cat'ing through a tcp pipe. I think that you will be able to use google to search for examples of doing this using netcat as well.

You could also try this:

On the source laptop ( In this example, it's IP address is 192.168.1.100 ):
$ dd if=/dev/hda bs=512 | netcat -l 3333


For the destination laptop :

$ nc 192.168.1.100 3333 | dd of=/dev/hda bs=512



You need to run a live distro on both machines. On the source laptop because it doesn't have linux installed. On the destination laptop because you are overwriting the harddrive and need the drive offline.

The block size I chose is arbitrary. Maybe a different size is better considering that you are going through the network, or it may not be necessary at all.

Because in *nix, everything is a file, the dd command is not even necessary.

Laptop#1: cat /etc/hda | nc -l 3333

Laptop#2: nc 192.168.1.100 3333 >/dev/hda

I think that I would still use dd however. I might also pipe through gzip to add compression. If the drive is only 33% used that could save time for the transfer. If it is full, then I wouldn't bother.

If I were doing this I would use an external drive instead. The longer the transfer, the more likely you would have a failure. And transfering an entire disk image is a very long transfer.
The closest thing I have done like this is save a tar backup of my /home directory to a usb external drive. I used split so that each segment of the tarball was a more reasonable size and below the 2GB limit of fat32. Then I used par2 to add redundancy. I did this before installing a new distro version from scratch. I could extract from the achive by using cat and piping it through tar. This would even work for listing the contents of the archive.

Reference: http://www.g-loaded.eu/2006/11/06/ne...eful-examples/


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