+ // HACK: WARNING: We cannot write on this FS yet!
+ // See fslist.c:GetFileSystem()
+ if (List->OriginalSystemPartition->PartitionType == PARTITION_EXT2 ||
+ List->OriginalSystemPartition->PartitionType == PARTITION_IFS)
+ {
+ DPRINT1("Recognized file system %S that doesn't support write support yet!\n",
+ FileSystem->FileSystemName);
+ goto FindAndUseAlternativeSystemPartition;
+ }
+
+ DPRINT1("Use existing active system partition %lu in disk %lu, drive letter %c\n",
+ List->SystemPartition->PartitionNumber,
+ List->SystemDisk->DiskNumber,
+ (List->SystemPartition->DriveLetter == 0) ? '-' : List->SystemPartition->DriveLetter);
+
+ return;
+
+FindAndUseAlternativeSystemPartition:
+ /*
+ * We are here because we have not found any (active) candidate
+ * system partition that we know how to support. What we are going
+ * to do is to change the existing system partition and use the
+ * partition on which we install ReactOS as the new system partition,
+ * and then we will need to add in FreeLdr's entry a boot entry to boot
+ * from the original system partition.
+ */
+
+ /* Unset the old system partition */
+ List->SystemPartition->BootIndicator = FALSE;
+ List->SystemDisk->LayoutBuffer->PartitionEntry[List->SystemPartition->PartitionIndex].BootIndicator = FALSE;
+ List->SystemDisk->LayoutBuffer->PartitionEntry[List->SystemPartition->PartitionIndex].RewritePartition = TRUE;
+ List->SystemDisk->Dirty = TRUE;
+
+UseAlternativeSystemPartition:
+ List->SystemDisk = List->CurrentDisk;
+ List->SystemPartition = List->CurrentPartition;
+
+ DPRINT1("Use alternative active system partition %lu in disk %lu, drive letter %c\n",
+ List->SystemPartition->PartitionNumber,
+ List->SystemDisk->DiskNumber,
+ (List->SystemPartition->DriveLetter == 0) ? '-' : List->SystemPartition->DriveLetter);
+
+SetSystemPartition:
+ /* Set the new active system partition */
+ List->SystemPartition->BootIndicator = TRUE;
+ List->SystemDisk->LayoutBuffer->PartitionEntry[List->SystemPartition->PartitionIndex].BootIndicator = TRUE;
+ List->SystemDisk->LayoutBuffer->PartitionEntry[List->SystemPartition->PartitionIndex].RewritePartition = TRUE;
+ List->SystemDisk->Dirty = TRUE;