1 |
Mick writes: |
2 |
|
3 |
> I used: |
4 |
> |
5 |
> tar -X file.list -lcvSf - . | (cd /new_gentoo_partition; tar -xpvf - ) |
6 |
> |
7 |
> to clone a gentoo / partition to another partition on the same disk (I |
8 |
> want to run some tests from it). |
9 |
> |
10 |
> The file.list has this is in it: |
11 |
> |
12 |
> tmp/* |
13 |
> proc/* |
14 |
> sys/* |
15 |
> dev/* |
16 |
> etc/mtab |
17 |
> usr/portage/distfiles/* |
18 |
|
19 |
Which also excludes /usr/include/sys, not only /sys. And so on. You |
20 |
probably have to rewrite this as ./tmp/* , but I did not test this. |
21 |
|
22 |
And I just learnt that -l is no longer a synonym for --one-file-system, |
23 |
at least for tar 1.25. I'd do it with a bind mount this: |
24 |
|
25 |
mount -o bind / /mnt |
26 |
cd /mnt |
27 |
tar -cvSf - . | (cd /new_gentoo_partition; tar -xpvf - ) |
28 |
|
29 |
This way, the original /dev is being copied (including entries console |
30 |
and null), without the udev stuff that is mounted on top of /dev, while |
31 |
with --one-file-system only the empty /dev directory would be created. |
32 |
|
33 |
Wonko |