LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 02-15-2008, 07:06 PM   #1
richinsc
Member
 
Registered: Mar 2007
Location: Utah
Distribution: Gentoo Linux (3.0.6-gentoo)
Posts: 222

Rep: Reputation: 31
Easy Way to copy machines? POST HERE!!


I am looking for an easy solution to build several Debian machines. Just wondering what peoples experiences with that are. All the machines will be exactly the same hardware configuration and will have the exact same Debian install.

I was thinking about ghosting all the HDD's but then I think I would need to re-install grub (in theory). I have only ghosted HDD at work with windows vista and ghost doesn't seem to pull MBR. I would then need to change the hostnames on all the machines, and I think that would be about it. But want to know if other people have done this and what their experiences have been?

Currently going to setup 10 machines and see how things go and then expand that to many more.

Of course I also could to a disk dump with dd=/dev/hda command... Would likely have same result?

Suggestions Extremely Welcome!!
 
Old 02-15-2008, 07:16 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,264

Rep: Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027Reputation: 1027
Clonezilla
 
Old 02-15-2008, 07:23 PM   #3
richinsc
Member
 
Registered: Mar 2007
Location: Utah
Distribution: Gentoo Linux (3.0.6-gentoo)
Posts: 222

Original Poster
Rep: Reputation: 31
Of course, but I would also verify the information I receive before applying it.. Just common sense, the machines in question though are brand new. I will install Debian on one machine and then copy the resulting configuration to the other machines.
 
Old 02-15-2008, 08:11 PM   #4
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,675

Rep: Reputation: 122Reputation: 122
Use the dd command:
Code:
dd if=path/to/orginal/disk of=path/to/clone/disk
Suppose your original disk is at /dev/hda and you've connected the destination disk (where the clone goes to) at /dev/hdd. The command would be:
Code:
dd if=/dev/hda of=/dev/hdd
To see if anything is misplaced, use the diff command:
Code:
diff file1 file2
Assuming the above, this command compares both disks:
Code:
diff -adr /dev/hda /dev/hdd (read the man page for diff to learn what the options do)
Mind you, this will take some time! This command should return no errors. If there are, correct them manually and re-run the diff command. If you get so much errors they whizz by on your screen and you can't see them all, change the command to
Code:
diff -adr /dev/hda /dev/hdd > diff.txt
and re-run. Now you should be able to read the file diff.txt (in the current directory) to see which files don't match.

Also note that the best way to do this is from a Live-CD (like Knoppix or Ubuntu) as the contents of your Debian install will change while using it. This will cause errors during cloning or checking.

Last edited by Dutch Master; 02-15-2008 at 08:16 PM. Reason: typo's
 
Old 02-15-2008, 08:18 PM   #5
richinsc
Member
 
Registered: Mar 2007
Location: Utah
Distribution: Gentoo Linux (3.0.6-gentoo)
Posts: 222

Original Poster
Rep: Reputation: 31
Thanks much exactly what I was wondering and mostly likely would be a better and Free Solution to what i am trying to accomplish...
 
Old 02-17-2008, 01:34 PM   #6
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 49
With 2 matching Systemrescue CD's, cd disks, (open source, free .iso)

can use 'em to boot each of 2 mach off of (from) one of those CD's (each mach boots from CD)

There is a partition copier/cloner tool on such cd which does or accomplishes said task via or across the network/lan

Using the part. tool, the already setup mach you start the part. tool with a command line parameter for "this mach. is the server"

Doing same with receiving mach. the difference is that when start the part. tool, use command line parameter for "this mach. is the client" (receives the server's so called service)

Before doing the above, use the tool on cd to copy the HD partition table and then get same (part. table) replicated onto the receiving mach.

Yes, this way, it must happen a partition at a time (and the part. table must be first of all replicated onto the receiving mach.). But if you have not too many partitions then this method has worked nicely for me.
--

Alternate, not open source: Acronis True Image

I have the Home edition of the above.

On Slackware it (Acronis Home edition, my Acronis version is not the very latest but it is the one before what the very latest version is) sometimes clones completely (across the network) and the cloned mach. boots fine (must change hostname as you said). Other times the cloned mach. will not boot -- but the fix is *very* simple ie just boot from the Slack Install CD disk # 1 and then in a terminal as root run: /sbin/lilo

then remove the CD disk and then issue the reboot command and now all is well.

I tend to use this the latter method with my Acronis due to it's a complete HD clone all in one with the exception of sometimes need to run /sbin/lilo as I said.

That's on Slackware. I'm yet to copy or HD clone Debian so I cannot say what happens on Deb though it likely would be similar.

--
Alan.
 
Old 02-17-2008, 02:09 PM   #7
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 49
Important formerly missing details:

My use is home use, it's only when mach. fails that I do this.

On a Win 2K box that I rarely run, my Acronis is "installed".

From that box, using Acronis app., I created "bootable Acronis cd or restore disk"

Such disk has lan capability but, for the receiver box, needs to be either a Linux with a running Samba server or needs to be a Win box (receiving box).

Samba server works so great, it's been what I use (the above said created boot restore CD uses netbios to find the receiver or Samba on the network)

I don't clone direct (though there exists an Acronis method to do so, I've never learned this method).

From (1. completed) running mach. booted from said created Acronis restore cd disk, I put an Acronis HD image (via lan) onto my Linux Samba server. Then when the HD fails and I've replaced the HD in this the same the original #1 machine -- I then boot this mach. from Acronis restore cd disk then find the (lan storage/kept) image on my (Linux powered) Samba server and then restore such image onto my new HD.

My use is home use. I do not clone multiple machines since to do so would violate my eula as well as I have no need to clone multiple machines. Acronis, however, also has a commercial or some other edition than mine with a eula and much more featured to make it faster and easier, made for the cloning of multiple machines. I've no experince with the latter since mine is the home edition.

I will say this, however: I am "very" impressed with the edition of Acronis True Image that I have. Since about for as long as since the existence of the last three released versions of Acronis True Image, Ghost (3 True Image versions ago) fell by the wayside for me and I no longer even know what Ghost is.

--
Alan.
 
Old 02-17-2008, 02:18 PM   #8
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
Partimage for Linux, can be run as server, too.
 
Old 02-17-2008, 11:19 PM   #9
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 49
Quote:
Partimage for Linux, can be run as server, too.
I think that's the particular "tool" that I spoke of on the sysrescue cd that can image and/or clone a or one partition at a time across the lan.

It's been a while since I last used that is why my memory didn't at first recall the specific name.

I had saved image files of partitions (unless I've somewhat forgotten and I have it off a bit).

Did so using server -- client as I said. It's cool because that is all you need. Fire up the server. Then on the same lan the server is on, fire up the client (each of partimage). The client finds the server and you are ready to go, just send to the client. After that, just keep that client and/to use as the client over and over to pull from.

Details are foggy for me now, been a bit too long. May be the other way around ie serve from server to client,

There is docs about this somewhere, it's how I did it. sysrescuecd website and/or partimage website

http://www.sysresccd.org/Sysresccd-m...of_a_partition

I used the one without ssl (on a former, not the latest version of sysrescue cd).

Alan.
 
  


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
How do I copy files from a linux machine to a Windows machines? hello321_1999 Linux - Software 11 05-15-2006 01:58 PM
Copy Files across two machines. abhijeetudas Linux - Security 6 04-25-2005 03:50 AM
Need to copy OS + hard drive contents between two machines with different hardware. tayo Linux - Newbie 12 07-24-2004 10:19 AM
copy files of cd post-install? tuppe Red Hat 2 12-05-2003 11:27 AM
Easy Question on Copy Command aklinuxuser Linux - Newbie 1 08-29-2001 05:55 PM


All times are GMT -5. The time now is 09:04 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 Google+: linuxquestions
Open Source Consulting | Domain Registration