Gentoo Archives: gentoo-user

From: gottlieb@×××.edu
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Merging separate /usr back into / - one last time...
Date: Mon, 02 Dec 2013 16:26:35
Message-Id: 874n6rxlqs.fsf@nyu.edu
In Reply to: [gentoo-user] Merging separate /usr back into / - one last time... by Tanstaafl
1 On Mon, Dec 02 2013, tanstaafl@×××××××××××.org wrote:
2
3 > Is rsync -a enough for my relatively simple system setup, or would
4 > using any or all of the other options suggested in those threads be
5 > safer/better? Specifically:
6 >
7 > -a, or -axAHX, or -apogXx, or -PvasHAX
8
9 I am not an expert but here goes.
10 -x would not hurt but should not be needed since i believe that your
11 current /dev/vg/usr is just one partition.
12
13 I didn't need -X -A because I don't have acls or extended attributes
14
15 > or should I go with a combined -apogsvxAHPX ?
16 >
17 > So, here's the plan, please check me...
18 >
19 > 1. Boot off of the latest gentoo LiveDVD
20 >
21 > 2. Mount / and create new /usr directory
22
23 I am missing something. I would have thought your old / (dev/sda3)
24 already has an empty /usr directory where you previously mounted
25 /dev/vg/usr
26
27 > mount /dev/sda3 /mnt/gentoo/
28 > mkdir /mnt/gentoo/usr
29 >
30 > 3. Mount old /usr to be moved/merged
31 >
32 > vgscan
33 > vgchange -a y
34 > mount /dev/vg/usr /mnt/gentoo/oldusr
35 >
36 > 4. Copy /oldusr to /usr
37
38 This suggests that your current root (dev/sda3) is big enough to
39 include the previous /usr (dev/vg/usr). That is indeed a simple case.
40 Many of us had to move partitions around to get a big enough partition
41 for / + /usr.
42
43 > rsync -a? /mnt/gentoo/oldusr/ /mnt/gentoo/usr/
44 >
45 > Are the trailing slashes required/important/necessary?
46
47 The first trailing slash (oldusr/) is important. Without it, you would
48 be creating the directory /mnt/gentoo/usr/oldusr. With it (as you
49 wrote) just the contents of /oldusr are copied not the directory itself.
50 So yes you want that slash.
51
52 I don't believe the 2nd trailing / (usr/) is needed, but doesn't hurt.
53 The rsync man page shows both uses and I don't see any words saying
54 anything about the difference. I must say I never noticed the two
55 different uses in the man page can't remember what I used. But again, I
56 believe the results are the same.
57
58 > Which arguments should I use?
59
60 Discussed above
61
62 > 5. Edit /etc/fstab and comment/remove the /usr line
63 >
64 > nano -wc /mnt/gentoo/etc/fstab
65 >
66 > #/dev/vg/usr /usr reiserfs noatime 0 0
67 >
68 > 6. Unmount mounted filesystems
69 >
70 > umount /mnt/gentoo/oldusr
71 > umount /mnt/gentoo
72 >
73 > 7. Reboot into new system
74 >
75 > Done?
76 >
77 > I'm pretty sure that:
78 >
79 > 1. There is no need to chroot into the real system during this process,
80 >
81 > and
82 >
83 > 2. I only need to mount / and the old /usr, no need to mount anything
84 > else (/proc, /sys, /var, /home, activating swap, etc)
85 >
86 > Correct?
87
88 Both of these seem correct to me.
89
90 Good luck!
91
92 allan

Replies

Subject Author
Re: [gentoo-user] Merging separate /usr back into / - one last time... Tanstaafl <tanstaafl@×××××××××××.org>