<div dir="ltr"><div dir="ltr"><div>Hello Silvio,</div><div>Thank you for your response.</div><div>We're using Ansible to automate some tasks so it is easier (and more reliable) to add/remove mount unit files than having to parse the fstab for our specific mount options.</div><div>And as the Systemd documentation says "For tooling, writing mount units should be preferred over editing /etc/fstab" which is something I agree with. I need the </div><div>"x-initrd.mount" option since we are setting up some custom Dracut hooks early in the boot process for the local disk and want this disk mounted before switch-root.</div><div><br></div><div>thanks</div><div>-k</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, May 5, 2025 at 2:11 AM Silvio Knizek <<a href="mailto:killermoehre@gmx.net">killermoehre@gmx.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p>Am Freitag, dem 02.05.2025 um 16:43 -0400 schrieb Kaizaad Bilimorya:</p>
<blockquote type="cite">
<p>Hello,</p>
<p>$ systemctl --version<br>
systemd 252 (252-46.el9_5.3.alma.1)</p>
<p>I was trying to use the "x-initrd.mount" option for some tooling in a mount unit file (instead of using it in fstab and having to parse for it) but it only seems to work in fstab.<br>
The documentation <br>
<a href="https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.html#x-initrd.mount" target="_blank">https://www.freedesktop.org/software/systemd/man/latest/systemd.mount.html#x-initrd.mount</a><br>
doesn't seem to include the line:<br>
"Note that this option can only be used in /etc/fstab, and will be ignored when part of the Options= setting in a unit file." <br>
as some other options do so I thought it should be able to work in a mount unit file. This is probably due to my lack of understanding of the way it works though it would be nice if the documentation stated this explicitly as it does for other options.</p>
<h2>Thanks<br>
-k</h2>
<p>Kaizaad Bilimorya<br>
Systems Administrator - SHARCNET | <a href="http://www.sharcnet.ca" target="_blank">http://www.sharcnet.ca</a><br>
Digital Research Alliance of Canada</p>
</blockquote>
<p>Hi Kaizaad,</p>
<p>if you need a mount in the initrd, than put a proper fstab in the initrd.</p>
<p>But maybe you can elaborate what you actually want to achieve. Because</p>
<blockquote type="cite">
<p>(instead of using it in fstab and having to parse for it)</p>
</blockquote>
<p>sounds wrong.</p>
<p>BR<br>
Silvio</p>
</blockquote></div></div>