Unix kernel - I-Shou University

Download Report

Transcript Unix kernel - I-Shou University

Unix kernel
Kernel refers to the core part of an
operating system
 Historically, UNIX kernels are
monolithic
 Newer versions of UNIX allow part of
the kernel to be loaded on demand
(called loadable kernel modules)

Booting FreeBSD on a PC
Power-on self test (POST)
 BIOS loads the first-stage bootstrap
loader from the master boot record
(MBR) in the boot device to RAM and
executes it
 The first-stage boot loader loads the
subsequent boot loaders, which in
term load the kernel

Bootstrap Steps (cont.)
Load & initialize kernel
 Detect & configure devices
 Create spontaneous system
processes
 Operator intervention
 Execute system startup scripts
 Multiuser mode

Booting FreeBSD 4.8
Use dmesg|more to read boot time
messages (these messages are
printed in brighter characters)
 Enter single user mode after init and
other processes are created and
after device configuration

Single User Mode
Lets operator manually fix errors
and control booting progress
 Do a “ps ax” right after entering
single user mode to see how many
processes exist in the system
 Exiting the single user shell resumes
normal booting steps

Startup scripts
/etc/rc is the main startup script
 All configurable setting are placed in
/etc/rc.conf
 Take a look at /etc/rc and other
related rc.* files to learn how to
read and write shell scripts
