LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux clone problem (https://www.linuxquestions.org/questions/linux-newbie-8/linux-clone-problem-438560/)

gubak 04-25-2006 02:42 AM

Linux clone problem
 
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 HDD (/dev/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?

satinet 04-25-2006 02:53 AM

hmmp. :scratch: That should work....

Is the data browseable from the origional hard drive?

gubak 04-25-2006 06:38 AM

How do you mean "browseable"?

satinet 04-25-2006 07:06 AM

sorry, i mean can you mount the cloned hard drive from the origional os.

Though on second thought's if the kernel and other files are in use and you copy them byte for byte (dd), i am not sure how well it would work. in effect you would get an exact copy of the drive (i.e with files open etc). I would recommend doing the clone using a live cd....

see what i mean?

pixellany 04-25-2006 07:34 AM

Also, is the clone in the IDE secondary spot, whereas the original was in primary? Could that make a difference in where the bootloader looks?

Another possibility is that you used no blocksize in your dd command. I don't know what that does.

satinet 04-25-2006 08:02 AM

Yes, i did think of that, but i'm guessing the ide wasn't the issue, because he actually go to the point of a kernel panic, which indicates that the bootloader did load from the cloned disk... if there's was no kernel at all you wouldn't get a panic. a kernel panic is actually a message from the kernel.......

Is this true? I really would try cloning off line.....

gubak 04-26-2006 12:16 AM

Yes, the clone hdd is in the seondary slot, but the boot loader loads.
Well, satinet you said that I would try to clone hdd in off line.
Is this mean that I could clone hdd with using a third Linux os (I mean the two hdds connect to a computer which already have a Linux os and then using the dd command between the two later connected hdds)?

satinet 04-26-2006 01:48 AM

yes, use something like knoppix.

as the post above mentions you should also put the cloned drive as the primary master if you have removed that drive from the system......


All times are GMT -5. The time now is 05:46 AM.