Re: how to create an image of your debian computer hard drive for cloning



On Tue, Sep 30, 2008 at 11:14 PM, Hans Ekbrand <hans@xxxxxxxxxxxxxxxxx> wrote:
On Tue, Sep 30, 2008 at 09:49:08PM +0200, Aniruddha wrote:
On Tue, 2008-09-30 at 14:18 -0400, David Clymer wrote:
On Tue, Sep 30, 2008 at 1:11 PM, Robert Robert <robertrobert93@xxxxxxxxx> wrote:
Dear All,
I was wondering how I could make a clone or image of my computer hard disk
that contains debian OS. I want to do this in order to make an exact copy to
another clean pc with no os at all. What complete free software can I use
for this ? Is there a manual some where on the net about this ?

I highly recommend Clonezilla-live. it makes cloning to/from any sort
of storage very simple. You can clone to an attached usb drive, to a
network drive via nfs, samba, or ssh. (http://www.clonezilla.org/)


Clonezilla uses partimage which I haven't found too reliable. I still
prefer to tar /. It works perfectly every time.

To tar / will not

- partition the disk
- make a partition bootable
- put the right files on the right partitions unless the partitions are
- created manually
- mounted at the correct mountpoints.

The OP mentioned a "clean pc with no os at all", which sounds much
like an unpartitioned disk, on which tar / will not work at all (since
there is no partitions and no filesystem to untar to).

If you can plug the hard disk of the "clean pc" into your existing
system, then I recommend dd. If you need to manually move the data
between the computers then partimaged is handier. If both computers
exists in a fast lan, I guess you could just

At source
- export / from the source over NFS
At target
- boot a live cd on the target,
- mount source.ip:/ /mnt
- dd if=/mnt/dev/sda (or whatever hard disk on source is) of=/dev/sda

(This tip is untested though).


Although it might work, there is a complication: the source filesystem
should not be mounted. The risks involved when copying a / partition
while it is live are quite big (there may be files that are modified
while copying: you'd get half of the old file and half of the new
one).
To prevent this the filesystem should be locked as read only in some
kind of way or the source should be booted from a live CD (or an OS on
another partition).
I'd advise the live CD, but it requires a restart.

I have no experience with this, but I'd like to prevent problems in all cases.

Neil

--
There are three kinds of people: Those who can count, and those who cannot count
-----------------------------------------------------------------------
** Hi! I'm a signature virus! Copy me into your signature, please! **
-----------------------------------------------------------------------


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx



Relevant Pages

  • Re: how to create an image of your debian computer hard drive for cloning
    ... I was wondering how I could make a clone or image of my computer hard disk ... put the right files on the right partitions unless the partitions are ... between the computers then partimaged is handier. ...
    (Debian-User)
  • Re: Transfer F7 partition to a new hard disk
    ... Paul Smith wrote: ... can I create a clone of my F7 partition in the new hard disk? ... you want to clone a partition or a hard drive? ...
    (Fedora)
  • Re: transfer xp and c: to new HD and MB
    ... Basically - you would "clone" the C drive to the new HD then make the new HD ... HD - or find someone locally to clone and switch drives. ... I've already purchased a new hard disk, but I can't see my way to ... It is not just a clone I need, but to expand c:\ partition to the full new ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Question about Ghost
    ... Magnusfarce wrote: ... Should I clone or backup? ... >> Creates an exact copy of a hard disk on another hard disk. ... >> partition of another hard disk or onto CDor DVD. ...
    (microsoft.public.win2000.general)
  • Re: Transfer F7 partition to a new hard disk
    ... can I create a clone of my F7 partition in the new hard disk? ... I think the word "clone" is slightly misleading. ... For that it is better to use "cp -a", and give the partition a new label, ... we really need to know what exactly you're wanting to do ...
    (Fedora)