NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: install/46027: First stage bootloader (bootxx_ffsv2) on i386 broken for Soekris net4801



The following reply was made to PR install/46027; it has been noted by GNATS.

From: Konrad Schroder <perseant%uw.edu@localhost>
To: gnats-bugs%gnats.netbsd.org@localhost
Cc: David Laight <david%l8s.co.uk@localhost>
Subject: Re: install/46027: First stage bootloader (bootxx_ffsv2) on i386
 broken for Soekris net4801
Date: Thu, 31 May 2012 08:35:12 -0700

 On Thu, May 31, 2012, David Laight wrote:
 
  > Probably also best to check it is a power of 2 as well.
 
 Sure, done.
 
  > Do you actually have media with non-512 byte sectors?
 
 I doubt it very much; it's an ordinary CF card.  I certainly do not have 
 a device with 0- or 4-byte sectors---those were the values being 
 reported from the BIOS via set_geometry().
 
 I think that everything coming back from set_geometry() is bogus in this 
 case; the size of the disk in ed.totsec was also being given an 
 impossible value.
 
 Take care,
 
 -----------------------------------------------------------------------
 Konrad Schroder              Box 352143 -or- 215 Fluke Hall, Mason Road
 Linux System Administrator                     University of Washington
 College of Engineering                          Seattle, WA, 98195, USA
 
 ----
 Index: sys/arch/i386/stand/lib/biosdisk.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/i386/stand/lib/biosdisk.c,v
 retrieving revision 1.40
 diff -u -r1.40 biosdisk.c
 --- sys/arch/i386/stand/lib/biosdisk.c  16 Jan 2012 18:47:57 -0000      1.40
 +++ sys/arch/i386/stand/lib/biosdisk.c  31 May 2012 15:29:44 -0000
 @@ -316,7 +316,9 @@
          gptsector[0] = GPT_HDR_BLKNO;
          if (set_geometry(&d->ll, &ed) == 0 && d->ll.flags & 
 BIOSDISK_INT13EXT) {
                  gptsector[1] = ed.totsec - 1;
 -               d->ll.secsize = ed.sbytes;
 +               /* Sanity check values returned from BIOS */
 +               if (ed.sbytes >= 512 && (ed.sbytes & (ed.sbytes - 1)) == 0)
 +                       d->ll.secsize = ed.sbytes;
          } else {
   #ifdef DISK_DEBUG
                  printf("Unable to determine extended disk geometry - "
 


Home | Main Index | Thread Index | Old Index