LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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

Reply
 
Search this Thread
Old 12-09-2005, 09:06 AM   #1
hq4ever
Member
 
Registered: May 2004
Location: Israel
Distribution: Debian
Posts: 98

Rep: Reputation: 15
Linux live-cd to create HD copy over the LAN ?


Hi all, A consultation post with your permission:

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 help is welcome

Thank you,
Maxim.
 
Old 12-09-2005, 09:56 AM   #2
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
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.
 
Old 12-09-2005, 11:30 AM   #3
hq4ever
Member
 
Registered: May 2004
Location: Israel
Distribution: Debian
Posts: 98

Original Poster
Rep: Reputation: 15
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.

Thank you for reading.
 
Old 12-09-2005, 06:20 PM   #4
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
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.
 
Old 12-09-2005, 08:28 PM   #5
hq4ever
Member
 
Registered: May 2004
Location: Israel
Distribution: Debian
Posts: 98

Original Poster
Rep: Reputation: 15
Thumbs up

Quote:
Originally Posted by musicman_ace
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.

Exactly !

This is what I'm hoping to achive.

Any ideas ?
 
Old 12-10-2005, 04:36 AM   #6
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
<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.
 
Old 12-10-2005, 04:53 AM   #7
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
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.

http://visopsys.org/partlogic/about.html
http://www.sysresccd.org/
 
Old 12-10-2005, 05:04 AM   #8
hq4ever
Member
 
Registered: May 2004
Location: Israel
Distribution: Debian
Posts: 98

Original Poster
Rep: Reputation: 15
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.

Thank you for reading.
 
Old 12-10-2005, 05:58 AM   #9
hq4ever
Member
 
Registered: May 2004
Location: Israel
Distribution: Debian
Posts: 98

Original Poster
Rep: Reputation: 15
I believe I have found the solution (not tested yet)

Code:
dd if=/dev/hda bs=1k conv=sync,noerror | gzip -c | ssh -c blowfish user@hostname "gzip -d | dd of=/dev/hda bs=1k"
source : http://www.inference.phy.cam.ac.uk/s...artitions.html
 
Old 12-10-2005, 06:34 AM   #10
musicman_ace
Senior Member
 
Registered: May 2001
Location: Indiana
Distribution: Gentoo, Debian, RHEL, Slack
Posts: 1,555

Rep: Reputation: 46
Seems you ended up with the 'push' senario though. Let us know how it turns out.
 
  


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
DISCUSSION: Create your own custom Live Linux CD mchirico LinuxAnswers Discussion 2 11-23-2009 02:38 AM
Create your own Live Linux CD mchirico Linux - General 2 03-15-2005 07:38 AM
How do I create a bootable DVD of Suse Linux 9.2 live using Nero Burning ROM SE ??? chasgrundy Linux - Newbie 2 02-27-2005 05:09 PM
can copy-paste or create new file/folder, if boot from live cd gjo Linux - Distributions 3 09-17-2004 08:43 AM
May I create my own live cd without the Debian Linux? geraldomanaus Linux - Software 3 08-18-2003 12:43 PM


All times are GMT -5. The time now is 10:38 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