private async Task ApplyWindowsImage(WindowsVolumes volumes, InstallOptions options, IObserver <double> progressObserver = null)
        {
            Log.Information("Applying Windows Image...");
            await windowsImageService.ApplyImage(volumes.Windows, options.ImagePath, options.ImageIndex, progressObserver);

            progressObserver?.OnNext(double.NaN);
        }
        private async Task MakeBootable(WindowsVolumes volumes, Phone phone)
        {
            Log.Information("Making Windows installation bootable...");

            var bcdPath         = Path.Combine(volumes.Boot.RootDir.Name, "EFI", "Microsoft", "Boot", "BCD");
            var bcd             = new BcdInvoker(bcdPath);
            var windowsPath     = Path.Combine(volumes.Windows.RootDir.Name, "Windows");
            var bootDriveLetter = volumes.Boot.Letter;
            await ProcessUtils.RunProcessAsync(BcdBootPath, $@"{windowsPath} /f UEFI /s {bootDriveLetter}:");

            bcd.Invoke("/set {default} testsigning on");
            bcd.Invoke("/set {default} nointegritychecks on");
            await volumes.Boot.Partition.SetGptType(PartitionType.Esp);

            var updatedBootVolume = await phone.GetBootVolume();

            Log.Verbose("Updated Boot Volume: {@Volume}", new { updatedBootVolume.Label, updatedBootVolume.Partition, });
            if (!Equals(updatedBootVolume.Partition.PartitionType, PartitionType.Esp))
            {
                Log.Warning("The system partition should be {Esp}, but it's {ActualType}", PartitionType.Esp, updatedBootVolume.Partition.PartitionType);
            }
        }