The Boot Process, Explained

UPI Study › Courses › Introduction to Operating Systems › Free lessons › Lesson 1.9 Free with a free account

The Boot Process

Introduction to Operating Systems · Chapter 1: Operating System FoundationsSection 1.9 · lesson 9 of 838 min · free with a free account

← Batch Files and ScriptsNext lesson: Multiprocessing →

A free account plays all of Chapter 1 and 3 more lessons of Introduction to Operating Systems. Create a free account →

Earn 3 college credits for Introduction to Operating SystemsRecommended for credit by NCCRS · Computer Science 354 · self-paced · one payment, lifetime access

In this lesson

How firmware, bootloader, kernel, and init bring a computer to login.

  • Explain why booting needs a chain that starts in firmware
  • Describe the power-on self test and boot order and compare BIOS with UEFI
  • Trace the roles of the bootloader, the kernel, and init during start-up
  • Diagnose which boot stage failed from where start-up stops

Free study notes

Get this lesson's notes by email

The key points and 4 practice questions with answers, in your inbox. One email, free.

One email. Unsubscribe in one click.

Transcript

Everything said in the video, section by section (1,094 words). Read along, or search it.

Opening Question

A Relay Race Behind a Black Screen

You press the power button. For a few seconds the screen is black. Then a logo, then a spinning circle, and finally a login box. Nothing you did in those seconds mattered. And yet a whole relay race was run, each runner handing a baton to the next. It starts with a few instructions burned into a chip, and ends with the operating system fully awake. Why does a computer need a relay at all?

The Problem

Empty RAM at Power-On

Here's the problem. The operating system lives on the disk. But the processor can only run instructions that are in memory, in RAM. And RAM is empty at power-on, because it forgets everything without electricity. So how does the OS get from the disk into memory? Something must already be there to do the loading. That something is small, permanent, and ready the instant the power flows: the firmware you met in lesson 1.2.

Bootstrapping

Six Runners From Power to Login

The answer is a chain. A tiny program starts a bigger one, which starts a bigger one still, until the whole OS is running. That's why it's called booting, short for bootstrapping, from the old saying about pulling yourself up by your own bootstraps. There are six runners: power on, the firmware, the bootloader, the kernel, init, and finally the login. Let's follow the baton, one runner at a time.

Firmware Stage

Self Test and Boot Order

The first real runner is the firmware, on a chip on the motherboard. For many years, this was the BIOS, the Basic Input Output System. Modern computers use its successor, UEFI. Both do the same two jobs. First, the POST, or power-on self test: a quick check that the memory, the processor, the keyboard, and the display are present and working. A failed test usually shows a message, or a pattern of beeps. That's why a computer with a broken memory stick may beep, and refuse to start. Second, the firmware looks for something to boot from. It follows a boot order, say the internal drive, then a USB stick, and hands control to the first drive that has a bootloader.

Comparison

BIOS Versus UEFI

BIOS and UEFI do the same job in different ways. BIOS reads the very first sector of the boot disk. UEFI reads a boot file from a special system partition. With the old partition style that BIOS uses, a disk tops out at about two terabytes. UEFI handles very large disks. And UEFI adds extras: menus you can use with a mouse, network access, and Secure Boot, which checks that the bootloader hasn't been tampered with before it runs.

Bootloader

Finding and Loading the Kernel

Runner three. The firmware is small, and can't understand every file system. So it starts only a short program, the bootloader, whose one job is to find the kernel on the disk and load it into memory. On Linux, the bootloader is often GRUB. Windows has its own boot manager. And when a computer has two operating systems side by side, the bootloader is what shows the menu, asking which one you want.

Kernel Stage

Memory, Drivers, and the File System

Runner four. Once the kernel is in memory and running, it prepares everything the rest of the system relies on. It sets up memory management. It finds the hardware, like the screen, the keyboard, and the network card, and loads their drivers. And it opens the main file system, so it can read the rest of the OS. Its last act in this stage is to start the very first program: the one that starts all the others.

Quick Check

No Bootable Device Found

Quick check. Sam, who runs a small online bakery, turns on his old laptop one morning. Instead of a logo, it shows: No bootable device found. The night before, he left a USB stick plugged in. Which stage stopped the start-up? Pause, and decide. The firmware, at its second job: finding a boot disk. A message appeared, so the power and the self test were fine. But no disk with a bootloader was found. The kernel is the tempting pick, but it never got its turn. With no bootloader, nothing loaded the kernel at all. Ivy, who looks after the computers at a school, asked Sam one question: did you leave a USB stick in? This laptop's firmware tried the stick first, found no bootloader, and stopped there. With the stick out, the laptop started normally. The sensible first step: remove the stick, and check the boot order.

Init and Services

Starting Services and the Login

Runner five. That first program is called init. On many modern Linux systems, it's systemd. On a Mac, it's launchd, and Windows has its own equivalent. It starts the background programs called services: the one that connects to Wi-Fi, the one that plays sound, the one that shows the login screen. When enough of them are ready, the login prompt appears. You type your name and password, the OS checks them, and starts your desktop or shell. The relay is complete.

Quick Check

Kernel Messages, Then a Black Screen

One more check. One of Ivy's lab PCs shows the maker's logo, and the kernel's start-up messages scroll past normally. Then it sits on a black screen, and the login screen never appears. Which stage is most likely failing? Pause, and decide. Init and its services. The logo means the firmware did its job, and the kernel's messages mean the kernel loaded and ran. The step that never finished is the one that brings up the login screen: init, starting services. The kernel is the tempting pick, but its part already worked.

Troubleshooting

Where Start-Up Stops

Knowing the order turns you into a detective. Where start-up stops tells you which stage failed. Nothing at all? Power, or the hardware. Beeps, or a memory message? The self test. No bootable device? The firmware's search, or a missing bootloader. A logo, then a crash? The kernel or a driver. No login screen? Init and its services.

Common Mistake

No Power Is Not a Dead OS

A common mistake: thinking a computer that won't turn on has a dead operating system. If you see nothing at all, the OS hasn't even had a chance to start. The fault is earlier in the chain: the power, the firmware, or the hardware.

Key Takeaways

From Firmware to Login

To recap. RAM is empty at power-on, so firmware that's already there starts a chain of bigger programs. The firmware, BIOS or UEFI, runs the self test and finds a disk with a bootloader. The bootloader loads the kernel, the kernel sets up the machine and starts init, and init starts the services and the login. Where start-up stops tells you which stage to look at.

Try It

Matching Start-Up Screens to Stages

Here's something to try. Restart your computer, and write down each thing you see, in order: a logo, a menu, a spinning circle, the login. Which of the six runners does each one belong to?

About Introduction to Operating Systems at UPI Study

Introduction to Operating Systems (Computer Science 354) is a self-paced online course of 83 video lessons in 10 chapters, from what an operating system does and process scheduling to concurrency, memory, devices, file systems, networks, the internet, security and virtual machines. It carries a NCCRS credit recommendation for 3 semester credits.

Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Compare: Linux vs Operating Systems

Why take it here

Why students take Introduction to Operating Systems with UPI Study

What happens under every app you runIntroduction to Operating Systems explains the software that runs a computer: processes and scheduling, threads and synchronization, deadlock, memory and paging, devices and storage, file systems, networking, security and virtualization. It suits computer science and information technology degrees.
Credit at a fraction of the priceThe same 3 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Where the credit goes

Universities that work with NCCRS

Introduction to Operating Systems carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.

FAQ

Questions students ask us

About The Boot Process

What are the steps of the boot process?
The boot process is a chain of six stages: power on, firmware, bootloader, kernel, init, and login. The firmware runs a self test and finds a disk to boot from. The bootloader loads the kernel into memory. The kernel sets up memory, finds the hardware, loads drivers, and starts init, which launches background services and finally the login screen.
What is the difference between BIOS and UEFI?
BIOS is the older firmware that reads the very first sector of the boot disk, while UEFI, its modern successor, reads a boot file from a special system partition. With the old partition style BIOS uses, a disk tops out at about 2 terabytes, and UEFI handles much larger disks. UEFI also adds mouse-driven menus, network access, and Secure Boot.
What does the message No bootable device found mean?
It means the firmware finished its self test but found no drive with a bootloader in its boot order. On some laptops, a USB stick left plugged in is enough to cause it, because the firmware tries the stick first and stops there. Removing the stick and checking the boot order is a sensible first step, since the kernel never got its turn.
What does the init process do when a computer starts?
Init is the first program the kernel starts, and it starts all the others. It launches background services, such as those for Wi-Fi, sound, and the login screen, and when enough are ready, the login prompt appears. On many modern Linux systems init is systemd, and on a Mac it is launchd. A black screen after normal kernel messages often points to init or its services.

About the Introduction to Operating Systems course

How many college credits is Introduction to Operating Systems?
Introduction to Operating Systems (Computer Science 354) carries a NCCRS credit recommendation for 3 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Introduction to Operating Systems cost and what is included?
$250, paid once, with lifetime access: all 83 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Introduction to Operating Systems take?
It is self-paced with no deadlines. The 83 lessons total about 10 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

Ready for the full course? Earn 3 credits in Introduction to Operating Systems.

83 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.

Updated

Introduction to Operating Systems
3 credits · NCCRS
Enroll →