On 13/05/2016 16:34, Eric Vidal wrote:
> i forgot :
>
> what puzzle me, if i do this in console (so i'm on tty1 just after the booting ) :
> mount -o remount,ro /
>
> all works fine without trouble
Got it.
When you run s6-rc, it takes a lock on the database.
However, if the database is on a read-only filesystem, it cannot take the
lock (because it needs a writing fd for that), but ignores the error because
nothing is going to modify the database on a read-only filesystem anyway.
If your stage 2 runs s6-rc while your / is rw, then it will take a lock on
the database; attempting to remount / ro in a script run by s6-rc will fail,
because that lock is preventing you from doing that.
Just boot with your / ro already. s6-rc will not grab a lock and everything
will be fine. Note that if you then remount / rw and proceed to modify the
current compiled database while s6-rc is still running, you will be asking
for trouble, and pretty likely to get it.
--
Laurent
Received on Fri May 13 2016 - 15:38:15 UTC