diff --git a/src/installer/hw.c b/src/installer/hw.c index 52d051181..0d5fe2fb0 100644 --- a/src/installer/hw.c +++ b/src/installer/hw.c @@ -969,3 +969,9 @@ int hw_write_fstab(struct hw_destination* dest) { return 0; } + +void hw_sync() { + sync(); + sync(); + sync(); +} diff --git a/src/installer/hw.h b/src/installer/hw.h index 48d24bf47..96fc0919b 100644 --- a/src/installer/hw.h +++ b/src/installer/hw.h @@ -124,4 +124,6 @@ int hw_stop_all_raid_arrays(); int hw_install_bootloader(struct hw_destination* dest); int hw_write_fstab(struct hw_destination* dest); +void hw_sync(); + #endif /* HEADER_HW_H */ diff --git a/src/installer/main.c b/src/installer/main.c index e3ed7957e..ad4e0c54b 100644 --- a/src/installer/main.c +++ b/src/installer/main.c @@ -676,6 +676,8 @@ EXIT: free(sourcedrive); if (destination) { + hw_sync(); + hw_umount_filesystems(destination, DESTINATION_MOUNT_PATH); free(destination); }