[Linux/OS Internals] The Booting Process : What happens when you start the computer ?

  • The BIOS initializes the hardware/plugin-play devices and does system inventory device detection with a a Power-on self test (POST). It loads OS’s Master Boot Record (MBR)
    - MBR is the first sector from a HDD/USB; Any code can be put into MBR!
    - Loads 512 bytes from MBR into memory
  • BIOS runs the OS Boot Loader , which it got from MBR and it executes the first instruction from MBR.
  • OS Loader may use 2 stage loading because, 512 bytes are too small to fit even a loader itself
    Stage (1): Loads the Stage (2) loader
    Stage (2): Loader loads the actual OS
  • Boot loaders are OS/device specific; Boot Loader loads the OS into memory and OS starts running !
  • OS performs its own initialization ; Remember w.r.t Linux, init process is the first process that gets started, init starts and stops essential service process on the system.
    - Initializes memory, devices, libraries, device drivers
    - sets up OS libraries
  • OS starts up a login shell ( GUI or non-GUI) and displays a login prompt !

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
svalak

svalak

Passionate about learning ; Will write about #systemdesign #DSA #algorithms #linuxinternals #technology; Painting/Poem writing are my hobbies; Voracious Reader