1 |
On Mon, Aug 15, 2016 at 5:06 AM, J. Roeleveld <joost@××××××××.org> wrote: |
2 |
> On Monday, August 15, 2016 04:32:29 AM Rich Freeman wrote: |
3 |
>> |
4 |
>> It is also somewhat dependent on a correct fstab. Don't take that for |
5 |
>> granted: the kernel doesn't look at fstab at all when mounting root, |
6 |
>> and neither do most of the other tools, so if your root partition |
7 |
>> isn't correctly defined in fstab you might never know it and dracut |
8 |
>> will get confused. If nothing else once it does have it correctly |
9 |
>> mounted it will read fstab and then mess it up when it re-mounts root |
10 |
>> per "your" instructions. |
11 |
> |
12 |
> I understand what you're saying. Except in my case, that wasn't the cause. |
13 |
> |
14 |
|
15 |
Oh, I agree. I just said that in lieu of replying to every single |
16 |
other email in this thread. :) |
17 |
|
18 |
>> If you just need to tweak dracut behavior you may be better off with a |
19 |
>> dracut module. They're just shell scripts and pretty simple to write. |
20 |
>> That lets you tweak something at some point during boot without having |
21 |
>> to build the entire thing yourself. |
22 |
> |
23 |
> This actually had (or has, not bothered to check current status) a distinct |
24 |
> lack of usable documentation. Looking for clear howto's on creating my own |
25 |
> (embedded into the kernel) initramfs was a lot quicker. |
26 |
|
27 |
Yeah, I found this frustrating as well. |
28 |
|
29 |
This may or may not be helpful: |
30 |
https://rich0gentoo.wordpress.com/2012/01/21/a-quick-dracut-module/ |
31 |
|
32 |
In general the benefits of using dracut are the benefits of using |
33 |
anything that somebody else maintains. You could replace openrc with |
34 |
a single shell script as well, or a fair bit of systemd. That doesn't |
35 |
mean that this is really the optimal approach. |
36 |
|
37 |
|
38 |
>> And since it uses udev it is fairly robust against things like adding |
39 |
>> a drive and now the kernel re-letters everything. |
40 |
|
41 |
> If I were using normal partitioning, I wouldn't need an initramfs. |
42 |
|
43 |
An initramfs is beneficial even if you don't "need" one. To start |
44 |
with it allows you to build a more modular kernel, which is especially |
45 |
beneficial if you aren't customizing your kernel for every host. It |
46 |
also tends to be more robust when something goes wrong. You end up |
47 |
having a rescue shell even if root doesn't mount, more robust fsck/etc |
48 |
during early boot, and it is going to be a lot smarter when you |
49 |
add/remove a drive (since root can be identified by UUID or label). |
50 |
|
51 |
Dracut is becoming common enough that I think it is worth learning... |
52 |
|
53 |
-- |
54 |
Rich |