<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jun 1, 2015 at 5:56 PM, cee1 <span dir="ltr"><<a href="mailto:fykcee1@gmail.com" target="_blank">fykcee1@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
In case of no initrd and mounting the root by specifying<br>
"root=/dev/sdaN" in kernel command line, how many time is the root<br>
mounted in systemd?<br></blockquote><div><br></div><div>It's only mounted once, by the kernel. systemd won't mount it again, it doesn't need to. It will however _remount_ it if needed, to apply the new options like rw.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I find:<br>
1. systemd will generate a "-.mount" unit from /proc/self/mountsinfo<br>
2. systemd will generate a "-.mount" unit by systemd-fstab-generator<br>
<br>
Q:<br>
* Which one takes priority?<br></blockquote><div><br></div><div>The latter, because it's a real unit, not just an in-memory representation of the current state.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* For 1, it will not do the mount action, but 2 will. Am I right? If<br>
so, why we mount root here(again)?<br></blockquote><div><br></div><div>No. If it's already mounted, then it's mounted.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
And systemd-remount-fs.service will remount the root again, thus apply<br>
options in fstab?<br></blockquote><div><br></div><div>Yes, such as rw.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
BTW, where are the units generated by generators?<br></blockquote><div><br></div><div>/run/systemd/generator*/</div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>