sync() should be called before reboot(RB_AUTOBOOT), otherwise data written to disks might be lost. Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@xxxxxxx> --- guest/init.c | 1 + 1 file changed, 1 insertion(+) diff --git a/guest/init.c b/guest/init.c index 1f9cd048a..52f6567da 100644 --- a/guest/init.c +++ b/guest/init.c @@ -72,6 +72,7 @@ int main(int argc, char *argv[]) } while (corpse != child); } + sync(); reboot(RB_AUTOBOOT); printf("Init failed: %s\n", strerror(errno)); -- 2.20.1