When the power is turned on, the typical PC will try to read the first sector from the BIOS's boot device, such as the first floppy disk or the first hard disk, into memory, and execute it. The code obtained from the hard disk (from the so-called master boot sector) immediately will replace itself by the code found in the first sector of the active partition. Thus, the PC now is executing the bootstrap code found in the first sector of
/dev/c0d0p3s0 (assuming the boot disk is attached to controller 0). Here, the “s0” denotes the first subpartition, which stores the root filesystem on a default MINIX system.
In Minix's case, that bootstrap code loads
/boot/boot, the MINIX 3 Boot Monitor. The monitor has a command-line interface to allow the customisation and configuration of Minix, as described in the Users' Guide. Eventually, it then loads the kernel binaries from
/boot/image – or, one of the files in
/boot/image if it is a directory.
The MINIX 3 system image is made up of the catenation of several programs:
|Process Manager server
|Should be number 0 (just after kernel), API calls assume it.
|Virtual File System server
|Should be number 1, API calls assume it.
|Minix File System service
|For the root file system on /dev/imgrd
|Virtual Memory manager
|Should be number 8, mmap*() API calls assume it.
Critical above means that a
panic() inside that server will bring the whole system down. Fail-safe, on the other hand, means that MINIX 3 should be able to handle a failure of that server, usually by re-starting the driver.
The MINIX 3 system is running now, the different tasks initialize themselves.
rs is the parent of all MINIX 3 processes, while
init is the grandparent of all user processes; note that the word user is used here in constrast to system processes; and, does not refer to the user-mode - kernel-mode distinction (all processes are user-mode, in MINIX).
init is responsible for starting login processes on each terminal; but first, it runs
/etc/rc, a shell script.
The image ramdisk contains several drivers which are used to boot the system fully:
|Usually needed by the
|Minix File System service
|For the real root file system
It also needs several commands, to perform the initialization,
and several support files
|Access Control List
|Needed for running service
/etc/rc checks the state of the system, and starts some daemons. First, it sets the keyboard translation to the mapping in
/etc/keymap if present, followed by a call to readclock(8) to set MINIX 3's time from the hardware clock. Next, the file systems are checked if necessary, and the
/usr file system is mounted.
The system now is ready for multi-user start-up.
/usr/etc/rc. That cleans out
/usr/tmp/, and resets or cycles log files (by running
/usr/etc/daily), starts the update(8) and cron(8) daemons, and initializes the network services.
/usr/etc/rc runs any scripts that might have been installed into
/usr/local/etc/rc.d/ by packages.
/usr/local/etc/rc to initialize the system in a site- or host-dependent way.