LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-25-2011, 02:47 AM   #1
ndaka123488
Member
 
Registered: Aug 2011
Posts: 63

Rep: Reputation: Disabled
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?
 
Old 10-25-2011, 04:18 AM   #2
etech3
Senior Member
 
Registered: Jul 2009
Location: Virginia
Distribution: Debian Stable Testing Sid Slackware CentOS
Posts: 1,055
Blog Entries: 2

Rep: Reputation: 45
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
 
Old 10-25-2011, 04:47 AM   #3
ndaka123488
Member
 
Registered: Aug 2011
Posts: 63

Original Poster
Rep: Reputation: Disabled
Im trying to clone a hardrive
 
Old 10-25-2011, 10:17 AM   #4
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
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?
 
Old 10-25-2011, 10:38 AM   #5
ndaka123488
Member
 
Registered: Aug 2011
Posts: 63

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-25-2011, 11:10 AM   #6
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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
 
Old 10-25-2011, 11:28 AM   #7
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
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.
 
Old 10-26-2011, 02:40 AM   #8
ndaka123488
Member
 
Registered: Aug 2011
Posts: 63

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-27-2011, 12:37 PM   #9
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by ndaka123488 View Post
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.
 
Old 10-28-2011, 02:20 AM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,831

Rep: Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559Reputation: 2559
As an alternative, try this http://www.mondorescue.org/
 
Old 10-28-2011, 02:55 AM   #11
ndaka123488
Member
 
Registered: Aug 2011
Posts: 63

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by SecretCode View Post
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
 
Old 10-28-2011, 07:04 AM   #12
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
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.
 
Old 10-28-2011, 08:46 AM   #13
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
When you get to "choose source disk" what are the options and which did you select?
Same question for "choose target disk".
 
Old 10-28-2011, 05:24 PM   #14
ron7000
Member
 
Registered: Nov 2007
Location: CT
Posts: 248

Rep: Reputation: 26
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.
 
  


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
Cloning the Linux System pras123 Linux - Server 6 06-03-2008 12:17 PM
Cloning Linux OS kid_rizal Linux - Newbie 6 04-24-2008 01:51 AM
Linux Cloning Utilities bostonthunder777 Linux - Software 5 01-24-2008 05:10 PM
cloning a linux user glopv2 Linux - Newbie 8 10-04-2007 04:24 AM
Cloning Linux System from PC->PC ALInux Linux - General 4 07-26-2006 06:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:16 AM.

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