Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dracut handling of fstab
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20348

PostPosted: Thu Aug 29, 2024 11:59 pm    Post subject: dracut handling of fstab Reply with quote

While setting up a new install using Gentoo provided binaries and gentoo-dist kernel, I had some challenges getting a working initramfs.

The primary issue is what's going on with dracut's handling of /etc/fstab?
Dracut: Filesystems_and_mount_points:
To further alter the behavior of the initramfs the fstab-sys module is required, plus the following options:

    - Create a file called /etc/fstab.sys, which will be copied to the initramfs and mounted.
    - Specify use_fstab="yes" (or --use-fstab), which will use the system's /etc/fstab instead of /proc/self/mountinfo.
    - Specify add_fstab+=" filename " or --add_fstab filename, which will add the contents of filename to the initramfs's /etc/fstab.
    - Specify --mount fstab mount spec, which adds individual entries into the initramfs' /etc/fstab.

(Note that add_fstab does not automatically trigger fstab-sys to be included in the image; this may be a bug, as use_fstab does include the module but does not actually supply an /etc/fstab.)
What seems reasonable to happen is that it would simply use /etc/fstab. But given the complexity, I'm wondering why that isn't the correct default thing to do?

I tried copying /etc/fstab to /etc/fstab.sys. Having extraneous files seemed like a less than Good Idea, so what I found was the combination of use_fstab="yes" and add_fstab+=" /etc/fstab " in dracut.conf.d. And that all seems like a really convoluted way to include standard file for determining mounts. So I'm wondering if anyone understands the why of it.


The next question would be whether or not dracut tries to determine what to do or if it is all or mostly a curated list of decisions. The most notable oddity was it's seemingly random choices of what firmware to include from /usr/lib/firmware. It also seems relatively easy to determine that lvm is in use (and thus my question if there is any "what should I do" testing... I suspect not).


Finally, not related to dracut, is the method -- seemingly inspired by "Who's on First?" -- Gentoo chose for installing lvm. That is, to instlal lvm, you must of course install lvm[lvm].

On a more serious note, sys-fs/lvm2[lvm] seems like a good opportunity for a separate ebuild that only installs the "non-lvm" parts other packages need (I forget of that's only the dm stuff). That would have saved me at least 20 minutes of trying to figure out why the initramfs wasn't working (there were a few issues).
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum