O'Reilly Network: How Your Computer Boots; Excerpt from Understanding the Linux Kernel | Linux Today

O’Reilly Network: How Your Computer Boots; Excerpt from Understanding the Linux Kernel

Written By
Web Webster
Web Webster
Jan 27, 2001

“In most cases, the Linux kernel is loaded from a hard disk,
and a two-stage boot loader is required.
The most commonly
used Linux boot loader on Intel systems is named LILO (LInux
LOader); corresponding programs exist for other architectures. LILO
may be installed either on the MBR, replacing the small program
that loads the boot sector of the active partition, or in the boot
sector of a (usually active) disk partition. In both cases, the
final result is the same: When the loader is executed at boot time,
the user may choose which operating system to load.”

“The LILO boot loader is broken into two parts, since
otherwise it would be too large to fit into the MBR.
The MBR
or the partition boot sector includes a small boot loader, which is
loaded into RAM starting from address 0x00007c00 by the BIOS. This
small program moves itself to the address 0x0009a000, sets up the
real mode stack (ranging from 0x0009b000 to 0x0009a200), and loads
the second part of the LILO boot loader into RAM starting from
address 0x0009b000. In turn, this latter program reads a map of
available operating systems from disk and offers the user a prompt
so she can choose one of them. Finally, after the user has chosen
the kernel to be loaded (or let a time-out elapse so that LILO
chooses a default), the boot loader may either copy the boot sector
of the corresponding partition into RAM and execute it or directly
copy the kernel image into RAM.”

“The code of the setup( ) assembly language function is placed
by the linker immediately after the integrated boot loader of the
kernel, that is, at offset 0x200 of the kernel image file. The boot
loader can thus easily locate the code and copy it into RAM
starting from physical address 0x00090200. The setup( ) function
must initialize the hardware devices in the computer and set up the
environment for the execution of the kernel program. Although
the BIOS already initialized most hardware devices, Linux does not
rely on it but reinitializes the devices
in its own manner to
enhance portability and robustness.”


Complete Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.