Hitchhiker's Guide to Openbsd


Partition Boot Record (PBR)


Download 1.27 Mb.
Pdf ko'rish
bet214/258
Sana04.04.2023
Hajmi1.27 Mb.
#1328980
1   ...   210   211   212   213   214   215   216   217   ...   258
Bog'liq
obsd-faq49

Partition Boot Record (PBR): The Partition Boot Record, also called the PBR or 
biosboot(8)
 (after the 
name of the file that holds the code) is the first 512 bytes of the OpenBSD partition of the disk. The PBR is 
the "first-stage boot loader" for OpenBSD. It is loaded by the MBR code, and has the task of loading the 
OpenBSD second-stage boot loader, 
boot(8)
. Like the MBR, the PBR is a very tiny section of code and 
data, only 512 bytes, total. That's not enough to have a fully filesystem-aware application, so rather than 
having the PBR locate 
/boot
on the disk, the BIOS-accessible location of 
/boot
is physically coded 
into the PBR at installation time. 
The PBR is installed by 
installboot(8)
, which is further described 
later in this document
. The PBR 
announces itself with the message: 
Loading...
printing a dot for every file system block it attempts to load. Again, the PBR shows if it is using LBA or 
CHS to load, if it has to use CHS translation, it displays a message with a semicolon: 
Loading;...
3. Second Stage Boot Loader
/boot
: 
/boot
is loaded by the PBR, and has the task of accessing the 
http://www.openbsd.org/faq/faq14.html (13 of 34)9/4/2011 10:02:25 AM


14 - Disk Setup
OpenBSD file system through the machine's BIOS, and locating and loading the actual kernel. boot(8) also 
passes various options and information to the kernel. 
boot(8) is an interactive program. After it loads, it attempts to locate and read 
/etc/boot.conf
, if it 
exists (which it does not on a default install), and processes any commands in it. Unless instructed 
otherwise by 
/etc/boot.conf
, it then gives the user a prompt: 
probing: pc0 com0 com1 apm mem[636k 190M a20=on]
disk: fd0 hd0+
>> OpenBSD/i386 BOOT 3.02
boot>
It gives the user (by default) five seconds to start giving it other tasks, but if none are given before the 
timeout, it starts its default behavior: loading the kernel, 
bsd
, from the root partition of the first hard drive. 
The second-stage boot loader probes (examines) your system hardware, through the BIOS (as the 
OpenBSD kernel is not loaded). Above, you can see a few things it looked for and found: 


Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   210   211   212   213   214   215   216   217   ...   258




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling