[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ] [ 16 ] [ 17 ] [ 18 ] [ A ] [ B ] [ C ] [ D ] [ next ]


Debian Tutorial (Obsolete Documentation)
Appendix C - Appendix C: Booting the system


This appendix describes what happens during the GNU/Linux boot process.

How you boot your system depends on how you set things up when you installed Debian. Most likely, you just turn the computer on. But you may have to insert a floppy disk first.

Linux is loaded by a program called LILO, or LInux LOader. LILO can also load other operating systems, and ask you which system you'd like to load.

The first thing that happens when you turn on an Intel PC is that the BIOS executes. BIOS stands for Basic Input Output System. It's a program permenantly stored in the computer on read-only chips. It performs some minimal tests, and then looks for a floppy disk in the first disk drive. If it finds one, it looks for a "boot sector" on that disk, and starts executing code from it, if any. If there is a disk, but no boot sector, the BIOS will print a message like:

     Non-system disk or disk error

Removing the disk and pressing a key will cause the boot process to continue.

If there isn't a floppy disk in the drive, the BIOS looks for a master boot record (MBR) on the hard disk. It will start executing the code found there, which loads the operating system. On GNU/Linux systems, LILO, the LInux LOader, can occupy the MBR, and will load GNU/Linux.

Thus, if you opted to install LILO on your hard drive, you should see the word LILO as your computer starts up. At that point you can press the left Shift key to select which operating system to load - press Tab to see a list of options. Type in one of those options, and press return. LILO will boot the requested operating system.

If you don't press the Shift key, LILO will automatically load the default operating system after about 5 seconds. If you like, you can change what system LILO loads automatically, which systems it knows how to load, and how long it waits before loading one automatically.

If you didn't install LILO on your hard drive, you probably created a boot disk. The boot disk will have LILO on it. All you have to do is insert the disk before you turn on your computer and the BIOS will find it before it checks the MBR on the hard drive. To return to a non-Linux OS, take out the boot disk and restart the computer (from Linux, be sure you follow the proper procedure for restarting: see Shutting down, Section 3.7 for details.)

LILO loads the Linux kernel from disk, and then lets the kernel take over. (The kernel is the central program of the operating system, in control of all other programs.) The kernel discards the BIOS and LILO.

On non-Intel platforms, things work a little differently. But once you boot, everything is more or less the same.

Linux looks at the type of hardware it's running on. It wants to know what type of hard disks you have, whether or not you have a bus mouse, whether or not you're on a network, and other bits of trivia like that. Linux can't remember things between boots, so it has to ask these questions each time it starts up. Luckily, it isn't asking you these questions---it's asking the hardware! While it boots, the Linux kernel will print messages on the screen describing what it's doing.

The query process can cause problems with your system, but if it was going to, it probably would have when you first installed GNU/Linux. If you're having problems, consult the installation instructions, or ask on a mailing list.

The kernel merely manages other programs, so once it is satisfied everything is okay, it must start another program to do anything useful. The program the kernel starts is called init. After the kernel starts init, it never starts another program. The kernel becomes a manager and a provider of services.

Once init is started, it runs a number of scripts (files containing commands), which prepare the system to be used: they do some routine maintenance and start up a lot of programs which do things like display a login prompt, listen for network connections, and keep a log of the computer's activities.


[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ] [ 6 ] [ 7 ] [ 8 ] [ 9 ] [ 10 ] [ 11 ] [ 12 ] [ 13 ] [ 14 ] [ 15 ] [ 16 ] [ 17 ] [ 18 ] [ A ] [ B ] [ C ] [ D ] [ next ]


Debian Tutorial (Obsolete Documentation)

29 Dezember 2009

Havoc Pennington hp@debian.org