1 |
On 05/04/2010 00:51, Kacper Kopczyński wrote: |
2 |
> Dnia 2010-04-04, o godz. 21:04:03 |
3 |
> Neil Bothwick<neil@××××××××××.uk> napisał(a): |
4 |
> |
5 |
>> On Sun, 04 Apr 2010 20:35:11 +0100, Kerin Millar wrote: |
6 |
>> |
7 |
>>> Whichever way you go about it, ensure that no pseudo-filesystem or |
8 |
>>> bind mounts are present within "/mnt/oldrootfs" at the time. |
9 |
>> |
10 |
>> Use the -x option with rsync to stop it descending into other |
11 |
>> filesystems. |
12 |
>> |
13 |
>> |
14 |
> |
15 |
> AFAIK |
16 |
> |
17 |
> "mount --bind / /somewhere" and rsync'ing /somewhere/ instead of / would |
18 |
> be more useful then "-x" option - stage1,2,3 has static /dev entries |
19 |
> which should also be copied. Since udev mounts it with tmpfs, rsync |
20 |
> with -x would skip those entries (static and from tmpfs). |
21 |
|
22 |
Well, no, because my response was based on the fact that the duplication |
23 |
will be carried out from an alternate environment provided by a CD/DVD, |
24 |
as Meino clearly stated in the original post. Thus, bind mounts, |
25 |
pseudo-filesystems and chroots need not come into the equation |
26 |
whatsoever. Indeed, it's the very same concern that you express which |
27 |
resulted in my recommendation to avoid such shenanigans and keep it |
28 |
simple. Ergo, just mount the root filesystem - nothing else - and copy |
29 |
it as-is. Static /dev entries would be copied without issue, as would |
30 |
everything else. It really couldn't be simpler. |
31 |
|
32 |
You post hinges on the notion that he would be performing the process |
33 |
while booted from the system he is duplicating, in which case your |
34 |
advice would, of course, be entirely sensible. Ergo, he would indeed be |
35 |
best advised to bind mount / to a temporary directory and use that as |
36 |
the source for the exact reasons that you mention. I personally would |
37 |
not recommend doing it under these circumstances but it can certainly be |
38 |
done (though I'd suggest dropping to runlevel 1 first). |
39 |
|
40 |
Cheers, |
41 |
|
42 |
--Kerin |