1 |
Just a few clarifications below. |
2 |
|
3 |
One thing this discussion is missing is any mention of BIOS / EFI. |
4 |
Most of the discussion below seems most relevant to a legacy BIOS |
5 |
installation. Many specialized Gentoo install docs, like mdadm+lvm, |
6 |
don't really make mention of EFI, or other more recent developments. |
7 |
Now that all the docs are on the wiki I'd strongly encourage anybody |
8 |
with an interest to improve them. Many seasoned Gentoo users barely |
9 |
reference the documentation these days and I think that is part of why |
10 |
they've become a bit dated. |
11 |
|
12 |
A few of the topics below are somewhat controversial, particularly on |
13 |
this list. I tried to stick to the facts and indicate where there is |
14 |
a difference of opinion. I'd prefer not to rehash all the various |
15 |
debates... |
16 |
|
17 |
On Sun, May 17, 2015 at 9:24 AM, Peter Humphrey <peter@××××××××××××.uk> wrote: |
18 |
> On Sunday 17 May 2015 12:48:58 Nuno Magalhães wrote: |
19 |
> |
20 |
>> (Later i want to get rid of systemd-udev and use eudev instead.) |
21 |
> |
22 |
> I use openrc, not systemd. It still works well and has less complication - and |
23 |
> less typing! |
24 |
|
25 |
Most people using openrc are also using systemd-udev (and there is a |
26 |
good chance you do too). The latter was previously named udev and |
27 |
long predates what most people call systemd. Eudev is a fork of udev, |
28 |
which comes from after it came under the systemd umbrella, but before |
29 |
the name change and a number of changes that were controversial. I |
30 |
believe they try to incorporate many of the patches from systemd-udev |
31 |
but some default behaviors are different. |
32 |
|
33 |
In any case, I just wanted to clarify that systemd-udev is not the |
34 |
"systemd" you're probably thinking of. In particular, it doesn't |
35 |
replace openrc or sysvinit. Systemd-udev largely is concerned with |
36 |
populating /dev, and running initialization of hardware when it is |
37 |
detected, based on a configurable set of rules. |
38 |
|
39 |
> |
40 |
>> I intend to use XFS for /. Incidentally, if i later decide to "fork |
41 |
>> out" /usr (or some other subdirectory) into it's own LV, is it "just" |
42 |
>> a mater of copying its contents and updating /etc/fstab? Or should i |
43 |
>> just do it now and expand the LVs if later required (especially if i |
44 |
>> want to use different filesystems)? |
45 |
> |
46 |
> I can't help you with XFS. I know that ext4 in an LV in a VG in a PV on RAID1 |
47 |
> works reliably, even though it does look complex when I write it like that. |
48 |
|
49 |
As far as LVM and xfs themselves go, you can do what you propose. |
50 |
|
51 |
However, Gentoo QA policy is that it is expected that /usr is mounted |
52 |
early in boot. Various tools can break if it is not. Typically this |
53 |
is the responsibility of an initramfs, however you can also use |
54 |
scripts that run early during initialization from / which mount it. |
55 |
If you just stick /usr in fstab and rely on openrc to mount it for you |
56 |
normally, you may or may not have problems. |
57 |
|
58 |
It has been a long time since I actually used such a system in this |
59 |
manner with Gentoo, but the last I saw discussion on it most who used |
60 |
this configuration found it usually worked fine, unless you were using |
61 |
something like a bluetooth keyboard or other key system component that |
62 |
required a lot of userspace tooling to make work. However, as a |
63 |
matter of policy you're on your own if you choose not to mount /usr |
64 |
early during boot in some way. |
65 |
|
66 |
The reason it is not supported is that with the rise of things like |
67 |
bluetooth the list of dependencies possibly required during early boot |
68 |
has grown to the point where we'd end up not even having a /usr before |
69 |
long. My sense is that for the most part most maintainers tend to |
70 |
respect the traditional definition of / and /usr on Gentoo, and thus |
71 |
you can often get away with doing things the traditional way. |
72 |
However, the policy does allow us to end debates over things like udev |
73 |
rules invoking some userspace tool in /usr and such. Some packages |
74 |
more strongly depend on /usr being installed in early boot, and there |
75 |
have been suggestions (but nothing concrete) that Gentoo consider |
76 |
supporting the /usr-move that other distros have embraced (and that |
77 |
would basically get rid of /lib, /bin, and so on). |
78 |
|
79 |
> |
80 |
> Again, legacy grub here. But if you're using an initramfs, from what I've seen |
81 |
> you don't need to specify metadata 0.90. |
82 |
|
83 |
I used to use grub legacy and kernel RAID auto-assembly. As a result |
84 |
I was using metadata 0.90. |
85 |
|
86 |
I found this configuration problematic on rare occasions. There is a |
87 |
reason that mdadm changed the metadata, and why most distros don't do |
88 |
it this way. (more below) |
89 |
|
90 |
> |
91 |
> Damn. I've just checked and something has renamed my /dev/md7 to |
92 |
> /dev/md127. Again. It's just too bad. I shall have to stop it when I get a |
93 |
> quiet moment and reassemble it into /dev/md7. Actually, I know what caused |
94 |
> it but I didn't notice at the time. |
95 |
|
96 |
And this was one of the configuration problems I ran into on rare |
97 |
occasion. Often booting from a rescue CD or such caused something |
98 |
like this to happen. |
99 |
|
100 |
One of the advantages of using an initramfs is that they can be a lot |
101 |
smarter about finding your partitions. You can identify them by UUID |
102 |
or label, and not care as much if mdadm or the kernel renames your |
103 |
device nodes. |
104 |
|
105 |
I'd seriously take a look at dracut, though I don't know if it works |
106 |
with eudev. It certainly should support openrc, and I know that it |
107 |
did back when I was running openrc. It can also mount /usr for you, |
108 |
and in fact it should automatically do so. It also respects your |
109 |
fstab - it uses its internal logic and the kernel boot line to |
110 |
initially find filesystems, but then it reads your /etc/fstab and |
111 |
remounts everything as you define it there just in case something has |
112 |
changed since the last time you built the initramfs/etc. You can |
113 |
define your own modules for it which makes it reasonably easy to get |
114 |
it to do anything at all during early boot, and it doesn't require |
115 |
anything to be built static (it finds required shared objects anywhere |
116 |
on the filesystem and includes them in the initramfs). It can also |
117 |
give you a rescue shell if something goes wrong, and depending on your |
118 |
settings you can make that rescue shell reasonably well-featured |
119 |
(using either dash or bash as you prefer inside, and I imagine you |
120 |
could tell it to install the other on the side). A while ago I needed |
121 |
to run some btrfs tools that aren't in dracut by default and it was |
122 |
trivial to tell dracut to include them, and I forced a shell on next |
123 |
boot which gave me the latest tools and kernel without having to build |
124 |
a rescue CD with them, and a bash shell to run them from. |
125 |
|
126 |
It certainly isn't necessary to use an initramfs to use Gentoo, and I |
127 |
used to be among the more minimalist crowd that avoided them. |
128 |
However, once I took the time to examine dracut it went from being a |
129 |
blob that looked unnecessary to a tool that is often useful. |
130 |
|
131 |
-- |
132 |
Rich |