Re: Clone root partition



* Tong * wrote:

Hi,

I'm trying to compile a comprehensive document on cloning root partitions.
My immediate goal is to clone my current working Linux to external USB HD,
so that I can use it wherever I go.

By comprehensive I mean it should not be as simple minded as

dd if=/dev/hda2 of=/dev/sda2

or

cp -a / /mnt/point

or

tar -p -m cf - / | (cd /mnt/point; tar xf - )

I know they work, but there are so many things have been left out. By
comprehensive, I mean I want to know all relevant things that need to be
considered.

For example for dd, let alone its rigid limitation, if you use it, at
least the 'conv=sync,noerror bs=4k' options should be used: sync,noerror
just means continue and zero fill any error blocks, bs=4k just writes 4k
at a time which will speed things up a lot. For cp, at least 'cp -ax'
should be used.

But there are still much more to it.

First, directories that don't need to copy over, like /tmp, /proc. With
modern Linux that uses udev, the /dev and /sys don't need to be copied
either. Anything else (besides distro specifics like
/var/cache/apt/archives)?

2nd, the clone partition should be made bootable, by grub or lilo.

Anything else? Like the concerns of /etc/fstab...

Last, with all the above concerns, how to achieve them with various tools?

Keywords: tar rsync find cpio dd

thanks

I'm not an expert in this area,
but I would have thought it was advisable
not to clone / while it is mounted;
I would run knoppix, or something like that, and then copy with "cp -a".

--
Timothy Murphy
e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie
tel: +353-86-2336090, +353-1-2842366
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland
.



Relevant Pages

  • Clone root partition
    ... I'm trying to compile a comprehensive document on cloning root partitions. ... My immediate goal is to clone my current working Linux to external USB HD, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Clone root partition
    ... I'm trying to compile a comprehensive document on cloning root partitions. ... My immediate goal is to clone my current working Linux to external USB HD, ...
    (comp.os.linux.misc)
  • Re: Clone root partition
    ... I'm trying to compile a comprehensive document on cloning root partitions. ... My immediate goal is to clone my current working Linux to external USB HD, ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: Clone root partition
    ... I'm trying to compile a comprehensive document on cloning root partitions. ... My immediate goal is to clone my current working Linux to external USB HD, ...
    (Debian-User)
  • Re: Acronis Teamed Up with Western Digital
    ... My external USB HD is already NTFS ... Cloning won't continue unless I choose to "delete and recreate partition" on ... It's very easy to clone the whole HD, ... It can not read/verify an image created using TrueImage Home 2009. ...
    (microsoft.public.windowsxp.general)