Gentoo Archives: gentoo-user

From: Rich Freeman <rich0@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] RAID-1 on secondary disks how?
Date: Tue, 29 Jan 2019 19:33:34
Message-Id: CAGfcS_myGcTBcG1LOt+0ySFu2DuCZJqyHUdSkHVOyM_cZv2Akg@mail.gmail.com
In Reply to: Re: [gentoo-user] RAID-1 on secondary disks how? by Grant Taylor
1 On Tue, Jan 29, 2019 at 2:22 PM Grant Taylor
2 <gtaylor@×××××××××××××××××××××.net> wrote:
3 >
4 > On 01/29/2019 12:04 PM, Rich Freeman wrote:
5 > > I don't see the value in using a different configuration on a box simply
6 > > because it happens to work on that particular box. Dracut is a more
7 > > generic solution that allows me to keep hosts the same.
8 >
9 > And if all the boxes in the fleet can function without an initramfs?
10 > Then why have it? Why not apply Occam's Razor & Parsimony and use the
11 > simpler solution. Especially if more complex solutions introduce
12 > additional things that need to be updated.
13
14 If all my boxes could function reliably without an initramfs I
15 probably would do it that way. However, as soon as you throw so much
16 as a second hard drive in a system that becomes unreliable.
17
18 I'm not saying you can't use linux without an initramfs. I'm just
19 questioning why most normal people would want to. I bet that 98% of
20 people who use Linux run an initramfs, and there is a reason for
21 that...
22
23 > > Sure, and I wouldn't expect them to require rebuilding your initramfs
24 > > either. I was speaking generally.
25 >
26 > Modifying things like crypttab and / or adding / removing file systems
27 > from the kernel that are required for boot have caused me to need to
28 > rebuild an initramfs in the past. But that was not necessarily Gentoo,
29 > so it may not be a fair comparison.
30
31 A lot of that is situational. If you have a kernel without btrfs
32 support, and you build btrfs as a module and switch your root
33 filesystem to btrfs, then obviously you'll need to rebuild your
34 initramfs since the one you have can't do btrfs. But, most people
35 would just rebuild their initramfs anytime they rebuild a kernel just
36 to be safe. If you added btrfs support to the kernel (built-in) then
37 it is more of a toss-up, though in the case of btrfs specifically you
38 might still need to regenerate the initramfs to add the btrfs
39 userspace tools to it if you didn't already have them in /usr when you
40 generated it the first time.
41
42 But, if you're running btrfs you're probably forced to use an
43 initramfs in any case.
44
45 In any case, it isn't some kind of automatic thing. Just as some
46 things require rebuilding a kernel, some things require rebuilding an
47 initramfs. I just find it simplest to build an initramfs anytime I
48 build a kernel, and use the make install naming convention so that
49 grub-mkconfig just does its thing automatically.
50
51 IMO Dracut is one of the most robust solutions for these sorts of
52 situations. It is highly modular, easy to extend, and it really tries
53 hard to respect your existing config in /etc. In fact, not only does
54 it put a copy of fstab in the initramfs to help it find your root, but
55 after it mounts the root it checks that version of fstab to see if it
56 is different and then remounts things accordingly.
57
58 If you haven't guessed I'm a bit of a Dracut fan. :)
59
60 --
61 Rich

Replies

Subject Author
Re: [gentoo-user] RAID-1 on secondary disks how? Grant Taylor <gtaylor@×××××××××××××××××××××.net>