On Mon, Aug 10, 2020 at 12:17:13PM +0200, Robert Schwebel wrote:
> We have seen that, if the first boot runs under a testsuite that powers
> the board off after rc-once is finished, data hasn't found its way to
> the medium. This has been observed to result in an empty ssh key.
> 
> Adding a sync helps.
> 
> Signed-off-by: Robert Schwebel <[email protected]>
> ---
>  projectroot/usr/lib/systemd/systemd-rc-once | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/projectroot/usr/lib/systemd/systemd-rc-once 
> b/projectroot/usr/lib/systemd/systemd-rc-once
> index e14936e40..db3d84e3c 100644
> --- a/projectroot/usr/lib/systemd/systemd-rc-once
> +++ b/projectroot/usr/lib/systemd/systemd-rc-once
> @@ -21,6 +21,8 @@ start() {
>  }
>  
>  umount() {
> +     # make sure rc-once generated data makes it to the medium
> +     sync
>       if ! mount_root_restore; then
>               # remounting rw/ro during the second boot will flush anything
>               # left in the filesystem journal

I would expect that the mount -o remount,ro that is done (sometimes) as
part of mount_root_restore should handle this just fine.

How is your use case? Are you muddying the waters of a bug somewhere
else here?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ptxdist mailing list
[email protected]
To unsubscribe, send a mail with subject "unsubscribe" to 
[email protected]

Reply via email to