Gentoo Archives: gentoo-user

From: ich bins <imehl_adresse@×××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Best way to copy /* ?
Date: Mon, 27 Dec 2010 15:33:39
Message-Id: 4D18B132.7060003@gmx.net
In Reply to: [gentoo-user] Best way to copy /* ? by Marc Blumentritt
1 Am 27.12.2010 16:20, schrieb Marc Blumentritt:
2 > Hi,
3 >
4 > I have bought myself a Christmas present, a new shiny hard disk. Now I
5 > want to copy my old Gentoo system to my new disk like this:
6 >
7 > 1.) boot with gentoo boot cd
8 > 2.) mount my old system ind /old ( / in one partition, /home, /usr,
9 > /var, /tmp and /opt in lvm2 volumes and /boot on it's own partition)
10 > 3.) mount my new disk ind /new (just 2 partitions, 1 for / and 1 for /boot)
11 > 4.) copy from /old to /new
12 > 5.) modify fstab and prepare grub
13 > 6.) reboot
14 >
15 > Concerning step 4: what is the best copy command?
16 > 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 >
34 >
35
36
37 http://en.gentoo-wiki.com/wiki/Custom_Stage4