On Mon, Aug 15, 2016 at 5:06 AM, J. Roeleveld <jo...@antarean.org> wrote:
> On Monday, August 15, 2016 04:32:29 AM Rich Freeman wrote:
>>
>> It is also somewhat dependent on a correct fstab.  Don't take that for
>> granted: the kernel doesn't look at fstab at all when mounting root,
>> and neither do most of the other tools, so if your root partition
>> isn't correctly defined in fstab you might never know it and dracut
>> will get confused.  If nothing else once it does have it correctly
>> mounted it will read fstab and then mess it up when it re-mounts root
>> per "your" instructions.
>
> I understand what you're saying. Except in my case, that wasn't the cause.
>

Oh, I agree.  I just said that in lieu of replying to every single
other email in this thread.  :)

>> If you just need to tweak dracut behavior you may be better off with a
>> dracut module.  They're just shell scripts and pretty simple to write.
>> That lets you tweak something at some point during boot without having
>> to build the entire thing yourself.
>
> This actually had (or has, not bothered to check current status) a distinct
> lack of usable documentation. Looking for clear howto's on creating my own
> (embedded into the kernel) initramfs was a lot quicker.

Yeah, I found this frustrating as well.

This may or may not be helpful:
https://rich0gentoo.wordpress.com/2012/01/21/a-quick-dracut-module/

In general the benefits of using dracut are the benefits of using
anything that somebody else maintains.  You could replace openrc with
a single shell script as well, or a fair bit of systemd.  That doesn't
mean that this is really the optimal approach.


>> And since it uses udev it is fairly robust against things like adding
>> a drive and now the kernel re-letters everything.

> If I were using normal partitioning, I wouldn't need an initramfs.

An initramfs is beneficial even if you don't "need" one.  To start
with it allows you to build a more modular kernel, which is especially
beneficial if you aren't customizing your kernel for every host.  It
also tends to be more robust when something goes wrong.  You end up
having a rescue shell even if root doesn't mount, more robust fsck/etc
during early boot, and it is going to be a lot smarter when you
add/remove a drive (since root can be identified by UUID or label).

Dracut is becoming common enough that I think it is worth learning...

-- 
Rich

Reply via email to