Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-16274

USETUP detects active ext2 partition as raw and attempts to format



    • Bug
    • Resolution: Fixed
    • Major
    • 0.4.12
    • Setup
    • 0.4.12-dev-835-gc1fbc2d651e10590435f4d7722f13b1315457d41


      reactos-bootcd-0.4.12-dev-835-gc1fbc2d-x86-gcc-lin-dbg is the guilty rev.

      My virtual disk is about 1GB more or less.

      Partition 0 uses 256 mb and has an ext2 fs (active)
      Partition 1 uses the remain space (around 768 mb)

      I made a linux installation on Partition 0, Linux distro is MicroCore 4.4.7
      Partition 1 was previously formatted as FAT32 with mkdosfs from linux.

      When installing the guilty rev, Usetup performs a check to the partition 0 (active) to see if is possible to install the bootlader.

      At this point Usetup fails to detect properly the partition 0 filesystem, instead of returning EXT2 it returns RAW

      (base/setup/lib/fsutil.c:298) InferFileSystem -- PartitionType: 0x83 ; FileSystem (guessed): RAW
      (base/setup/lib/fsutil.c:298) InferFileSystem -- PartitionType: 0x0B ; FileSystem (guessed): FAT32

      Then I choose the partition 1 to install ReactOS, but then Usetup requests a format for the partition 0, and gives no other choice than formatting the partition and thus breaking the entire existing linux installation.

      (base/setup/lib/utils/partlist.c:3229) Found active system partition 1 in disk 0, drive letter C
      (base/setup/lib/utils/partlist.c:3624) Use existing active system partition 1 in disk 0, drive letter C
      (base/setup/usetup/usetup.c:2815) FormatState: Start --> FormatSystemPartition

      This is bad as ReactOS currently cannot be installed as alternate OS with dual boot because otherwise it will break others OSes in the same disk.

      Looking deeper into code and in the logs, I found up the clue.

      In my case Usetup is hitting this condition:

                  if ((PartitionList->SystemPartition != InstallPartition) &&
                      (PartitionList->SystemPartition->FormatState == Unformatted))
                      TempPartition = PartitionList->SystemPartition;
                      TempPartition->NeedsCheck = TRUE;
                      // TODO: Should we let the user using a custom file-system,
                      // or should we always use FAT(32) for it?
                      // For "compatibility", FAT(32) would be best indeed.
                      FormatState = FormatSystemPartition;
                      DPRINT1("FormatState: Start --> FormatSystemPartition\n");

      If anyone wish to test the same disk I've used, here is uploaded.


        Issue Links



              hbelusca hbelusca
              Julcar Julcar
              2 Vote for this issue
              4 Start watching this issue