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

USETUP detects active ext2 partition as raw and attempts to format

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        1. boot_after_ros_inst.png
          9 kB
          Julcar
        2. fdisk_after_ros_install.png
          9 kB
          Julcar
        3. fdisk_before_ros_inst.png
          6 kB
          Julcar
        4. image-2019-08-08-00-04-20-484.png
          17 kB
          hbelusca
        5. image-2019-08-08-00-05-39-058.png
          6 kB
          hbelusca
        6. image-2019-08-08-00-05-55-006.png
          11 kB
          hbelusca
        7. linux_dual.7z
          7.68 MB
          Julcar
        8. ros_inst_1st_stage.png
          9 kB
          Julcar
        9. ros_selected_active_partition.png
          9 kB
          Julcar

        Issue Links

          Activity

            People

              hbelusca hbelusca
              Julcar Julcar
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: