Alan McKinnon wrote:
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


  


This is something I have done several times.  This is how I do it.  Boot the Gentoo CD or some other live CD, Knoppix should work.  After you get booted up, mount the partitions, old and new, then use this command:  cp -av /path/to/old /path/to/new and sit back and watch it all scroll by.  It may take a good while depending on how much stuff you have to copy.

I'm not saying that someone else doesn't have a better idea.  I have seen where people tar the stuff then untar it to the new drive.  To me, it is a useless step.  What I use has worked for me every time and I have done it quite a bit.

I hope that helps.

Dale

:-)  :-)  :-)  :-)