paint-brush
Booting the Systemby@goerzenandothman

Booting the System

by Goerzen & OthmanNovember 6th, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

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 permanently 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 there is any. If there is a disk but no boot sector, the BIOS will print a message like this: Non-system disk or disk error. Removing the disk and pressing a key will cause the boot process to resume. 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 can occupy the MBR and will load GNU/Linux.
featured image - Booting the System
Goerzen & Othman HackerNoon profile picture

Debian GNU/Linux: Guide to Installation and Usage by John Goerzen and Ossama Othman is part of the HackerNoon Books Series. You can jump to any chapter in this book here. Booting the System

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 permanently 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 there is any. If there is a disk but no boot sector, the BIOS will print a message like this: Non-system disk or disk error. Removing the disk and pressing a key will cause the boot process to resume.


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 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 or press Tab to see a list of options. Type in one of those options and press Enter. 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 section 4.5 on page [*] 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, which is 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 questions 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 that do things like display a login prompt, listen for network connections, and keep a log of the computer’s activities.




About HackerNoon Book Series: We bring you the most important technical, scientific, and insightful public domain books.


This book is part of the public domain. John Goerzen and Ossama Othman (2004). Debian GNU/Linux : Guide to Installation and Usage. Urbana, Illinois: Project Gutenberg. Retrieved https://www.gutenberg.org/cache/epub/6527/pg6527-images.html


This eBook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever. You may copy it, give it away or re-use it under the terms of the Project Gutenberg License included with this eBook or online at www.gutenberg.org, located at https://www.gutenberg.org/policy/license.html.