Linux - GeneralThis 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
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 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?
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
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.