Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 May 95 12:54:06 GMT
From:      "gj%pcs.dec.com@inet-gw-1.pa.dec.com" <garyj@rks32.pcs.dec.com>
To:        current%freebsd.org@inet-gw-1.pa.dec.com
Subject:   bios boot bug ?
Message-ID:  <m0sC55a-0005PIC@rks32.pcs.dec.com>

next in thread | raw e-mail | index | archive | help

I tried to boot a newly installed system last night using the new bios
boot code (generated on May 13).

No matter what values I used in fdisk I always got
	"partition is out of reach from the bios"

Looking at the code, the following fragment from disk.c appears bogus:

                /* This little trick is for OnTrack DiskManager disks */
                boff = dl->d_partitions[part].p_offset -
                        dl->d_partitions[2].p_offset + sector;

                /* This is a good idea for all disks */
                bsize = dl->d_partitions[part].p_size;
                bend = boff + bsize - 1 ;
                if (bend / spc > 1024) {
                        printf("partition is out of reach from the bios\n");
                        return 1;
                }

spc is sectors per cylinder.

The problem is that the values in the disklabel are byte values, not sector
values. Or has this changed without me noticing ?

When I commented out this fragment, I was at least able to load /kernel (then
I ran into problems with the f*cking disk slice code...grrr).

Seems like this should read

                /* This little trick is for OnTrack DiskManager disks */
                boff = (dl->d_partitions[part].p_offset -
                        dl->d_partitions[2].p_offset) >> 9 + sector;

                /* This is a good idea for all disks */
                bsize = dl->d_partitions[part].p_size;
                bend = boff + (bsize >> 9) - 1 ;
                if (bend / spc > 1024) {
                        printf("partition is out of reach from the bios\n");
                        return 1;
                }


to convert to sectors.

Note that I haven't tried out this change, I'm at work.

Am I totally fubar here ?

Gary J.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0sC55a-0005PIC>