Kapok Computer Co. notebook with AMI 'WinBIOS' which seems to insist
on having a short jump and nop as the first instructions in the
boot sector code. The prevailing theory is that the BIOS is doing
some sort of boot sector virus detection and refusing to run any
boot block that doesn't start with the same instruction sequence as
MS-DOG boot sector code. If this is the case, it would be nice if it
actually printed an error message to this effect instead of just
saying 'FAILED.'
This workaround has no effect on the boot sector code other than to
increase its size by three bytes.
code. Apart from the first one, none really affect typical configurations
but are nevertheless unnecessary limitations. We use netbooted PCs as
student X-terminals and all of the below fixes have been useful. Apologies
for including them all in one PR, but some are just too silly or trivial
to send on their own!
a) Newer SMC cards have hardware addresses starting with 00:E0.
Netboot compares the MAC address with 00:00:C0 to determine
if it is a WD/SMC card, so it fails to detect these.
b) Netboot is unable to boot kzipped kernels, as it assumes that
the kernel load address is 0x100000.
c) Users can abort the booting process and enter arbitrary network
addresses, or boot from a floppy disk. This can be a problem when
netbooted machines are used in a student environment.
d) It is not possible to set all options via bootp. For example there
is no way to remotely force a client to boot from disk. With both
SECURE_BOOT(patch below) and NO_TFTP defined, short of unplugging
the eprom there is no way at all to get the client to boot locally.
A generic solution is to allow complete netboot commands to be sent
using bootp lines such as:
:T132="diskboot":
e) The last character of netboot command names is not checked. You
can type 'iz 10.0.0.1' and it will be interpreted as 'ip'. This
is only important if you try to add a new command which is the
same as an existing one except for the last character.
f) We have a configuration where multiple servers are willing to serve
a diskless client. The tftp config file, or the bootptab entry on
each server must specify the root and swap filesystems as 'ip:/fs'
even though 'ip' will usually be the responding server's IP address.
It would be nice if netboot could automatically prepend the server's
IP address to an entry specified as just '/fs', so that multiple
servers can use the same tftp or bootp configuration files. Admittedly
this is hardly a major problem!
PR: 7098
Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
They are atomic, but return in essence what is in the "time" variable.
gettime() is now a macro front for getmicrotime().
Various patches to use the two new functions instead of the various
hacks used in their absence.
Some puntuation and grammer patches from Bruce.
A couple of XXX comments.
- Remove reference to the obsolete options: BOOT_PROBE_KEYBOARD,
BOOT_PROBE_KEYBOARD_LOCK and BOOT_FORCE_COMCONSOLE.
- Add reference to BOOT_COMCONSOLE_SPEED.
- wrong name in .file statement.
- stale comment about CONSPEED.
- style bugs in comments.
- inconsistent defaulting of operand sizes (should never depend on default).
- inconsistent choosing between je and jz (should always use je).
so the filenames can be displayed and selected in full beauty. If RR
is present, the match is now case-sensitive, if RR is missing, the
match is case-insensitive (as it used to be before).
instructions more (many cases were already intended to be byte-sized
but were missing prefixes so gas assembled them bogusly), and
rearranging a loop to test at the end.
and bios.S were small enough and have been merged back into their
respective files in biosboot/, conditionalized on CDBOOT. Other
files might be merged at a later stage.
Caveat emptor: i cannot test this right now.
This is the long-threatened ISO 9660 CD-ROM bootstrap code.
This work has been sponsored by Plutotech International, Inc (who paid
the initial work), and interface business GmbH (where i did most of
the work). A big thanks also goes to Bruce Evans, for his continuing
help and answering my stupid questions.
The code is basically functioning, with the following caveats:
. Rock Ridge attributes are not yet supported.
. Only SCSI CD-ROMs are supported, since i fail to see any possibility
to determine the drive type using BIOS functions. (Even for hard disks,
this determination is done by a big hack only.)
. El Torito specifies a lot of crap and useless misfeatures, but crucial
things like the ability to figure out the CD TOC have been ``forgotten''.
Thus, if you wanna boot a multisession CD, you need to know at which CD
block your session starts, and need to speciffy it using the @ clause.
. None of the CD-ROM controllers i've seen so far implements the full
El Torito specification at all. Adaptec is probably the closest, but
they miss on non-emulation booting (which would be the most logical
choice for us). Thus, the current code bloats the 7.5 KB boot code
up to 1.44 MB, in order to fake a `floppy' image.
If you wanna use it, specify this file as the boot image on the
command-line of the mksiosfs command (option -b).
Caveat emptor: some versions of the Adaptec BIOS might even fail to
access the CD-ROM at all, using the BIOS functions. I think i've
notice this for ver 1.26, the code has been tested with ver 1.23.
The boot string is as follows:
[@sess-start] [filename] [-flags]
sess-start Extend # where the last session starts, measured in
CD-ROM blocks.
filename As usual, but the input is case-insensitive by now
(since we don't grok RR anyway).
flags As usual, but -C (use CDROM root f/s) is default, so
specifying -C will decactivate this option (which is
probably not what you want :).
A lot of cleanup work is probably required, and some of the files
could/should be merged back to biosboot, perhaps made conditional on
some #ifdef. The malloc implementation that comes with cdboot might
also be useful for kzipboot. (I needed a malloc() since the root dir
ain't fixed in size on a CD.)
I've been testing all this with a 2.2-STABLE as the base for biosboot.
I don't expect too many surprises, although i know the biosboot stuff
has been changed a lot in -current lately. I'm sure Bruce will
comment on all this here anyway. :-)
This work has been sponsored by Plutotech International, Inc (who paid
the initial work), and interface business GmbH (where i did most of
the work). A big thanks also goes to Bruce Evans, for his continuing
help and answering my stupid questions.
The code is basically functioning, with the following caveats:
. Rock Ridge attributes are not yet supported.
. Only SCSI CD-ROMs are supported, since i fail to see any possibility
to determine the drive type using BIOS functions. (Even for hard disks,
this determination is done by a big hack only.)
. El Torito specifies a lot of crap and useless misfeatures, but crucial
things like the ability to figure out the CD TOC have been ``forgotten''.
Thus, if you wanna boot a multisession CD, you need to know at which CD
block your session starts, and need to speciffy it using the @ clause.
. None of the CD-ROM controllers i've seen so far implements the full
El Torito specification at all. Adaptec is probably the closest, but
they miss on non-emulation booting (which would be the most logical
choice for us). Thus, the current code bloats the 7.5 KB boot code
up to 1.44 MB, in order to fake a `floppy' image.
If you wanna use it, specify this file as the boot image on the
command-line of the mksiosfs command (option -b).
Caveat emptor: some versions of the Adaptec BIOS might even fail to
access the CD-ROM at all, using the BIOS functions. I think i've
notice this for ver 1.26, the code has been tested with ver 1.23.
The boot string is as follows:
[@sess-start] [filename] [-flags]
sess-start Extend # where the last session starts, measured in
CD-ROM blocks.
filename As usual, but the input is case-insensitive by now
(since we don't grok RR anyway).
flags As usual, but -C (use CDROM root f/s) is default, so
specifying -C will decactivate this option (which is
probably not what you want :).
A lot of cleanup work is probably required, and some of the files
could/should be merged back to biosboot, perhaps made conditional on
some #ifdef. The malloc implementation that comes with cdboot might
also be useful for kzipboot. (I needed a malloc() since the root dir
ain't fixed in size on a CD.)
I've been testing all this with a 2.2-STABLE as the base for biosboot.
I don't expect too many surprises, although i know the biosboot stuff
has been changed a lot in -current lately. I'm sure Bruce will
comment on all this here anyway. :-)
will see it. The name of the file is obtained by appending ".config"
to the name of the kernel file. If the file doesn't exist, then an
annoying message is printed.
Reduced the command line buffer size yet again from 4096 to 1024. It is
oversized to defend against overrun in gets(), but data space is starting
to run out so the buffer size can't be as grossly oversized as before.
- Added support for "dual" internal/serial consoles (-D flag). If -D is set,
then all i/o from the boot blocks is to and from both the internal console
and the serial console. -D has no effect on the kernel (-h decides the
kernel serial console as usual). -D should normally be set in /boot.config.
- Get help messages from /boot.help. You should copy boot.help from the
biosboot directory to the root directory on the boot drive when you
install new boot blocks.
- New, less invasive keyboard probe. Enable keyboard probe dynamically (-P
flag). Should probably never be used (use -h instead).
- Fixed/improved initialization from boot.config. It didn't interact correctly
with the NAMEBLOCK option, and the initialization of the drive/unit/partition
didn't stick when a non-default kernel name was entered.
- Don't reset or forget the default drive/unit/... or kernel name so often.
- Set the default kernel name to something unbootable after `?'.
- Display the defaults better.
- Removed PROBE_KEYBOARD_LOCK option (use -h instead).,
- Removed BOOT_FORCE_COMCONSOLE option (use device flag 0x20 instead).
- Removed -a (RB_HALT) flag. This flag is only used for reboots.
Submitted by: about 2/3 by yokota
then all i/o from the boot blocks is to and from both the internal console
and the serial console. -D has no effect on the kernel (-h decides the
kernel serial console as usual). -D should normally be set in /boot.config.
- Get help messages from /boot.help. You should copy boot.help from the
biosboot directory to the root directory on the boot drive when you
install new boot blocks.
- New, less invasive keyboard probe. Enable keyboard probe dynamically (-P
flag). Should probably never be used (use -h instead).
- Fixed/improved initialization from boot.config. It didn't interact correctly
with the NAMEBLOCK option, and the initialization of the drive/unit/partition
didn't stick when a non-default kernel name was entered.
- Don't reset or forget the default drive/unit/... or kernel name so often.
- Set the default kernel name to something unbootable after `?'.
- Display the defaults better.
- Removed PROBE_KEYBOARD_LOCK option (use -h instead).,
- Removed BOOT_FORCE_COMCONSOLE option (use device flag 0x20 instead).
- Removed -a (RB_HALT) flag. This flag is only used for reboots.
Submitted by: about 2/3 by yokota
- gcc assumes that %ecx and %edx are clobbered (due to calling
conventions), thus there is no need for saving/restoring those two
registers.
- %es is reset to default value by real_to_prot, thus there is no need
for saving/restorig that register.
Submitted by: tegge
- TFTP is not needed any longer.
Add some other improvements:
- swapsize is now detected if no value was specified.
- resvport is used by default
- merged code for setting/showing mount options for root/swap.
Submitted by: Luigi Rizzo <luigi@labinfo.iet.unipi.it>