LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-10-2006, 05:26 AM   #1
gubak
Member
 
Registered: Jul 2004
Posts: 332

Rep: Reputation: 30
How can I clone the RedHat9


I have RedHat9, mailserver, webserver, etc. (so I have plenty of server programes on my linux).
Is it possible to clone my RedHat9 linux to another HDD?
If possible, how?

Thanks

Last edited by gubak; 10-04-2006 at 12:01 AM.
 
Old 04-10-2006, 05:40 AM   #2
gmcmaster
Member
 
Registered: Feb 2003
Location: Poole, Dorset, England
Distribution: Fedora Core 5
Posts: 80

Rep: Reputation: 15
Mount another HDD say under /mnt/imagehd

and type

dd if=/dev/hda of=/mnt/imagehd/rh9image

where /dev/hda is the location of the HDD you want to image.

To restore you would need to boot the system (or a Linux rescue disc) and mount the hdd with the image on it (perhaps in the same place)
and do

dd if=/mnt/imagehd/rh9image of=/dev/hda

again, where /dev/hda is the HDD you want to restore to

This will produce a full image of the hard drive and will overwrite everything on the hard drive when you restore.
 
Old 04-10-2006, 06:31 AM   #3
gubak
Member
 
Registered: Jul 2004
Posts: 332

Original Poster
Rep: Reputation: 30
Instead of mount a new HDD, can I make the image file into a new created folder (for example /home/user/image), and through the network copy to another machine this image file?
dd if=/dev/hda of=/home/user/image/rh9image
Restore:
If the above mentioned process possible, then the restore process:
At first I would copy the image file to another HDD and the restore process is the same as you said
dd if=/mnt/imagehd/rh9image of=/dev/hda

Last edited by gubak; 10-04-2006 at 12:01 AM.
 
Old 04-10-2006, 06:33 AM   #4
gmcmaster
Member
 
Registered: Feb 2003
Location: Poole, Dorset, England
Distribution: Fedora Core 5
Posts: 80

Rep: Reputation: 15
Im pretty much sure that wouldnt work because what DD is doing is creating a bit-by-bit image of your HDD and putting it somewhere else and you cant have stuff updating on your HDD or itll end up corrupted.
 
Old 04-19-2006, 02:58 AM   #5
gubak
Member
 
Registered: Jul 2004
Posts: 332

Original Poster
Rep: Reputation: 30
Is there any program like ghost, to clone entire linux HDD?

Last edited by gubak; 10-04-2006 at 12:01 AM.
 
Old 04-19-2006, 06:41 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by gubak
Is there any program like ghost, to clone entire linux HDD?
dd does the same thing as Ghost. Ghost is simply a friendly front end for a low-level routine similar to dd.

Of course, you can use Ghost to clone ANY harddisk....
 
Old 04-19-2006, 01:08 PM   #7
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Look up netcat and dd to clone a system over the network. If you want to ghost the machine, g4u is pretty popular.

-twantrd
 
Old 04-20-2006, 12:49 AM   #8
gubak
Member
 
Registered: Jul 2004
Posts: 332

Original Poster
Rep: Reputation: 30
I cloned my linux HDD with dd command yesterday, but I have some problems.
My linux HDD has the following partitions:
Device Boot Start End Blocks ID System
/dev/hda1 * 1 13 10439 83 Linux
/dev/hda2 14 9954 79851082+ 83 Linux
/dev/hda3 9955 10011 457852+ 82 Linux swap

First I shuted down my linux os and connected a HDD with the same parameters as my linux HDD. After that I switched on the system. The new HDD became /dev/hdc. After that I type the command:
dd if=/dev/hda of=/dev/hdc
and a couple of hours later I get the message that copying is successfully completed (or something similar). After that my second hdc had completely the same partitions as my primary HDD:

Device Boot Start End Blocks ID System
/dev/hdc1 * 1 13 10439 83 Linux
/dev/hdc2 14 9954 79851082+ 83 Linux
/dev/hdc3 9955 10011 457852+ 82 Linux swap

So I thinked that if I disconnected my primary (Linux) HDD, and I started machine with secondary HDD it would work, but unfortunately not. If I start machine with clone HDD, I get the command "Kernel panic".
Why?

Last edited by gubak; 10-04-2006 at 12:01 AM.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I clone myself? fannymites SUSE / openSUSE 3 03-02-2006 03:06 AM
Photostory Clone fieldyweb Linux - Software 0 08-14-2005 09:20 AM
how to use clone() icoming Programming 1 02-03-2005 11:19 AM
can i use dd to clone a partition? dr_zayus69 Linux - Software 1 01-25-2005 04:57 PM
Tv out, clone the monitor to the TV ludeKing Linux - Hardware 1 05-26-2004 04:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:11 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration