LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Cloning Linux (https://www.linuxquestions.org/questions/linux-software-2/cloning-linux-909972/)

ndaka123488 10-25-2011 01:47 AM

Cloning Linux
 
Hi Guys

Question 1

I have downloaded cloneZilla, I have googled on axact steps on how to clone with cloneZilla, the clonning process took almost the whole night and I was happy, Just to come see in the morning the clone was done, but the hardrv was not at all cloned. Is there any problems with cloneZilla, are there other better cloning Softwares out there? What are the problems associated with cloning?

etech3 10-25-2011 03:18 AM

What are you trying to do?

Copy machine and take to another machine to install?
You want to make custom settings?
Do you want a live cd to use and install?

Take a look at live-helper:
http://www.google.com/search?q=linux...iw=394&bih=207

ndaka123488 10-25-2011 03:47 AM

Im trying to clone a hardrive

SecretCode 10-25-2011 09:17 AM

That seems unusually long to me.

How big a hard drive?

Are you cloning to another drive or to an image?

Are the drive(s) particularly old/slow?

Clonezilla is very good. But there are a lot of options and I suppose the documentation is not all that great.

Are you trying to clone on hard drive, with all its partitions and MBR, to another drive of the same size?

ndaka123488 10-25-2011 09:38 AM

Its a 320 G

I have fedora 7 installed on one, and I have a customised IS installed on it as well. I want to clone the axact details to a different hardrvie. Im setting up a PC with the exact same details, but I might have problems installing the customised IS from scratch and also getting the right drivers. So im left with one option, to clone the existing hardrive with the new one and get the axact same copy. The second hardrive is axactly the same size, SATA 320 G.

EDDY1 10-25-2011 10:10 AM

I always use Clonezilla-live-cd
Boot to the cd select
device-device
select source device
select target device

It works quite well & shouldn't take that long

SecretCode 10-25-2011 10:28 AM

When you start the cloning process, does it display (on a text screen) the percentage complete and a transfer rate? If so, what transfer rate are you getting?

I'm not clear whether it failed to start (because you say "the hardrv was not at all cloned") or whether it finished but was unreadable.

ndaka123488 10-26-2011 01:40 AM

The cloning process starts and yes it shows a certain percentage,
the process was running for about 8 hours, it was up to 100%

But when I boot from the hardrive cloned to, it still has its previous data on it. That tells me tht
clone was not really a success even thou it took so long.

SecretCode 10-27-2011 11:37 AM

Quote:

Originally Posted by ndaka123488 (Post 4508496)
But when I boot from the hardrive cloned to, it still has its previous data on it.

I can think of a few possibilities.

1 - The cloning operation targetted some other drive in your system. Unlikely, but not impossible.
2 - You accidentally did a "disk to image" clone and the clone created is a file somewhere on some drive.
3 - You only cloned some of the drive, excluding the MBR and some partitions, so the old data is still there to boot from (but some parts of the drive have been overwritten).

It's important to remember that when clonezilla runs, the drive devices (/dev/hda, /dev/hdb, /dev/sda, etc) may not be the same or in the same order as you see from a booted system. You need to be careful to pick the right one (best practice is to unplug any other drives).

I don't really know what's gone wrong, but Clonezilla is definitely capable of running well. I think you should try cloning single partitions, or small drives if you have some spare drives around, or at a bare minimum a partition-to-image which is non-destructive.

chrism01 10-28-2011 01:20 AM

As an alternative, try this http://www.mondorescue.org/

ndaka123488 10-28-2011 01:55 AM

Quote:

Originally Posted by SecretCode (Post 4509934)
I can think of a few possibilities.

1 - The cloning operation targetted some other drive in your system. Unlikely, but not impossible.
I only had two hardrives in the system, the one I m cloning from and the one Im cloning to, no any other externals

2 - You accidentally did a "disk to image" clone and the clone created is a file somewhere on some drive.

I will attach below the whole steps Ive taken for the clone
3 - You only cloned some of the drive, excluding the MBR and some partitions, so the old data is still there to boot from (but some parts of the drive have been overwritten).
When I perfomed the clone, there is not options that specifies anything about MBR, below is the steps. advice if I did anything wrong.

It's important to remember that when clonezilla runs, the drive devices (/dev/hda, /dev/hdb, /dev/sda, etc) may not be the same or in the same order as you see from a booted system. You need to be careful to pick the right one (best practice is to unplug any other drives).

Well, I took out one of the drives in the system, left on,e read its disk name, attached the second, read its disk name, and cloned from hda or sda

I don't really know what's gone wrong, but Clonezilla is definitely capable of running well. I think you should try cloning single partitions, or small drives if you have some spare drives around, or at a bare minimum a partition-to-image which is non-destructive.

Below are the steps I ve taken, it took almost 8 hours for the cloning to be completed. Funny it was not a success

http://clonezilla.org/show-live-doc-..._to_disk_clone

Thnaks

EDDY1 10-28-2011 06:04 AM

Quote:

But when I boot from the hardrive cloned to, it still has its previous data on it. That tells me tht
clone was not really a success even thou it took so long.
Maybe you should erase the drive manually then clone to it.

SecretCode 10-28-2011 07:46 AM

When you get to "choose source disk" what are the options and which did you select?
Same question for "choose target disk".

ron7000 10-28-2011 04:24 PM

the trick with cloning a drive is getting the bootloader to work properly. The easiest way I found is to set everything to mount by device name, which will be /dev/sda and /dev/sdb and so on, as opposed to by disk-id which is the default. When you have the bootloader set up to boot and mount by disk id, when you clone from one drive to a new one the disk id changes and the new system won't boot unless you change all the references to disk-id in the bootloader to the new disk.
But if you change everything to by device name, and as long as that's the only hard drive in the system when it boots it will come up as /dev/sda and work, and then you can change things back to "by device-id" later if you wish to get it to work with other hard drives in the system. It's also much easier to get the disk id once it's in the system and running then having to almost guess it from the hard drive label.

the easiest way to 'clone' a drive is by using 'tar'. You do need a second bootable linux drive to run the system or a second means of booting the system and storage space for the tar'd image file you'll be creating. Then for the new disk, you can parition and format it however you with, although I think you need to use the same filesystem for the root partition. then just use tar -xf to dump the image onto the new disk which can be less than 5 minutes.

for the bootloader, i'm assuming you're using grub and not efi. for grub, you want to edit two files:

/boot/grub/device.map it will have the disk mounted by id probably. change the line in it to
"(hd0) /dev/sda" without the quotes.

/boot/grub/menu.lst it will have the line with "root=/dev/by-disk-id/12345678blabla-part2".
you want to change this to "root=/dev/sda2" where the number 2 is the correct number of the root partition. Be aware this number may change if you parition your new disk differently than the old. Generally I have /dev/sda1 as the boot partition which is formated as FAT, then sda2 which is the / partition as ext3, then sda3 as swap. In menu.lst look for all references of root=by-disk-id and change it to root=/dev/sda#. Then when you boot the new drive that's been cloned, make sure it's the only hard drive in the system and it will successfully boot. Then when it's running, you can go into yast-partitioner or equivalent and change how your drives are mounted, when you change them to by-disk-id you can view the /etc/fstab file and get the correct disk id and then just copy and paste that text into device.map and menu.lst.

for efi it's just as easy, edit /etc/elilo.conf and the corresponding elilo.conf on the boot partition and change all references of by-disk-id/numbernumber-part# to /dev/sda# where # is the correct number for the root parition.


All times are GMT -5. The time now is 09:50 AM.