[ Pobierz całość w formacie PDF ]
" If you have a super-VGA card that Linux recognizes and that has some special text modes (such as
100 columns by 40 rows), Linux asks you which mode you want to use. During the kernel
compilation, it is possible to preset a video mode, so that this is never asked. This can also be done
with LILO or rdev.
" After this, the kernel checks what other hardware there is (hard disks, floppies, network adapters, etc),
and configures some of its device drivers appropriately; while it does this, it outputs messages about
its findings. For example, when I boot, I it looks like this:
LILO boot:
Loading linux.
Console: colour EGA+ 80x25, 8 virtual consoles
Serial driver version 3.94 with no serial options enabled
tty00 at 0x03f8 (irq = 4) is a 16450
tty01 at 0x02f8 (irq = 3) is a 16450
lp_init: lp1 exists (0), using polling driver
Memory: 7332k/8192k available (300k kernel code, 384k reserved, 176k data)
Floppy drive(s): fd0 is 1.44M, fd1 is 1.2M
Loopback device init
Warning WD8013 board not found at i/o = 280.
Math coprocessor using irq13 error reporting.
Partition check:
hda: hda1 hda2 hda3
VFS: Mounted root (ext filesystem).
Linux version 0.99.pl9-1 (root@haven) 05/01/93 14:12:20
The exact texts are different on different systems, depending on the hardware, the version of Linux being
used, and how it has been configured.
" Then the kernel will try to mount the root filesystem. The place is configurable at compilation time, or
any time with rdev or LILO. The filesystem type is detected automatically. If the mounting of the root
filesystem fails, for example because you didn t remember to include the corresponding filesystem
driver in the kernel, the kernel panics and halts the system (there isn t much it can do, anyway).
The root filesystem is usually mounted read-only (this can be set in the same way as the place). This
makes it possible to check the filesystem while it is mounted; it is not a good idea to check a
filesystem that is mounted read-write.
69
Chapter 6. Boots And Shutdowns
" After this, the kernel starts the program init (located in/sbin/init) in the background (this will
always become process number 1). init does various startup chores. The exact things it does depends
on how it is configured; see Chapter 7 for more information (not yet written). It will at least start some
essential background daemons.
" init then switches to multi-user mode, and starts a getty for virtual consoles and serial lines. getty is
the program which lets people log in via virtual consoles and serial terminals. init may also start some
other programs, depending on how it is configured.
" After this, the boot is complete, and the system is up and running normally.
More about shutdowns
It is important to follow the correct procedures when you shut down a Linux system. If you fail do so,
your filesystems probably will become trashed and the files probably will become scrambled. This is
because Linux has a disk cache that won t write things to disk at once, but only at intervals. This greatly
improves performance but also means that if you just turn off the power at a whim the cache may hold a
lot of data and that what is on the disk may not be a fully working filesystem (because only some things
have been written to the disk).
Another reason against just flipping the power switch is that in a multi-tasking system there can be lots
of things going on in the background, and shutting the power can be quite disastrous. By using the
proper shutdown sequence, you ensure that all background processes can save their data.
The command for properly shutting down a Linux system is shutdown. It is usually used in one of two
ways.
If you are running a system where you are the only user, the usual way of using shutdown is to quit all
running programs, log out on all virtual consoles, log in as root on one of them (or stay logged in as root
if you already are, but you should change to root s home directory or the root directory, to avoid
problems with unmounting), then give the command shutdown -h now (substitutenowwith a plus sign
and a number in minutes if you want a delay, though you usually don t on a single user system).
Alternatively, if your system has many users, use the command shutdown -h +time message, where
[ Pobierz całość w formacie PDF ]