On Wed, 4 Mar 2015, Ed Ahlsen-Girard wrote:

I decided to upgrade the internal drive, so I hooked up the new on on
the CD's usual SATA channel and installed, having adjust the disklabel
more to suit me (the auto partition of /usr left it really tight on
space, and home was not big enough).

First method: mount all the slices in /tree and run a series of cp -R
as root. Files seemed to get there but something was not right with
permissions when I tried booting the new disk, so I dropped back and
did some research.

Reinstalled, mounted the new slices as before, and ran:

#!/bin/sh

tar -cXf - /* | tar -xpf - -C /tree
tar -cXf - /home/* | tar -xpf - -C /tree/home
tar -cXf - /usr/* | tar -xpf - -C /tree/usr
tar -cXf - /usr/X11R6/* | tar -xpf - -C /tree/usr/X11R6
tar -cXf - /usr/local/* | tar -xpf - -C /tree/usr/local
tar -cXf - /usr/obj/* | tar -xpf - -C  /tree/usr/obj
tar -cXf - /usr/src/* | tar -xpf - -C /tree/usr/src
tar -cXf - /var/* | tar -xpf - -C /tree/var

I had copied the new disk's fstab so that the duids were right when I
started from it.

Results were interesting. I got another copy of /home
inside /tree/home, as well as what I wanted in it, and youtube-dl
turns out to make filenames too long for tar. Nevertheless, I could log
in as myself. But running my usual packages at login didn't work: file
not found.

Should I have not tried to save that much time? I thought tar | tar
would get everything. Do I need to install the packages on the new
disk? Is this a time that pkg_check is my friend?

pax -rw -pe  was what you wanted. Possibly with the -k option too.

Regards,
David

Reply via email to