All of lore.kernel.org
 help / color / mirror / Atom feed
* overlayfs-etc compatibility with volatile-bind
@ 2024-02-07  9:28 Baruch Siach
  2024-02-07 10:53 ` Vyacheslav Yurkov
  0 siblings, 1 reply; 2+ messages in thread
From: Baruch Siach @ 2024-02-07  9:28 UTC (permalink / raw)
  To: Vyacheslav Yurkov; +Cc: openembedded-core

Hi Vyacheslav Yurkov,

overlayfs-etc generates a 'preinit' script that unconditionally remounts
root to make it writable. Later systemd-fstab-generator generates a
mount unit (-.mount) that restores read-only as set in /etc/fstab.

I added an entry to VOLATILE_BINDS for the /home directory. The volatile-binds
recipe creates a systemd mount unit with the condition

  ConditionPathIsReadWrite=!/home

The trouble is that there is no dependency between the rootfs mount unit and
the /home unit. When the /home unit runs first, the condition is false, and
the unit fails. If I later start the /home unit manually, it succeeds, because
rootfs is read-only now.

What is the purpose of mounting root rw in 'preinit'?

Is there any other alternative to make volatile-binds do the right thing?

Thanks,
baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: overlayfs-etc compatibility with volatile-bind
  2024-02-07  9:28 overlayfs-etc compatibility with volatile-bind Baruch Siach
@ 2024-02-07 10:53 ` Vyacheslav Yurkov
  0 siblings, 0 replies; 2+ messages in thread
From: Vyacheslav Yurkov @ 2024-02-07 10:53 UTC (permalink / raw)
  To: Baruch Siach; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1425 bytes --]

Hi Baruch

> What is the purpose of mounting root rw in 'preinit'?

I guess that was a default, which was not tested with other options
combined.

Do you use read-only-rootfs image feature? I think the script can be
adapted to take that into account.

Thanks,
Slava

On Wed, Feb 7, 2024, 10:30 Baruch Siach <baruch@tkos.co.il> wrote:

> Hi Vyacheslav Yurkov,
>
> overlayfs-etc generates a 'preinit' script that unconditionally remounts
> root to make it writable. Later systemd-fstab-generator generates a
> mount unit (-.mount) that restores read-only as set in /etc/fstab.
>
> I added an entry to VOLATILE_BINDS for the /home directory. The
> volatile-binds
> recipe creates a systemd mount unit with the condition
>
>   ConditionPathIsReadWrite=!/home
>
> The trouble is that there is no dependency between the rootfs mount unit
> and
> the /home unit. When the /home unit runs first, the condition is false, and
> the unit fails. If I later start the /home unit manually, it succeeds,
> because
> rootfs is read-only now.
>
> What is the purpose of mounting root rw in 'preinit'?
>
> Is there any other alternative to make volatile-binds do the right thing?
>
> Thanks,
> baruch
>
> --
>                                                      ~. .~   Tk Open
> Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
>    - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
>

[-- Attachment #2: Type: text/html, Size: 2225 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-07 10:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-07  9:28 overlayfs-etc compatibility with volatile-bind Baruch Siach
2024-02-07 10:53 ` Vyacheslav Yurkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.