[ros-diffs] [cgutman] 55316: [USETUP] - Fix selection of the active partition - Running 1st stage setup to a USB drive now results in a bootable USB drive that successfully runs FreeLoader which can load the R...

cgutman at svn.reactos.org cgutman at svn.reactos.org
Mon Jan 30 04:52:37 UTC 2012


Author: cgutman
Date: Mon Jan 30 04:52:37 2012
New Revision: 55316

URL: http://svn.reactos.org/svn/reactos?rev=55316&view=rev
Log:
[USETUP]
- Fix selection of the active partition
- Running 1st stage setup to a USB drive now results in a bootable USB drive that successfully runs FreeLoader which can load the ROS kernel, HAL, and other critical boot executables from the USB drive but ROS fails early in boot after FreeLoader hands control to the kernel

Modified:
    branches/usb-bringup-trunk/base/setup/usetup/interface/usetup.c

Modified: branches/usb-bringup-trunk/base/setup/usetup/interface/usetup.c
URL: http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/base/setup/usetup/interface/usetup.c?rev=55316&r1=55315&r2=55316&view=diff
==============================================================================
--- branches/usb-bringup-trunk/base/setup/usetup/interface/usetup.c [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/base/setup/usetup/interface/usetup.c [iso-8859-1] Mon Jan 30 04:52:37 2012
@@ -1465,8 +1465,6 @@
         }
     }
 
-    CheckActiveBootPartition(PartitionList);
-
     DrawPartitionList(PartitionList);
 
     /* Warn about partitions created by Linux Fdisk */
@@ -2381,8 +2379,6 @@
             else if (!FileSystemList->Selected->FormatFunc)
                 return QUIT_PAGE;
 
-            CheckActiveBootPartition(PartitionList);
-
 #ifndef NDEBUG
             CONSOLE_PrintTextXY(6, 12,
                                 "Disk: %I64u  Cylinder: %I64u  Track: %I64u",
@@ -2442,19 +2438,6 @@
                                    PathBuffer);
             DPRINT("DestinationRootPath: %wZ\n", &DestinationRootPath);
 
-
-            /* Set SystemRootPath */
-            RtlFreeUnicodeString(&SystemRootPath);
-            swprintf(PathBuffer,
-                     L"\\Device\\Harddisk%lu\\Partition%lu",
-                     PartitionList->ActiveBootDisk->DiskNumber,
-                     PartitionList->ActiveBootPartition->
-                         PartInfo[PartitionList->ActiveBootPartitionNumber].PartitionNumber);
-            RtlCreateUnicodeString(&SystemRootPath,
-                                   PathBuffer);
-            DPRINT("SystemRootPath: %wZ\n", &SystemRootPath);
-
-
             if (FileSystemList->Selected->FormatFunc)
             {
                 Status = FormatPartition(&DestinationRootPath,
@@ -2504,15 +2487,6 @@
     PartitionList->CurrentPartition->PartInfo[PartNum].PartitionNumber);
     RtlCreateUnicodeString(&DestinationRootPath, PathBuffer);
     DPRINT("DestinationRootPath: %wZ\n", &DestinationRootPath);
-
-    /* Set SystemRootPath */
-    RtlFreeUnicodeString(&SystemRootPath);
-    swprintf(PathBuffer,
-             L"\\Device\\Harddisk%lu\\Partition%lu",
-    PartitionList->ActiveBootDisk->DiskNumber,
-    PartitionList->ActiveBootPartition->PartInfo[PartNum].PartitionNumber);
-    RtlCreateUnicodeString(&SystemRootPath, PathBuffer);
-    DPRINT("SystemRootPath: %wZ\n", &SystemRootPath);
 
     CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_CHECKINGPART));
 
@@ -3371,8 +3345,21 @@
     UCHAR PartitionType;
     BOOLEAN InstallOnFloppy;
     USHORT Line = 12;
+    WCHAR PathBuffer[MAX_PATH];
 
     CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));
+
+    CheckActiveBootPartition(PartitionList);
+
+    RtlFreeUnicodeString(&SystemRootPath);
+    swprintf(PathBuffer,
+             L"\\Device\\Harddisk%lu\\Partition%lu",
+             PartitionList->ActiveBootDisk->DiskNumber,
+             PartitionList->ActiveBootPartition->
+                PartInfo[PartitionList->ActiveBootPartitionNumber].PartitionNumber);
+    RtlCreateUnicodeString(&SystemRootPath,
+                           PathBuffer);
+    DPRINT("SystemRootPath: %wZ\n", &SystemRootPath);
 
     PartitionType = PartitionList->ActiveBootPartition->
         PartInfo[PartitionList->ActiveBootPartitionNumber].PartitionType;




More information about the Ros-diffs mailing list