anchor.diff:        # And just to be sure, check that the machine still boots after
         # "nixos-rebuild switch".
         $machine = createMachine({ ${hdFlags} qemuFlags => "${qemuFlags}" });
  +      ${preBootCommands}
         $machine->waitForUnit("network.target");
         $machine->shutdown;
       '';
   
   
     makeInstallerTest = name:
  -    { createPartitions, testChannel ? false, grubVersion ? 2
  -    , grubDevice ? "/dev/vda", grubIdentifier ? "uuid", extraConfig ? ""
  +    { createPartitions, preBootCommands ? "", extraConfig ? ""
  +    , testChannel ? false, grubVersion ? 2, grubDevice ? "/dev/vda"
  +    , grubIdentifier ? "uuid"
       }:
       makeTest {
         inherit iso;
         name = "installer-" + name;
         nodes = if testChannel then { inherit webserver; } else { };
         testScript = testScriptFun {
  -        inherit createPartitions testChannel grubVersion grubDevice
  -                grubIdentifier extraConfig;
  +        inherit createPartitions preBootCommands testChannel grubVersion
  +                grubDevice grubIdentifier extraConfig;
         };
       };
   
  
positive.code: 
        # Check whether a writable store build works
        $machine = createMachine({ ${hdFlags} qemuFlags => "${qemuFlags}" });
        $machine->waitForUnit("multi-user.target");
        $machine->copyFileFromHost(
            "${ makeConfig { inherit testChannel grubVersion grubDevice grubIdentifier extraConfig; readOnly = false; forceGrubReinstallCount = 2; } }",
  
negative.code:       # Now see if we can boot the installation.
        $machine = createMachine({ ${hdFlags} qemuFlags => "${qemuFlags}" });
  
        # For example to enter LUKS passphrase
        ${preBootCommands}
  
        # Did /boot get mounted?
        $machine->waitForUnit("local-fs.target");
  
  