Find the answer to your Linux question:
Results 1 to 6 of 6
Dear Friends I am using Windows XP Professional. My system details are 320GB HDD (100GB Windows XP remaining 220 GB unpartition space). I have another one 40GB HDD(Fedora 17 installed ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Location
    Sivakasi, Tamilnadu, India
    Posts
    17

    Clone only Linux Partition


    Dear Friends

    I am using Windows XP Professional.
    My system details are 320GB HDD (100GB Windows XP remaining 220 GB unpartition space).

    I have another one 40GB HDD(Fedora 17 installed in 40GB)

    I want to clone fedora 17 in 320 GB (remaining unpartition space) without affect windows xp os.

    Is it possible in clonezilla. How to clone.

    Thank You.

  2. #2
    Linux Newbie
    Join Date
    May 2014
    Location
    Hinesville, GA USA
    Posts
    212
    I am going to watch this thread as this is an issue I face often. I tend to use distros that have a remaster capability so I can just create an installable USB drive containing my installed and tweaked system and install it to the new drive. This being said, a lot of distros do not have this capability and I'd like to know how to do this myself as I swap drives around quite often...

  3. #3
    Linux User SkittleLinux18's Avatar
    Join Date
    Dec 2007
    Location
    Mesa, AZ
    Posts
    312
    In your particular case, this is not possible. You will have to format the unpartitioned 220 GB and complete a fresh install on it.

    You cannot clone from one brand/size hard drive to a different one. The info that is cloned from one drive must perfectly match the info of the hard you want to restore the clone to, including make and model. So, you can only restore the Fedora 17 install to a 40gb hard/partition of the exact same type of drive. Furthermore, if you have a Western Digital WD7500AZEX hard drive that you cloned Fedora from, then you cannot restore that clone to say a Western Digital WD1003FZEX. However, you can restore the clone to a separate identical drive. So say your WD1003FZEX, with your Fedora 17 install, dies out/burns up/whatever, and you buy another WD1003FZEX, then you can restore your clone to the new WD1003FZEX, but only if the cloned partition matches the same size as the partition/drive you're restoring to, e.g.; 40 GB clone cannot be restored to a 70 GB partition, even if it's the same drive.

    Everything must always match.
    Last edited by SkittleLinux18; 06-05-2014 at 01:50 AM. Reason: Typo
    Linux user since: June 2007
    Current distro: kubuntu-14.04
    Specs: AMD Atholon 64 X2 3.2 Ghz, 4GB RAM, GeForce GTS 250 1GB VRAM
    High five if you saw the linux computers 24 used on their CTU sets.

  4. #4
    Linux Engineer docbop's Avatar
    Join Date
    Nov 2009
    Location
    Woodshed, CA
    Posts
    943
    Many the Linux imaging tools are front-end to the Unix dd command. dd is very powerful bit copier and can cross all sorts of disks and even copy partition to partition. BUTdd's command line can be very complicated and if you make a mistake can wipe out a hard drive. I would recommend finding an old hard drive to practice and test on first.

    dd(1): convert/copy file - Linux man page
    A lion does not lose sleep, over the opinion of sheep.

  5. #5
    Linux Guru rokytnji's Avatar
    Join Date
    Jul 2008
    Location
    Desert
    Posts
    4,120
    Might help,might not,

    How To Do Eveything With DD - LinuxQuestions.org

    Learn the DD command

    How to use dd command ? Linux article

    I had to figure it out on my own so good luck.
    Linux Registered User # 475019
    Lead,Follow, or get the heck out of the way. I Have a Masters in Raising Hell
    Tech Books
    Free Linux Books
    Newbie Guide
    Courses at Home

  6. #6
    Linux Engineer
    Join Date
    Apr 2012
    Location
    Virginia, USA
    Posts
    896
    Here's how you should do it.

    First, backup files that are important to you.

    Second, if the hard drive you are cloning from was previously installed in the same machine, you should be good to clone the partition. This means all the right drivers and what not will have been installed for your machine.

    You will need to use the command line.

    First method: using cp
    Steps:
    First, you'll need to create a partition on your drive you are copying TO that is large enough to hold all your files. This is easily done from any live cd, I recommend using whatever recovery disk comes with your distribution, in your case fedora.

    Next, you'll need to create a file system on your new partition. Ideally, ext4 or ext3 (or whatever your Fedora install is using). Mount this drive somewhere on your live system with something like mkdir /newsys; mount /dev/sda2 /newsys
    Next, you need to mount your old disk's root partition somewhere on your live system. something like mkdir /oldsys; mount /dev/sdb1 /tempmount
    Next copy all the files: cp -a /oldsys/* /newsys

    Now, the files should copy over no problem. You are not finished however. You will need to edit at least a couple files. First, you need to edit /etc/fstab and change the appropriate entries. Your root partition was most likely formally /dev/sda1. It's now most likely /dev/sda2. I'm not sure if Fedora 17 uses UUID mounts by default, but if so, edit that as appropriate (UUID mounts are not mandatory, you can use old fashioned /dev/sda2 if you want). Edit any other conflicting entries you have in /etc/fstab

    Next, you need to install grub. The easiest way to do this is to chroot to your new system while running the livecd and install it.

    Method Two:

    Use dd. Create a partiton on the new disk is exactly the same number of sectors. Then, perform file changes, and install grub.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •