From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Mon, 10 Aug 2020 15:46:15 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= Message-ID: <20200810134615.sipkuohxucftbcy2@pengutronix.de> References: <20200810101713.247725-1-r.schwebel@pengutronix.de> MIME-Version: 1.0 In-Reply-To: <20200810101713.247725-1-r.schwebel@pengutronix.de> Subject: Re: [ptxdist] [PATCH] rc-once: make sure data makes it to the medium List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: multipart/mixed; boundary="===============1500072686==" Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Robert Schwebel --===============1500072686== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kp2yvx7w2omjz6ab" Content-Disposition: inline --kp2yvx7w2omjz6ab Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Adding a sync helps. >=20 > Signed-off-by: Robert Schwebel > --- > projectroot/usr/lib/systemd/systemd-rc-once | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/projectroot/usr/lib/systemd/systemd-rc-once b/projectroot/us= r/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() { > } > =20 > 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 --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --kp2yvx7w2omjz6ab Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAl8xT6QACgkQwfwUeK3K 7AkbPgf+NrzDaGCbHNaHcBbJ/gfCvGu60mKWHo59hZLeW4MAOyf/6XjzJgEq0+ey Rf1PIHYAd2sn2fofvKtHo+SG7uU3I608McyRM3DO1u/yhmDyByyyVQ9JBMiSdqZO aimPXDFTIsjiln16OxIgecrE+QFKh5c5/bW0lKuA5H1D6wbfbkh2YmSPPI8dLofC BNx3GTJmJdZCJ0p0fwY13nQ21kdL5EmnTb+mSsDnt+CDdtcxpLlCUx7JGNuM1Zt2 y1epXrOrlTDXGXAL7AlA1vtZ5QkYK4RVAbupiUoj5JME/yQ9MaHb2vEy3zdfuWpk De5Lx0FQVLDTI1HwhwkUOizywcH2ZQ== =B7w6 -----END PGP SIGNATURE----- --kp2yvx7w2omjz6ab-- --===============1500072686== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de --===============1500072686==--