tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Autoconfiguring root device and fstab(5) (wedges?)



In article <20110328081707.GA442%apb-laptoy.apb.alt.za@localhost>,
Alan Barrett  <apb%cequrux.com@localhost> wrote:
>On Mon, 28 Mar 2011, Masao Uebayashi wrote:
>>>> I am not sure if this will help you, but there's a magic 
>>>> string, "from_mount", which can be used in the first field of 
>>>> the fstab entry
>>>
>>> Yep; just tested it though, and fsck complains that it can't 
>>> stat ``from_mount'', reason is... obvious.
>>
>> Can't we move the logic from mount(8) to getfsent(3) internal?
>
>It should be easy enough to teach fsck(8) to handle 
>fs_spec="from_mount".  I am not keen on moving the logic to 
>getfsent(3), because that's just a file parser, independent of 
>system state.

We can't move the logic from mount(8) to anywhere because
fsck(8) needs to work when a filesystem is not mounted, and mount(8)
uses getmntinfo(3) to determine the "from_mount" values.

What could be done (but it would be fragile) is to provide a way
to match the <fs>_fsmnt[] field (last mounted on), but this is not
provided by all filesystems and there can be conflicts.

christos



Home | Main Index | Thread Index | Old Index