Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm looking for a live-cd "boot & copy" solution for a workstation disk mirroring, the trick is that I wish to do this over the LAN.
Lets assume I have the right hardware, and my Ethernet card did got recognized by the kernel and all is working fine.
How would you copy a full hard drive ?
For now I'm using partimage in a server mode, but this has some significant drawbacks :
1. It copies "by partition", where as I wish to copy the full hard drive. The main problem here is that I need to dd out the boot sector from the old drive to the new one using a floppy or some other external media... It's not nice...
2. There must be a third "server" machine, with a LVM big enough to hold the whole partition of the source hd... It's not nice...
3. partimage is network intensive as it sends all the data through ssh (which is nice ! but not required in my situation).
So in general I'm looking for an "on the fly", over the network, hard drive copy method / tip / idea.
Of curse it should support ntfs (or at least fat)
any live CD should have the program dd. This can create disc images and assuming the LiveCD contains your network card driver, should be able to mount Samba, NFS or FTP the files to a network location.
You'll have to experiment with Knoppix, Gentoo Live CD, Ubuntu, or other Live Distros. Once you've got the network part working, I'd be shocked to find out that dd wasn't available. There are very good dd guides available. I have it saved as a favorite, but google dd+hard+drive+imaging and its bound to be one of the top results.
musicman_ace, I am well aware of dd, its a wonderful tool for local disk mirroring. Sadly I am failing ot understand how this can be done over the network.
You see, as far as I know, NFS SAMBA FTP and co. are user level tools, meaning you need an active file system for them to operate. I agree that this is the second best thing to low level data transfer (the way dd does it) but that does not help me.
Lets take a imaginary test case :
I have 2 workstations, both of them have 80 GB hard drives.
One of the workstation has windows XP on /dev/hda1 & Linux on /dev/hda2,3,4 -|- The other workstation on the other hand has an empty drive.
If I would follow your suggestion above, I would need to manually go to the second workstation, mimic the partition setup on the first workstation, mount the partitions to an NFS mount, and then start copying the files. At the end I would need to dd if=/dev/hda of=/tmp/bootsector.bin bs=512 count=1 and then dd it back in on the second computer.
certainly not the quick "boot & copy" solution I am hoping for.
I guess I misunderstood the question. I'm assuming your operating from the local workstation, not the server. In that senario, creating a local mount point via Samba/NFS, you'd be able to use dd. The FTP solution would require an extra step and assumes the server has FTP.
Also after re-reading your post, it sounds like you might not being storing the images on a network server, but rather using the local hard drive and cloning it to another machine over the network.
Also after re-reading your post, it sounds like you might not being storing the images on a network server, but rather using the local hard drive and cloning it to another machine over the network.
<edit> The use of the word image really doesn't apply, but I didn't know how else to ask this question</edit>
My next question is...
Are you wanting to pull an image while your working from the "blank" workstation, or push an image while working from the "working" workstation.
I'd imagine you'd have to have a PXE compliant network so the "blank" workstation can have limited network functionality, but I'm not sure of a bootable image to host on the bootp server in that senario.
I'll get with my brethren and see if we can come up with something.
Last edited by musicman_ace; 12-10-2005 at 04:38 AM.
Well that was a quick answer, but it is also an un-tested one.
My friend said both of these programs supported networking, but didn't know if they'd do what your asking. He hadn't tried, and I don't have the testbed to try it on either. My only guess is that you'd have to boot either of these CDs on the "blank" workstation, mount your target workstation's / directory and then image from the share /dev to the local /dev.
I assume that pull we be the easier solution, both to the implementer and user.
The way it should work is probably by :
1. Starting the clone-HD application in server mode from the live-cd on the source workstation. The server will start broadcasting a udp message in the form of "I am workstation foo, and I have size X device(s) available for cloning"
2. Starting the clone-HD application in client mode from the live-cd on the target computer, then selecting the requested device, and initiating the cloning process over the network...
The communication should of curse go tcp (unlike the expected udp) because data integrity is important.
I would really love to hear any ideas on this subject, whether an written application, or pointers & thoughts on how to implement this on my own.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.