does not help diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm index 5f720f6641..f5935a29c9 100644 --- a/gnu/installer/final.scm +++ b/gnu/installer/final.scm @@ -201,6 +201,12 @@ (define (assert-exit x) (stop-service 'guix-daemon) (copy-file database-file saved-database) + ;; Sync it to the filesystem. + (let* ((flags O_RDONLY) + (fd (open saved-database flags))) + (fsync fd) + (close fd)) + (mount-cow-store (%installer-target-dir) backing-directory)) (lambda () ;; We need to drag the guix-daemon to the container MNT @@ -218,8 +224,16 @@ (define (assert-exit x) ;; alive. (stop-service 'guix-daemon) - ;; Restore the database and restart it. + ;; Restore the database. (copy-file saved-database database-file) + + ;; Sync it to the filesystem. + (let* ((flags O_RDONLY) + (fd (open database-file flags))) + (fsync fd) + (close fd)) + + ;; And restart guix-daemon. (start-service 'guix-daemon) ;; Finally umount the cow-store and exit the container.