quickly: copy out of squashes so systemd doesn't try to unmount them

This commit is contained in:
Graham Christensen 2020-06-08 08:26:06 -04:00
parent 52ff503c48
commit ee99e276cf
No known key found for this signature in database
GPG Key ID: FE918C3A98C1030F
2 changed files with 6 additions and 2 deletions

View File

@ -48,14 +48,18 @@ in
for f in $(rev /nix-store-isos); do for f in $(rev /nix-store-isos); do
dest=$(basename "$f" | rev) dest=$(basename "$f" | rev)
echo "$dest"
mkdir "/mnt-root/nix/.squash/$dest" mkdir "/mnt-root/nix/.squash/$dest"
mount -t squashfs -o loop "$f" "/mnt-root/nix/.squash/$dest" mount -t squashfs -o loop "$f" "/mnt-root/nix/.squash/$dest"
( (
cd /mnt-root/nix/store/ cd /mnt-root/nix/store/
ln -s "../.squash/$dest/$dest" "./$dest" cp -ar "../.squash/$dest/$dest" "./$dest"
) )
umount "/mnt-root/nix/.squash/$dest"
rm "$f"
set +x set +x
done done
ls -la /mnt-root/nix/store | grep system-nixos ls -la /mnt-root/nix/store | grep system-nixos
ls -la /mnt-root/nix/store/*-nixos-system*/ ls -la /mnt-root/nix/store/*-nixos-system*/
ls -la /mnt-root/nix/store/*-nixos-system*/* ls -la /mnt-root/nix/store/*-nixos-system*/*

View File

@ -22,7 +22,7 @@ let
machineConfig = pythonDict ( machineConfig = pythonDict (
{ {
qemuFlags = "-boot order=n -m 2000"; qemuFlags = "-boot order=n -m 4000";
netBackendArgs = "tftp=${config.system.build.ipxeBootDir},bootfile=netboot.ipxe"; netBackendArgs = "tftp=${config.system.build.ipxeBootDir},bootfile=netboot.ipxe";
} // extraConfig } // extraConfig
); );