Gentoo Archives: gentoo-user

From: Jonathan Callen <jcallen@g.o>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: separate / and /usr to require initramfs 2013-11-01
Date: Wed, 02 Oct 2013 23:30:05
Message-Id: 524CAC2F.2010800@gentoo.org
In Reply to: Re: [gentoo-user] separate / and /usr to require initramfs 2013-11-01 by Neil Bothwick
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA512
3
4 On 09/30/2013 06:22 AM, Neil Bothwick wrote:
5 > On Mon, 30 Sep 2013 12:01:27 +0200, Hinnerk van Bruinehsen wrote:
6 >
7 >>> mount /usr -o remount,ro mkdir /newusr rsync -a /usr/ /new/usr/ Comment out /usr line in
8 >>> /etc/fstab mv /usr /oldusr mv /newusr /usr reboot rmdir /oldusr
9 >>>
10 >>> What you do with the old partition is up to you. In this case the discussion was about /usr
11 >>> on LVM, so you just delete it and allocate the space elsewhere when needed.
12 >
13 >> You can even leave out the step of creating a new directory and moving it later if you
14 >> bind-mount you rootfs somewhere, e.g. /mnt/gentoo.
15 >
16 > Good point.
17 >
18 >> You may want to add some parameters to the call to rsync, though (e.g. those that preserve
19 >> permissions, xattrs (especially for SELinux or XT-PaX) and owner/group (should be -pogX),
20 >
21 > -a covers most if not all of those.
22 >
23 >> possibly -x aswell (if you have other filesystems under /usr (e.g. a discrete FS for the
24 >> portage tree).
25 >
26 > Another good point, one of those things you think of immediately after hitting Send :(
27 >
28 >
29
30 Specifically, I would use -axAHX (-rlptgoD are implied by -a, but -HAX are not).
31
32 - From rsync(1):
33
34 - -a archive mode; equals -rlptgoD (no -H,-A,-X)
35 - -r recurse into directories
36 - -l copy symlinks as symlinks
37 - -p preserve permissions
38 - -t preserve modification times
39 - -g preserve group
40 - -o preserve owner
41 - -D preserve device files and special files
42 - -H preserve hard links
43 - -A preserve ACLs (implies -p)
44 - -X preserve extended attributes
45 - -x don't cross filesystem boundaries
46
47 - --
48 Jonathan Callen
49 -----BEGIN PGP SIGNATURE-----
50 Version: GnuPG v2.0.21 (GNU/Linux)
51 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
52
53 iQIcBAEBCgAGBQJSTKwvAAoJELHSF2kinlg4w5kP+wXTGhMSgTFReacg44Ryn8bu
54 bSvq3qZURGbGu5s8Q/Ejg42sZ/0fXdfDD57ZhSpVRWMZ/KZIETZAD2oCkktjr6Vj
55 OELOhz5Pm+UswC201nl6K39PYMijdI+4Mho6QQVoMixa1NI5ZBF7pLBRi+RtJzOx
56 ilEBPmMqE9jt1hdiHnvucq6YEOSANsLRz5rhqnae9BJurrgAMCBOtxvATZiP5YwD
57 6P8OyNy0UeKdYYrvzjmAjY9cmZ78r6rIekF1eDchGklIJfuj/mlwG8r0JlusSc34
58 q7OK4YHdDeNBbMESpuJjeZAYfUycUk90Ag5g+8vx9UqxxJj6FxeeVt3oaPi7sLgj
59 j4HXS2d5FcH9ItO5SToWIccZHp+C0/3w1S7DOT0pNe1SaOMOwSBDpZTtLhseW1C8
60 VVr+G4wGrhQmmBXSePa8ICWJ7Xr8NM16km/h8JrHjtvUisV4AtOuQ0mzv0FGmjVG
61 cgcDqtAjBD00YjVQPQ5VSxb8ZGBjFecMBPhZk2Q1Ea2uUTpb8RdeH0ZvVMXg8N0u
62 g+otGVC56PecjLReYCWnHuM18+f5tKdTvUo+u0GG6epoe2icNi5BPjC9oQjLI6nd
63 hdhfrAKzje5T0vAUZNMO6uYcuSL4zmB/T53Dkl1aIem5kV2I9SVt0ku3WsSCywD+
64 bNu/HzR0SlB4FyFvEEJl
65 =ef8P
66 -----END PGP SIGNATURE-----