OpenBSD i386 first-stage system bootstrap

biosboot - i386-specific first-stage system bootstrap

DESCRIPTION
This small program (roughly 512 bytes of code) is responsible for loading
the second-stage boot(8) program (typically /boot), which in turn will
load the kernel.

biosboot must be installed by installboot(8). As part of the installa-
tion, installboot(8) patches biosboot with information about the location
of boot(8) on disk. Specifically, it writes the filesystem block number
of boot(8)'s inode, the offset within this block of the inode, and vari-
ous filesystem parameters (taken from the superblock) required to convert
filesystem blocks to disk sectors.

You must re-run installboot(8) whenever boot(8) is changed, as its inode
may change. While it should not be necessary, it may also be advisable
to re-run installboot(8) if you move your disk between machines and/or
controllers.

When biosboot receives control from either the BIOS or the master boot
record (MBR) it will print the message:

Loading

followed by a dot for every filesystem block it attempts to load. If
/boot is loaded successfully, biosboot will put the cursor on the next
line just before transferring control to the newly-loaded program.

If possible, biosboot will read disk sectors using calls detailed in the
Phoenix Enhanced Disk Drive Specification (EDD, sometimes known as LBA,
reads). It will fall back to CHS reads only if EDD calls are not avail-
able. However, to allow users to boot on hardware that claims LBA capa-
bility, but which requires CHS reads in order to boot, the user may hold
down either Shift key during boot. If biosboot detects this, it will
force itself to use CHS calls, ignoring any LBA capability. This will of
course prevent booting if /boot lies above the 8 GB CHS limit. There is
an exported symbol ``force_chs'' of type u_int8_t which may be set to 1
to force CHS reads always. (However, no tool is currently provided to
set this flag.)

DIAGNOSTICS
biosboot prints a `!' before the ``Loading'' message if it is being
forced to use CHS rather than LBA reads (by the user holding down either
Shift key during boot, or having set the ``force_chs'' flag in the boot
sector).

biosboot prints a `;' after the ``Loading'' message if it is going to use
CHS reads for any reason. For example, when booting from floppy or CD-
ROM.

biosboot may fail with any of the following error messages:

ERR I Too many indirect blocks. biosboot is capable of reading the
direct blocks in boot(8)'s inode (the location of which is
patched into biosboot by installboot(8)) and the first indirect
block, but it is not capable of reading further indirect blocks.
This error indicates that further such indirect blocks were
found. The system will not be able to boot.

This is unlikely to ever happen in practice, as boot(8) has to
be quite large for this to be an issue. The smallest possible
filesystem block size is 512 bytes (one sector per filesystem
block). On such a system, there are 140 filesystem blocks that
biosboot can read, so boot(8) can be up to 70 KB.

However, even on floppy disks the filesystem block size is 1024
bytes. This allows boot(8) to occupy up to 268 disk blocks,
i.e. to be 268 KB. On hard disks (default filesystem block size
16 KB) 4,108 disk blocks are available, to allow boot(8) to be
over 64 MB in size! (Only direct blocks are required for
boot(8)s of up to 192 KB.)

ERR M Bad magic. The ELF ``magic number'' /7fELF in boot(8)'s header
was not found. This indicates that the first block of boot(8)
was not read correctly. This could be due to disk corruption,
failing to run installboot(8), giving an invalid boot(8) program
as the boot argument to installboot(8), or incorrect geometry
translation.

ERR R Read error. The BIOS returned an error indication when biosboot
attempted to read a disk sector. This might be any media error,
including bad sectors (common on floppy disks), and invalid sec-
tors (can occur with bad geometry translations).

If this error occurs during an LBA boot (no `;' after
``Loading''), then a CHS boot may succeed. To do this, you
should reboot, then hold down either Shift key before biosboot
starts. You should see a `!' before ``Loading'' as confirmation
that your override was accepted.

ERR X Can't boot. Issued when trying to read sectors in CHS mode, but
the BIOS call get drive parameters failed or gave a value of 0
for the number of sectors per track. In either case, it is not
possible for biosboot to calculate the (cylinder, head, sector)
values required to read any sectors.

NOTES
Using biosboot as the MBR, as has been done in the past, is not recom-
mended, and is not supported. Instead, create a single fdisk(8) parti-
tion that spans the entire disk.

Despite the support for boot(8) over the 8 GB boundary, good disklabel(8)
partitioning practices should still be followed.

FILES
/usr/mdec/mbr Master Boot Record block
/usr/mdec/biosboot primary bootstrap
/boot secondary bootstrap
/usr/mdec/pxeboot PXE bootstrap
/bsd OpenBSD kernel
/bsd.mp OpenBSD kernel for multi-processor machines
/bsd.rd OpenBSD kernel for installation/recovery
电子时钟设计是一个基于单片机的综合性电子项目,涵盖硬件设计、软件设计、模块代码编写以及运行展示等多个环节。以下是该项目的详细分析与知识点总结: 电子时钟设计是一项课程设计任务,目标是开发一个功能完善的电子时钟系统。该系统以单片机为核心控制器,具备时间显示、设置和控制等功能,旨在满足用户的日常使用需求。 硬件设计的核心是系统方案原理图,它明确了系统的整体架构以及各组件之间的连接关系。外设设计方面,键盘输入模块和数码管显示模块是关键部分。键盘输入模块的工作原理包括键盘扫描、按键识别以及状态机控制等环节;数码管显示模块的工作原理则涉及数码管的驱动、显示控制和状态机控制等内容。 软件设计的核心是项目软件系统总架构图,它详细介绍了系统的软件框架,涵盖单片机编程、键盘输入模块流程图与代码、数码管显示模块流程图与代码等方面。顺序图则展示了软件的运行流程,包括系统初始化、键盘输入处理、显示控制和状态机控制等环节。 模块代码是系统各模块功能的具体实现。例如,键盘输入模块的代码实现了键盘扫描、按键识别和状态机控制等功能;数码管显示模块的代码实现了数码管驱动、显示控制和状态机控制等功能。 运行展示是项目的最终成果呈现环节,展示了电子时钟的实际运行效果,包括时间的准确显示、便捷的设置操作以及稳定的控制功能等。 单片机原理:掌握单片机的架构、指令系统和编程方法。 Proteus仿真:熟悉Proteus仿真原理、仿真环境及仿真操作。 C语言编程:理解C语言的语法、数据类型、控制结构、函数和数组等基础知识。 电子时钟设计:了解电子时钟的工作原理、设计方法和实现技术。 硬件设计:掌握硬件设计的基本原理、方法和工具。 软件设计:熟悉软件设计的基本原理、方法和工具。 模块代码实现:掌握模块代码的设计、编程和调试技巧。 电子时钟设计项目融合了硬件与软件设计,通过模块代码实现功能,并通过运行展示呈现最终效果。掌握
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值