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

Re: Migrate OS to smaller drive?



Ron Johnson schreef:
On 2010-04-12 03:14, Sjoerd Hardeman wrote:
Ron Johnson schreef:
On 2010-04-11 15:54, Sjoerd Hardeman wrote:
Ron Johnson schreef:
On 2010-04-11 08:11, Clive McBarton wrote:
Sjoerd Hardeman wrote:
mount the new device (mount -odev /dev/newdevice), and do a
 rsync -ax / /media/newdevice.
What exactly is the advantage of this approach over "cp -a" or "mv"?

I would have suggested mv. It has the useful property that you can
easily spot aborted transfers by the fact that the original device is
not empty afterwards.
One note is that I've had issues where symlinks remain pointing to the old drive. (That was a long time ago, though, and maybe I did something
wrong.)
I thought symlinks keep point via a file location memo, like "look at
/usr/share/the/file/you/want", which is the old location just after
copying, but the new location when you boot from your new device and
that becomes root.


Note how at the bottom or this example bar/shoe still points to ../snuffle/shoe/. When you try to "cp -axv / /some/new/root" the same thing will happen. In /usr/bin all the symlinks to /etc/alternatives will still point to the *current* /etc/alternatives not to /some/new/root/etc/alternatives.
As expected, thus. So when change your fstab to let /some/new/root become / then all the symlinks are as they should be.


There's only one way to find out...
Well, I once migrated with these options from an almost broken hard drive to a working one, and I didn't run into problems with symlinks. SO most likely, "it just works"

Sjoerd


Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: