LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 06-06-2014, 04:00 AM   #1
beopen
LQ Newbie
 
Registered: May 2012
Posts: 21

Rep: Reputation: Disabled
a question on cloning using clonezilla or similar


hi,
i have a 160gb hdd on which is installed windows and ubuntu. Ubuntu is divided in 3 partitions [boot,root,home].
I have another hdd of 500gb on which a debian is installed. and about 200gb free space is there right now.
I want to ask is it possible to clone the ubuntu of the first drive into the free space of the second drive without destroying debian.
I have not done before any imaging or cloning.

So is the transfer of the existing system possible for the facts given ?
pls suggest
 
Old 06-06-2014, 07:37 AM   #2
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
That should pe possible. Are you just cloning as a backup, and only need an image, or do you need an actual clone of the partitions?

If you only need an image, then you want to format the free space (NOT fat32, you need to have BIG files). For the puropses of this example, I will assume that /dev/sda3 is the /boot partition, /dev/sda5 is the / partition, and /dev/sda6 is the /home partition. You will most likely need to do this from a live cd. Mount the newly formatted partition to /mnt. Then, to backup the boot partition, run (as root)
Code:
dd if=/dev/sda3 of=/mnt/boot-image.img
BE VERY CAREFUL NOT TO MIX UP THE "OF" AND "IF"
The other 2 are fairly simple:
Code:
dd if=/dev/sda5 of=/mnt/fs-root-image.img
dd if=/dev/sda6 of=/mnt/home-image.img
There is probably a way that you could pipe it through gzip or something to compress it and save space, but that's beyond my knowledge.

99% of this is just an application of http://www.linuxquestions.org/questi...ommand-362506/ It's a really good (and interesting) read, even if you don't think you'll use it much.

Last edited by maples; 06-06-2014 at 07:52 AM.
 
Old 06-06-2014, 03:35 PM   #3
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
I might be tempted to resize the deb then use partimage or gparted to move the other linux. Then fix grub.
 
Old 06-06-2014, 03:43 PM   #4
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
Quote:
Originally Posted by jefro View Post
I might be tempted to resize the deb then use partimage or gparted to move the other linux. Then fix grub.
I thought Gparted only resized partitions? Or are you referring to the LiveCD?
 
Old 06-07-2014, 08:11 AM   #5
beopen
LQ Newbie
 
Registered: May 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by maples View Post
That should pe possible. Are you just cloning as a backup, and only need an image, or do you need an actual clone of the partitions?
i did not get the difference between the two questions which you asked. The first one is understandable the latter i did not get what you are meaning.
Nevertheless from my side let me clarify what i am intending.
I was looking at a mix of both. That is the first part of your query cloning as a backup and keep an image.
And the 2nd is to really clone one system now to see if it works and thus my first objective of keeping image backup is fulfilled.

So taking the image backup as you mentioned using the dd command is the way to go?
 
Old 06-07-2014, 01:56 PM   #6
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
Quote:
Originally Posted by beopen View Post
i did not get the difference between the two questions which you asked. The first one is understandable the latter i did not get what you are meaning.
Nevertheless from my side let me clarify what i am intending.
I was looking at a mix of both. That is the first part of your query cloning as a backup and keep an image.
And the 2nd is to really clone one system now to see if it works and thus my first objective of keeping image backup is fulfilled.

So taking the image backup as you mentioned using the dd command is the way to go?
Sorry, I could have wrtiien that better...let me rephrase it.
Do you need something just to back it up in case something bad happened to your hard drive? Or are you trying to duplicate the partitions, so that your second hard drive can be botable?

The suggestion that I posted would give you three backup files. The second hard drive would NOT be able to boot. So it looks like the suggestion I posted will not be completely adequate.
 
Old 06-07-2014, 03:22 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,996

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
http://gparted.org/display-doc.php?n...aste-partition

Almost every live disto either has gparted or can easily add it. You shouldn't normally do clones and copies on systems that are booted from.
 
  


Reply

Tags
clonezilla, cloning



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[cloning] Alternative to Clonezilla? littlebigman Linux - Software 5 02-21-2012 05:33 AM
[SOLVED] cloning using clonezilla on HDD raju.muppana Linux - Newbie 2 08-02-2010 07:18 AM
Clonezilla Live: Cloning to smaller HD Codegen Linux - Software 3 02-04-2010 05:32 PM
Problems booting after cloning hard drive using clonezilla madicoe Linux - Newbie 2 06-18-2009 01:18 PM
Clonezilla: Cloning from hda to sda OEP Linux - Software 5 06-17-2009 02:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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