[haiku-bugs] Re: [Haiku] #11019: Boot fail with SATA card and drive attached but not used by Haiku

  • From: "jstressman" <trac@xxxxxxxxxxxx>
  • Date: Fri, 25 Jul 2014 06:32:32 -0000

#11019: Boot fail with SATA card and drive attached but not used by Haiku
----------------------------------+----------------------------
   Reporter:  jstressman          |      Owner:  bonefish
       Type:  bug                 |     Status:  assigned
   Priority:  normal              |  Milestone:  R1
  Component:  System/Boot Loader  |    Version:  R1/Development
 Resolution:                      |   Keywords:
 Blocked By:                      |   Blocking:
Has a Patch:  0                   |   Platform:  All
----------------------------------+----------------------------

Comment (by jstressman):

 TRACE_DEVICES didn't seem to help, so on the advice of Diver and jessicah
 I added a bunch of dprintfs to help narrow down the problem point.

 == from src/system/boot/platform/bios_ia32/devices.cpp - line 521 ==

 {{{
 static status_t
 add_block_devices(NodeList *devicesList, bool identifierMissing)
 {
         if (sBlockDevicesAdded)
                 return B_OK;

         uint8 driveCount;
         if (get_number_of_drives(&driveCount) != B_OK)
                 return B_ERROR;

 dprintf("## debug 0\n");

         dprintf("number of drives: %d\n", driveCount);

 dprintf("## debug 1\n");

         for (int32 i = 0; i < driveCount; i++) {
 dprintf("## debug 2\n");
                 uint8 driveID = i + 0x80;
 dprintf("## debug 3\n");
                 if (driveID == gBootDriveID) {
 dprintf("## debug 4\n");
                         continue;
 dprintf("## debug 5\n");
                 }
                 BIOSDrive *drive = new(nothrow) BIOSDrive(driveID);
 dprintf("## debug 6\n");
                 if (drive->InitCheck() != B_OK) {
 dprintf("## debug 7\n");
                         dprintf("could not add drive %u\n", driveID);
 dprintf("## debug 8\n");
                         delete drive;
 dprintf("## debug 9\n");
                         continue;
 dprintf("## debug 10\n");
                 }
 dprintf("## debug 11\n");

                 // Only add usable drives
                 if (is_drive_readable(drive)) {
 dprintf("## debug 12\n");
                         devicesList->Add(drive);
 dprintf("## debug 13\n");
                 } else {
 dprintf("## debug 14\n");
                         dprintf("could not read from drive %" B_PRIu8 ",
 not adding\n", driveID);
                         delete drive;
                         continue;
                 }
 dprintf("## debug 15\n");

                 if (drive->FillIdentifier() != B_OK)
 dprintf("## debug 16\n");
                         identifierMissing = true;
         }

 dprintf("before devicesList if statement\n");

         if (identifierMissing) {
                 // we cannot distinguish between all drives by identifier,
 we need
                 // compute checksums for them
 dprintf("inside devicesList if statement - before
 find_unique_check_sums\n");
                 find_unique_check_sums(devicesList);
 dprintf("inside devicesList if statement - after
 find_unique_check_sums\n");
         }

 dprintf("after devicesList if statement\n");

         sBlockDevicesAdded = true;
         return B_OK;
 }

 }}}


 == section of the log where it works fine and keeps booting ==
 {{{
 Using mode 0x118
 VESA compatible graphics!
 EDID1: 4f
 EDID2: ebx 0
 Welcome to the Haiku boot loader!
 ## debug 0
 number of drives: 1
 ## debug 1
 ## debug 2
 ## debug 3
 ## debug 4
 before devicesList if statement
 inside devicesList if statement - before find_unique_check_sums
 inside devicesList if statement - after find_unique_check_sums
 after devicesList if statement
 add_partitions_for(0x001053b8, mountFS = no)
 add_partitions_for(fd = 0, mountFS = no)
 0x00105520 Partition::Partition
 0x00105520 Partition::Scan()
 check for partitioning_system: GUID Partition Map
 check for partitioning_system: Intel Partition Map
   priority: 810
 check for partitioning_system: Intel Extended Partition
 0x00105698 Partition::Partition
 0x00105520 Partition::AddChild 0x00105698
 0x00105698 Partition::SetParent 0x00105520
 new child partition!
 0x00105770 Partition::Partition

 ... keeps booting fine ...
 }}}


 == end of log where it reboots ==
 {{{
 Using mode 0x118
 VESA compatible graphics!
 EDID1: 4f
 EDID2: ebx 0
 Welcome to the Haiku boot loader!
 ## debug 0
 number of drives: 2
 ## debug 1
 ## debug 2
 ## debug 3
 ## debug 4
 ## debug 2
 ## debug 3
 ## debug 6
 ## debug 11
 }}}

--
Ticket URL: <https://dev.haiku-os.org/ticket/11019#comment:11>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: