[systemd-devel] [PATCH] fstab-generator: If we wait indefinitely for a mount, wait also for the device
Tom Gundersen
teg at jklm.no
Fri Mar 1 07:32:16 PST 2013
On Fri, Mar 1, 2013 at 3:37 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Fri, 01.03.13 15:33, Harald Hoyer (harald at redhat.com) wrote:
>
>>
>> Am 01.03.2013 15:30, schrieb Lennart Poettering:
>> > On Fri, 01.03.13 15:13, harald at redhat.com (harald at redhat.com) wrote:
>> >
>> >> From: Harald Hoyer <harald at redhat.com>
>> >>
>> >> Write out "JobTimeoutSec=0" for the device the mountpoint (which does
>> >> not timeout) waits for.
>> >>
>> >> This helps with grabbing a cup of coffee while booting and not have
>> >> the crypto password dialog timeout and systemd in a failed state.
>> >
>> > Hmm, this hooks into "wait", which is initialized from the kernel
>> > cmdline rootwait? What are the precise semantics of the kernel there
>> > regarding this flag, in a non-initrd case? We probably should mimic the
>> > kernel here is good as we can...
>> >
>> > So, in the non-initrd case: what does rootwait do on the kernel cmdline?
>> > And what happens if it is not used?
>>
>> rootwait [KNL] Wait (indefinitely) for root device to show up.
>> Useful for devices that are detected asynchronously
>> (e.g. USB and MMC devices).
>
> Yeah, that's what I read, too, but I cannot make sense of it. See above:
> what is different from when it is not used? Or to be precise: what does
> the kernel precisely do when rootwait is *not* passed?
When rootwait is not passed the kernel calls sys_mount() immediately
(after the equivalent of "udevadm settle") assuming the device will be
there, failing if it is not. Otherwise, if rootwait is called, the
kernel will wait (possibly indefinitely) for the device to appear
before attempting to mount it.
Setting JobTimeout=0 on the device seems correct to me.
-t
More information about the systemd-devel
mailing list