Mike Edenfield writes:

> The tar method you're looking for is:
> 
> tar -C /old cpf - | tar -C /new xvpf -
> 
> You'll probably not want to do the entire / in a single go,
> since /proc, /sys, and /dev (at least) should be skipped.
> Copy /old/sbin -> /new/sbin, etc. for all of the root
> folders that aren't their own partitions.  The rest you can
> do the entire mount point at once, though I'm not sure you
> really need to copy /tmp either.

Or bind mount root to somewhere else:
mount -o bind / /new
/new then contains all of / , but without the filesystems mounted at root. 
It also has has the original /dev  with its necessary entries console and 
null, but without the stuff udev added.

It also takes care of /tmp. Its contents are unimportant, but the 
permissions of the directory itself matter, the sticky bit needs to be set.

        Wonko

Reply via email to