Trace a Computer's Boot From the Power Button to a Running OS
Company: ByteDance
Role: Site Reliability Engineer
Category: Software Engineering Fundamentals
Difficulty: easy
Interview Round: Technical Screen
You are interviewing for a security-focused site reliability engineering internship. The interviewer asks: what happens from the moment you press the power button on a computer until the operating system is up and running? Walk through every stage in order, and expect the interviewer to stop you at any stage and ask for more detail.
```hint Follow who is in control
At each stage, ask which piece of code is running, where it was loaded from, and what it hands control to next.
```
```hint The security angle
For a security team, consider how each stage could know that the next stage it loads has not been tampered with.
```
### Clarifying Questions
- Should the answer assume a typical x86-64 machine with UEFI firmware running Linux, or also cover legacy BIOS, ARM devices or Windows?
- Is the machine a laptop or desktop booting from a local disk, or a server that may boot over the network?
- Should the answer stop when the kernel starts the first user-space process, or continue until services are running and a user can log in?
- Is the root disk encrypted?
### What a Strong Answer Covers
- The hardware start: power stabilizing, the CPU leaving reset and fetching its first instruction from firmware
- Firmware duties: initializing memory and devices, the power-on self-test, and choosing a boot device (UEFI boot entries versus a legacy master boot record)
- The bootloader's job: loading the kernel and the initial RAM disk and passing the kernel command line
- Kernel initialization through mounting the real root filesystem and starting the first user-space process
- The init system bringing up services and a login prompt
- The chain of trust: Secure Boot signature checks, measured boot with a TPM, and unlocking an encrypted disk
- Where boot can fail at each stage, and how a symptom tells you which stage failed
### Follow-up Questions
- How does Secure Boot stop a modified bootloader or kernel from running, and what does measured boot add that Secure Boot does not?
- The machine stops with a kernel panic saying it cannot mount the root filesystem. Which stages worked, and what would you check first?
- Why does a Linux boot usually need an initial RAM disk at all?
- How does a server in a data center boot when there is no operating system on its local disk?
Overview: A security-focused SRE internship question asking the candidate to trace a computer's startup from pressing the power button to a running operating system. It tests firmware, boot selection, bootloader, kernel and init knowledge, plus the boot chain of trust and diagnosing which stage failed.