On Friday 08 June 2007, Hemmann, Volker Armin wrote:
On Freitag, 8. Juni 2007, Aleksey Kunitskiy wrote:
Hi all,
Is it safe to move my linux system by using:
#>cp -rp /mnt/old_part /mnt/new_part
and approriate changes in grub.conf/fstab on new system location ?
nope.
cp -a if you really want to use copy. But doesn't kill that the
ctime/mtime making uninstalling things a pain?
No.
cp -a is equivalent to cp -dpPR
and from the man page:
-p same as --preserve=mode,ownership,timestamps
What the OP *will* have a problem with a copying /proc, /dev, /sys and
other virtual filesystems. When I do this trick, I usually dd or tar or
cp -a entire filesystems and then copy / with this trick:
mount -o bind / /some/tmp/dir
cp -a /some/tmp/dir /some/other/dir
This ensures that only files actually on-disk are copied
alan