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

Skip unused partition slots for numbering in freeldr

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 0.4.2
    • Bootloader

    Description

      During setup/boot two functions use wrong partition numbers when an unusual partitioning is used.

      The partition number in ARC paths (like multi(0)disk(0)rdisk(0)partition(1)\ReactOS) starts with 1, but only partitions which exist are counted. When the partition used by reactos it the second partition, but the first partition slot in the mbr is unused, the second partition is still number 1. In my case this caused the error message "Opening hive file failed" during boot.

      In the attached patch I did not change the indentation of a code block, to avoid cluttering the patch file. If required I'll create a new version which includes that.

      The changed functions are also called from xbox related code. I don't have an xbox, so I was not able to test that. But the changes should not change the partition numbers of primary partitions if there are no gaps and an extended partition is last. These changes however do change the numbering of logical drives in the extended partition. The existing code simply assumed those start with number 5.

      References:

      Attachments

        1. boot2.log
          23 kB
        2. freeldr_partition_nr.patch
          5 kB
        3. unpart7.png
          unpart7.png
          2 kB

        Issue Links

          Activity

            People

              Heis Spiter Pierre Schweitzer
              wimh wimh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: