1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<!--Converted with LaTeX2HTML 96.1-h (September 30, 1996) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds -->
<HTML>
<HEAD>
<TITLE>An overview of boots and shutdowns</TITLE>
<META NAME="description" CONTENT="An overview of boots and shutdowns">
<META NAME="keywords" CONTENT="sag">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<LINK REL=STYLESHEET HREF="sag.css">
</HEAD>
<BODY LANG="EN" >
<A NAME="tex2html1158" HREF="node68.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./next_motif.gif"></A> <A NAME="tex2html1156" HREF="node66.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./up_motif.gif"></A> <A NAME="tex2html1150" HREF="node66.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./previous_motif.gif"></A> <A NAME="tex2html1160" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="./contents_motif.gif"></A> <A NAME="tex2html1161" HREF="node114.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="./index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html1159" HREF="node68.html">The boot process in </A>
<B>Up:</B> <A NAME="tex2html1157" HREF="node66.html">Boots And Shutdowns</A>
<B> Previous:</B> <A NAME="tex2html1151" HREF="node66.html">Boots And Shutdowns</A>
<BR> <P>
<H1><A NAME="SECTION00710000000000000000">An overview of boots and shutdowns</A></H1>
<P>
The act of turning on a computer system and causing its operating
system to be loaded<A NAME="tex2html29" HREF="footnode.html#1961"><IMG ALIGN=BOTTOM ALT="gif" SRC="./foot_motif.gif"></A> is called <b>booting</b>. The name
comes from an image of the computer pulling itself up from its
bootstraps, but the act itself slightly more realistic.
<A NAME="1963"> </A>
<A NAME="1964"> </A>
<P>
During bootstrapping, the computer first loads
a small piece of code called the <b>bootstrap loader</b>,
which in turn loads and starts
the operating system. The bootstrap loader is usually
stored in a fixed location on a hard disk or a floppy. The
reason for this two step process is that the operating system
is big and complicated, but the first piece of code that the
computer loads must be very small (a few hundred bytes), to avoid
making the firmware unnecessarily complicated.
<A NAME="1966"> </A>
<P>
Different computers do the bootstrapping differently. For PC's,
the computer (its BIOS) reads in the first sector (called
the <b>boot sector</b>) of a floppy or hard disk.
The bootstrap loader
is contained within this sector. It loads the operating
system from elsewhere on the disk (or from some other place).
<A NAME="1968"> </A>
<P>
After Linux has been loaded, it initializes the hardware and
device drivers, and then runs <tt>init</tt><A NAME="2115"> </A>. <tt>init</tt><A NAME="2117"> </A>
starts other processes to allow users to log in, and do things.
The details of this part will be discussed below.
<P>
In order to shut down a Linux system, first all processes
are told to terminate (this makes them close any files and
do other necessary things to keep things tidy), then filesystems
and swap areas are unmounted, and finally a message is printed
to the console that the power can be turned off. If the proper
procedure is not followed, terrible things can and will happen;
most importantly, the filesystem buffer cache might not be flushed,
which means that all data in it is lost and the filesystem on
disk is inconsistent, and therefore possibly unusable.
<A NAME="1971"> </A>
<A NAME="1972"> </A>
<P>
<HR><A NAME="tex2html1158" HREF="node68.html"><IMG WIDTH=37 HEIGHT=24 ALIGN=BOTTOM ALT="next" SRC="./next_motif.gif"></A> <A NAME="tex2html1156" HREF="node66.html"><IMG WIDTH=26 HEIGHT=24 ALIGN=BOTTOM ALT="up" SRC="./up_motif.gif"></A> <A NAME="tex2html1150" HREF="node66.html"><IMG WIDTH=63 HEIGHT=24 ALIGN=BOTTOM ALT="previous" SRC="./previous_motif.gif"></A> <A NAME="tex2html1160" HREF="node1.html"><IMG WIDTH=65 HEIGHT=24 ALIGN=BOTTOM ALT="contents" SRC="./contents_motif.gif"></A> <A NAME="tex2html1161" HREF="node114.html"><IMG WIDTH=43 HEIGHT=24 ALIGN=BOTTOM ALT="index" SRC="./index_motif.gif"></A> <BR>
<B> Next:</B> <A NAME="tex2html1159" HREF="node68.html">The boot process in </A>
<B>Up:</B> <A NAME="tex2html1157" HREF="node66.html">Boots And Shutdowns</A>
<B> Previous:</B> <A NAME="tex2html1151" HREF="node66.html">Boots And Shutdowns</A>
<P><ADDRESS>
<I>Lars Wirzenius <BR>
Sat Nov 15 02:32:11 EET 1997</I>
</ADDRESS>
</BODY>
</HTML>
|