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 08-03-2010, 01:27 PM   #1
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 18.04
Posts: 297

Rep: Reputation: 8
Clonezilla - Copy /dev/sda2 on computer 1 => /dev/sda4 on computer 2


I don't mean to repeat questions but I need a simple example to follow. I have read a bunch of threads and it seems they get real technical and I don't understand them, so:

I have computer 1 a Dell Latitude 800 - 160GB Hitachi HTS54161 disk

and computer 2 a Dell Inspiron 1525 - 250GB Hitachi HTS54322 disk

I copied /dev/sda3 on computer 1 to /dev/sdb2/REST (external USB HD)

I tried to restore /dev/sdb2/REST to computer 2 /dev/sda4.

RESULT: "Failed to restore partition image file /home/parimage ... /sda3 to /dev/sda4 maybe this image is corrupt!"

Can this even be done?

Please help with example.

Thanks in advance RP.
 
Old 08-03-2010, 02:16 PM   #2
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by pizzipie View Post
I copied /dev/sda3 on computer 1 to /dev/sdb2/REST (external USB HD)
This looks like your mistake. You should have mounted "/dev/sdb2" to something like "/mnt/image" and saved the partimage file to "/mnt/image/REST".
 
Old 08-03-2010, 03:04 PM   #3
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 18.04
Posts: 297

Original Poster
Rep: Reputation: 8
isn't /dev/sdb2 mounted wherever Clonezilla mounts it when it boots on computer 2??

Actually then I had saved REST to /media/simpleln/REST (/media/simpleln being the mountpoint for /dev/sdb2/ (external USB HD))

Does this help explain??
 
Old 08-03-2010, 03:51 PM   #4
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by pizzipie View Post
isn't /dev/sdb2 mounted wherever Clonezilla mounts it when it boots on computer 2??
I do not know enough about Clonezilla to tell you what it does automatically.

Quote:
Originally Posted by pizzipie View Post
Actually then I had saved REST to /media/simpleln/REST (/media/simpleln being the mountpoint for /dev/sdb2/ (external USB HD))
That makes more sense. Are you certain that "/dev/sdb2" is your external USB drive?

Assuming you did the right thing, what commands did you use to create the image?
 
Old 08-03-2010, 04:08 PM   #5
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 18.04
Posts: 297

Original Poster
Rep: Reputation: 8
Yes /dev/sdb2 is the external HD. As reported by fdisk -l and Gparted.

I will try again to save the file. Will report all commands that I did.

Apparantly what I am trying is possible. eh?

Thanks
 
Old 08-03-2010, 04:51 PM   #6
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 18.04
Posts: 297

Original Poster
Rep: Reputation: 8
device-image work w/ .... OK
local-dev use local device USB ... OK
enter
now we need mount device .... sdb2 395GB_ext3(In_Simple_Drive ... OK
which directory is for clone image .. Rhino OK
enter
Expert Expert Mode OK
restore parts Restore Image to local Partition OK
choose the image file to restore
2010-08-03-imgKarmic9.10 2010-08-03_08:45_sda3 OK
choose target partition sda4 73.4GB in Hitachi_HTS54322... OK
enter
want to cont Y
wnat to cont Y


RESULT: "Failed to restore image file /home/partimage/2010-08-03-08-imgKarmic9.10/sda4* to /dev/sda4
maybe this image is corrupt! "

enter
enter
0

I rebooted and this screwed up GRUB - had to do over MBR to get it to boot again.
 
Old 08-03-2010, 05:14 PM   #7
fbsduser
Member
 
Registered: Oct 2009
Distribution: Hackintosh, SlackWare
Posts: 267

Rep: Reputation: 30
Did you check to see if clonezilla did create a folder called partimage in the home folder of the OS you're running clonezilla from? Also ensure that the home folder is writable and have enough space (clonezilla puts a copy of the image there).
 
Old 08-03-2010, 05:28 PM   #8
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 18.04
Posts: 297

Original Poster
Rep: Reputation: 8
How do I do that when Clonezilla is running things. Does Clonzilla have tools like RescueCD?
 
Old 08-03-2010, 07:48 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 20,022

Rep: Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145
Clonezilla saves a lot of other info in that folder. It might be that it thinks you are trying to restore and not clone and is calling that issue.
 
Old 08-04-2010, 10:31 AM   #10
pizzipie
Member
 
Registered: Jun 2005
Location: Hayden, ID
Distribution: Ubuntu 18.04
Posts: 297

Original Poster
Rep: Reputation: 8
AHHA!

That makes sense. Now, how do you tell it to clone rather than restore. Is that the disk to disk option?

I was looking at the clonezilla/forum/ yesterday and in one of the posts it was mentioned to change the file names in the saved folder so that it thinks you are saving, for instance computer 1-/dev/sda2 to computer 2-/dev/sda2 rather than the reality, computer 1-/dev/sda2 to computer 2-/dev/sda4. The whole post seemed very complicated to me and I don't want to try that unless it's my last resort.

Last edited by pizzipie; 08-04-2010 at 10:42 AM. Reason: left out information
 
Old 08-04-2010, 03:20 PM   #11
jefro
Moderator
 
Registered: Mar 2008
Posts: 20,022

Rep: Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145Reputation: 3145
Clonezilla users two ways to save data. One way is if it can read the format which I think is your case. I forget the name of the program it uses but is on either the disk or web site. part something or I forget. (If it can't read format it uses dd)

Now it may be possible to use the original program that clonezilla uses and command it to place files on your partition.

Might be possible to edit that extra data to fool the clonezilla.

Also I guess we could find some command to take a backup and use it as a clone. I just don't use clonezilla so I can't say.


If it was dd the whole deal may have been easier if same size.

Last edited by jefro; 08-04-2010 at 03:21 PM.
 
Old 01-17-2011, 11:45 PM   #12
miltonsj
LQ Newbie
 
Registered: Jan 2007
Posts: 7

Rep: Reputation: 0
After several hours of beating my head against the wall with Clonezilla, I finally figured out how to restore a partition to a different partition!

I followed the instructions with the Clonezilla Live CD to create a partition image. Then, I went inside the partition image folder created by Clonezilla and renamed the image. For example, the image may be called "sda2-clonezilla-img". Rename the "sda2" part to MATCH THE NAME OF THE PARTITION you are restoring the image to, namely, "sda1-clonezilla-img" (If your destination partition is sda1).

Also, you have to open the Info-lshw.txt file inside the same image folder and change the partition there. Scroll all the way to the end of the file where it says "*volume". Look for "logical name" in that section and change the partition name to your new one.

Finally, I am running linux, so I had to fix the fstab file and reinstall GRUB before booting into my restored partition. Whoever runs Windows please add to this thread with further instructions.

If you have any questions, just message me or reply. Thanks!
 
Old 07-30-2014, 01:40 PM   #13
cannon_dt
LQ Newbie
 
Registered: Jul 2014
Posts: 1

Rep: Reputation: Disabled
Hi,
I do not want to hijack this thread but I have a similar problem.

However my image backup is a directory that has a series of files most of which begin with sda5 (I need to restore to sda3), so in this case do I rename all the files to sda3*?

Can you please help?

Ananth
 
Old 08-04-2014, 08:35 PM   #14
miltonsj
LQ Newbie
 
Registered: Jan 2007
Posts: 7

Rep: Reputation: 0
@cannon_dt

Yes, rename all the files that have sda5 to sda3. Let me know if you need any further help.
 
  


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
How To Clone Single Drive To Raid 1+0 (copy /dev/sde to /dev/md0)? alfista Linux - Server 5 03-18-2008 10:57 PM
How To Clone Single Drive To Raid 1+0 (copy /dev/sde to /dev/md0)? alfista Linux - Server 2 03-17-2008 10:26 PM
How To Clone Single Drive To Raid 1+0 (copy /dev/sde to /dev/md0)? alfista Linux - Server 2 03-13-2008 04:17 AM
Can't find /dev/sda4 anymore when booting ! danran Ubuntu 1 10-02-2006 05:11 PM
mount: /dev/sda4 is not a valid block device ADJ Linux - Hardware 4 08-01-2006 04:53 AM

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

All times are GMT -5. The time now is 07:23 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