Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 May 1996 16:56:46 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        erich@uruk.org, terry@lambert.org
Cc:        dutchman@spase.nl, freebsd-hackers@freebsd.org
Subject:   Re: Glitch in install procedure.
Message-ID:  <199605220656.QAA14431@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> [sysinstall issueing a warning if /kernel will be unreadable by the bootstrap]
>> Question: in order to warn you if absolute sector X is past cylinder
>> 1024, it needs to:
   ^^^^ has some sectors on a cylinder >= 1024, i.e., "past cylinder 1023"
>> 
>> 	X%(H*S)		Remainder is H/S value
>> 	X/(H*S)		Integer value is cylinder

Problem: in order to warn you if file /kernel is partly above cylinder 1023,
sysinstall first needs to know the absolute sector numbers for all the
sectors in the file.   It has no standard way of knowing,  For lfs it could
probably use the undocumented lfs_bmapv() syscall, but there is no bmap
syscall for ufs.

>> So if it doesn't know the C/H/S geometry (sure, we can guess that
>> the BIOS geometry is the Adpatec geometry, but we need to be
>> prepared when it isn't), how can we say "cylinder past 1024"?

Sysinstall must know the H/S geometry, at least for the initial
installation of FreeBSD on a non-dedicated disk, since the geometry
is used to initialize the partition table.

>> The only way to know the BIOS C/H/S values for sure is to ask the
>> BIOS.

More precisely, the only way to know what the _current_ BIOS C/H/S
values are is to ask the BIOS.  Sysinstall needs to know the H/S
geometry that the BIOS will use later when the system is booted.  This
is not necessarily the same as the H/S geometry that was used for the
last boot.  E.g., if an empty SCSI disk is being configured, it will
initially have some fixed BIOS default, e.g., the "Adaptec geometry"
H=64/S=32.  Then when you write the the partition table with a more
convenient geometry, e.g.  H=255/S=63, the BIOS should default to what's
in the partition table (255/63) on the next boot.

>Maybe I'm missing something, but:

>  1) FreeBSD already gets the BIOS geometry of hard disks from it's
>     normal bootloader.

It only gets the geometries for disks supported by the BIOS, and it
indexes the geometries by the BIOS drive numbers.

>  2) Can't you just make a "BIOS query" hunk of patch code, copy it
>     down into the first 1MB of RAM, and run it to produce your
>     BIOS geometry ?

It isn't easy, and doesn't provide any information that couldn't be
provided at boot time.  There are also some configuration bootstrap
problems.  At least one reboot would be required to check that the
expected geometries are actually used.  Lots of code would be required
to backtrack...

>BTW:  I'm looking for ways to safely add LBA (much greater than 8GB
>      limit) support to my bootloader.  It currently is not dependent
>      on particular BIOS geometries, just the limit of the maximum
>      addressable area.

This would be another reason for sysinstall not to warn.  Sysinstall
knows very little about the capabilities of boot loaders, especially
furture ones.

Bruce



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