LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   use option -c to clone larger drives to smaller drives (https://www.linuxquestions.org/questions/linux-newbie-8/use-option-c-to-clone-larger-drives-to-smaller-drives-912688/)

lmrmpc 11-09-2011 01:27 PM

use option -c to clone larger drives to smaller drives
 
hello , i am new here , i am 70 and do some vol work for deserving people . we are using ubuntu 11-10 at present .
i use clonezilla live to clone computers.

i started with 9-04 and have doing this ever since ,.
my last clonezilla live would clone. smaller to larger and also larger to smaller harddrives.

that disc got left in a computer ,
i downloaded another copy to use .
this one does not clone larger to smaller . it states to use option -c.
how do i do this?
thanks in advance

AwesomeMachine 11-09-2011 02:51 PM

Clonezilla has a unique feature: it can copy to a smaller drive **AND** the destination drive must be at least as large as the source drive. I can't really tell from your post exactly what you are trying to do, but asking "How do I use the -c option?," is sort of like asking, "How do you work Linux?" If it were me, I would use a Knoppix live Linux CD and the rsync program.

I'm scared that your cloning to machines that have no Internet access, or worse, different hardware configurations than the machine on which the disk image was made. Volunteer work is fun until you get blamed for everything.

So, you boot the Knoppix CD and wait until you get the KDE desktop. Click around in there until you find a terminal emulator (an icon that turns into a square with a command prompt

Something like:

[ knoppix@adrienne ] $

type just the part after the special character:

[ knoppix@adrienne ] $ su

and POOF:

[ root@adrienne ] #

Now you've got power. I don't know if the drives are on different chassis, but there is a manual page for rsync:

[ root@adrienne ] $ man rsync

You must mount both hard drives:

[ root@adrienne ] $ mount /dev/sdax /mnt/sdax

where x in the partition number, usually 1, i.e. /dev/sda1

The other is probably /dev/sdb1, so do the same thing but substitute b1 for a1 in the above mount command.

If the target drive is Windows format, but you want a Linux format

[ root@adrienne ] $ mkfs.ext4 -F /dev/sdb1

If the drives are attached to the same chassis, this command will copy the files with all necessary hard and soft links, permissions and other file attributes:

[ root@adrienne ] $ rsync -avH /mnt/sda1/* /mnt/sdb1/

If the drives are connected to separate chassis, the technique of setting up static network interfaces in a live CD environment is too complex to explain in a forum post. But if the machines are networked by DHCP

[ root@adrienne ] $ netcat -l -p 1234 > /

on the target machine, and:

[ root@adrienne ] $ rsync /mnt/sda1/* | netcat 192.168.0.1 1234

on the source machine, executed in that order, will move the files as files. Then you can boot from an install CD and use the rescue system to install the boot loader. The process seems daunting at first, but walking is daunting in the beginning. Yet all learn how. I have the utmost faith in your ability! Stick to it and get it done! A ton of inspiration is worth an ounce of perspiration, but persistence is priceless.


All times are GMT -5. The time now is 08:21 AM.