1 |
Marc Blumentritt, Mon, 27 Dec 2010 16:20:55 +0100: |
2 |
|
3 |
> Hi, |
4 |
> |
5 |
> I have bought myself a Christmas present, a new shiny hard disk. Now I |
6 |
> want to copy my old Gentoo system to my new disk like this: |
7 |
> |
8 |
> 1.) boot with gentoo boot cd |
9 |
> 2.) mount my old system ind /old ( / in one partition, /home, /usr, |
10 |
> /var, /tmp and /opt in lvm2 volumes and /boot on it's own partition) 3.) |
11 |
> mount my new disk ind /new (just 2 partitions, 1 for / and 1 for /boot) |
12 |
> 4.) copy from /old to /new |
13 |
> 5.) modify fstab and prepare grub |
14 |
> 6.) reboot |
15 |
> |
16 |
> Concerning step 4: what is the best copy command? I tried with |
17 |
> |
18 |
> cp -a /old/* /new |
19 |
> |
20 |
> but got some problems in /home. My user dir got the wrong permissions (I |
21 |
> d'ont know, if this is in some way connected with /home being a mount |
22 |
> point). Of course this could be the same in other dirs. |
23 |
> |
24 |
> Is there a better method? I read years ago on this list about using tar |
25 |
> with this (piping the tar output into a second tar command, which |
26 |
> extracts the files to their final destination). |
27 |
> |
28 |
> Are there other tools? Or did I use cp in a wrong way? |
29 |
> |
30 |
> Regards |
31 |
> Marc |
32 |
|
33 |
Try |
34 |
rsync -auD --verbose --progress --exclude="/proc" --exclude="/sys" -- |
35 |
exclude="/dev" /old/ /new/ |
36 |
|
37 |
and then copy over /dev/console, /dev/tty and/or any other /devices |
38 |
|
39 |
Lubos |