mirror of
https://github.com/nix-community/disko.git
synced 2024-09-19 02:27:27 +03:00
make-disk-image: umount filesystems after install
The vmTools in nixpkgs shuts the VM down with poweroff -f, which does not cleanly umount the filesystems. This may lead to filesystem corruption on the newly created image.
This commit is contained in:
parent
fa5db12d76
commit
c38f369ee4
@ -62,6 +62,7 @@ let
|
|||||||
'';
|
'';
|
||||||
installer = ''
|
installer = ''
|
||||||
${systemToInstall.config.system.build.nixos-install}/bin/nixos-install --system ${systemToInstall.config.system.build.toplevel} --keep-going --no-channel-copy -v --no-root-password --option binary-caches ""
|
${systemToInstall.config.system.build.nixos-install}/bin/nixos-install --system ${systemToInstall.config.system.build.toplevel} --keep-going --no-channel-copy -v --no-root-password --option binary-caches ""
|
||||||
|
umount -Rv ${systemToInstall.config.disko.rootMountPoint}
|
||||||
'';
|
'';
|
||||||
QEMU_OPTS = lib.concatMapStringsSep " " (disk: "-drive file=${disk.name}.raw,if=virtio,cache=unsafe,werror=report") (lib.attrValues nixosConfig.config.disko.devices.disk);
|
QEMU_OPTS = lib.concatMapStringsSep " " (disk: "-drive file=${disk.name}.raw,if=virtio,cache=unsafe,werror=report") (lib.attrValues nixosConfig.config.disko.devices.disk);
|
||||||
in
|
in
|
||||||
|
Loading…
Reference in New Issue
Block a user