[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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@sociologi.cjb.net> 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@yahoo.com> 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
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.


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!  **

Reply to: