1 |
An alternative to booting to external media, etc, would be a bind |
2 |
mount of / and /usr on separate temporary mount points, then dumping |
3 |
the data between them, leaving the existing system chugging along. A |
4 |
re-mount of the current /usr in -o ro mode might not be a terrible |
5 |
idea in that case. I had a good bit of luck going that route. A simple |
6 |
"cp -a" did the trick on the one system I've bothered with it on so |
7 |
far. I have a couple laptops that're rushing headlong into unsupported |
8 |
land right now though, so I'll be revisiting this soon enough. |
9 |
|
10 |
As for specifics: |
11 |
|
12 |
# Make the temporary working areas |
13 |
mkdir /tmp/a; mkdir /tmp/b |
14 |
# Make sure nothing changes in /usr while the copy is done |
15 |
mount -o remount,ro /usr |
16 |
# Mount a mirror of the source and destination filesystems |
17 |
mount --bind /usr/ /tmp/a |
18 |
mount --bind / /tmp/b |
19 |
# And now, copy. |
20 |
cd /tmp/a |
21 |
cp -a ./ /tmp/b/usr/ |
22 |
|
23 |
The one big point of what not to do would be "mount --rbind". Very |
24 |
important (recursive bind would have the current /usr still visible in |
25 |
/tmp/b/usr/). |
26 |
|
27 |
After all that, comment out /usr in fstab and reboot. You *could* even |
28 |
just drop to a minimal runlevel that doesn't require /usr, unmount the |
29 |
old one and then jump back to your standard runlevel, but due to the |
30 |
reasons this is required now, I'm not entirely sure that option exists |
31 |
anymore (i.e. too much is dependent on /usr). |
32 |
|
33 |
That said, if you are booting to a LiveDVD -- |
34 |
|
35 |
On Mon, Dec 2, 2013 at 1:58 PM, Tanstaafl <tanstaafl@×××××××××××.org> wrote: |
36 |
> On 2013-12-02 1:47 PM, Thanasis <thanasis@××××××××××.org> wrote: |
37 |
>> |
38 |
>> on 12/02/2013 04:02 PM Tanstaafl wrote the following: |
39 |
>>> |
40 |
>>> |
41 |
>>> So, here's the plan, please check me... |
42 |
>>> |
43 |
>>> 1. Boot off of the latest gentoo LiveDVD |
44 |
>> |
45 |
>> |
46 |
>> If you boot a different system to do the rsync, or, if you do it over |
47 |
>> ssh, add the option --numeric-ids |
48 |
> |
49 |
> |
50 |
> Thanks, but no, like I said, I'll just boot that system to a LiveDVD and do |
51 |
> it from there... |
52 |
|
53 |
That actually does fall under "boot a different system" since the |
54 |
users won't line up between a LiveDVD and your actual system. |
55 |
|
56 |
-- |
57 |
Poison [BLX] |
58 |
Joshua M. Murphy |