ELI5. When you turn a computer on, what is actually happening as it’s booting up?

r/

ELI5. When you turn a computer on, what is actually happening as it’s booting up?

Comments

  1. mariosemes Avatar

    When you boot up a PC, a series of steps happen to transform it from just hardware into a functioning computer ready to use:

    1. Power Supply Activation: Pressing the power button sends electricity from the power supply to key components like the motherboard, CPU, hard drive, and fans.

    2. BIOS/UEFI Initialization and POST: The Basic Input/Output System (BIOS) or its modern replacement UEFI, stored in non-volatile memory on the motherboard, starts running. It performs the Power-On Self-Test (POST), which checks essential hardware components (CPU, memory, video card, storage devices) for proper operation. If problems are found, error messages or beep codes are issued, and the boot process may halt.

    3. Bootloader Loading: After a successful POST, BIOS/UEFI looks for a special program called a bootloader at a predetermined location on a bootable device (like a hard drive or SSD). The bootloader, often located in the Master Boot Record (MBR) or EFI partition, is loaded into RAM. Its job is to start loading the operating system.

    4. Operating System Loading: The bootloader loads the operating system (e.g., Windows, macOS, Linux) from storage into RAM. Once loaded, the OS initializes its components and drivers, sets up the user environment, and typically presents the login screen or desktop interface.

    This entire boot process happens very quickly, usually within seconds, converting the inert hardware into a usable computer system.

    Hope this helps at least a little bit.

  2. ConversationFar2196 Avatar

    Electricity gets pumped in

    Lots of little switches trigger

    Causing lots of other little switches to trigger in a certain way

    Once a certain state has been achieved it looks for data from hard drive to control the switches further in a certain way

    This switch cycle continues until you power off

  3. TemporarySun314 Avatar

    It initializes all hardware components in your PC, so they can be used later, perform some simple checks of the hardware, that everything is usable, loads all the required data which is needed for the operating system to run from your hard disk to memory, and starts to initialize required information.

    For example it will read the current time from the hardware clock (which is always running, even if the PC is off), so that it can be used easily by Programs running on your PC.

  4. johanngr Avatar

    It charges up the capacitors, that exist as something similar to “local temporary batteries” to manage fluctuations in electricity demand based what the computer is doing. It then loads things into RAM, I guess. If you have a computer where you have something like temporary fast-access memory that requires your computer to be on, and then some kind of permanent storage that you can use to store things even when the computer is turned off (on a simpler or older computer that is simply just a ROM for the program, no such step is needed). Loading things to RAM takes a bit of time. There it starts to run the file system, and drivers, and the thing you click on items and folders in, and such. With the simplest possible computer it is very easy to understand what it does when it “boots up” (as it does almost nothing) but with modern ones it gets harder because it is doing more things.

  5. taintsauce Avatar

    The short version is the system firmware (BIOS/EFI) powers on, checks for hardware (CPU, RAM, graphics, disks, etc), initializes and tests that hardware for basic functionality (called a Power-On Self-Test, or POST), then hands control over to your operating system’s bootloader, per the saved boot settings in firmware.

    What exactly happens then depends on the OS, but the bootloader’s job is to find the core files needed to load the OS on your hard disk/SSD, put them in RAM, and execute them. From there the OS kernel takes over and loads drivers and such so it can use all that hardware.

  6. the_original_Retro Avatar

    TL;DR: They use power to access and make usable copies of stored memories that contain instructions, and activate the right stored instructions to make the whole complex thing work.

    ================================

    Computers have three sorts of memory.

    One type of memory is deep deep deep within the guts of the computer, and is more-or-less permanent (one specific type of this is BIOS, which might manage the connection between CPU and the rest of the computer’s parts), other types of memory are long-term but flexible and can change (like an operating system that can be patched to alter it, or overwritten with an upgrade), and others are short-term only and only exist when the computer is up and running, otherwise they’re empty.

    If the power goes out or is turned off, the third type gets instant 100% amnesia, so when the power comes back on, it needs to cure that amnesia.

    When you change a computer from “off” to “on”, it starts moving memories around. It takes the “STORED” instructions for the second type of memory and loads them into the third type of memory, so the computer’s “programs” and “operating systems” are now a place where they can be very easily referenced, they can quickly inform the computer what to do, and the user can work with them.

    Then many computers check by connecting to the internet to see if anything in the second type of memories (and sometimes in the first set too) needs to be updated to keep it current, and depending on the device, do some other stuff too. An example of this is a Samsung smartphone that has to connect to a Shaw data network to validate the owner’s account before that account can download data.

    When it’s done, the third set of memories is populated with everything necessary to run the computer, and only then can you work with all of it. As you do, that third set changes around until and unless its contents are “saved” somewhere.

    Getting all of this memory set up takes time, so most computers are not “INSTANT ON”. Some don’t let you do anything until fully loaded, others load some important stuff up first and do the rest behind the scenes once the most used or critical functions are available for use. And some ways of keeping the type-two memories are far far faster than other ways of keeping them, so some devices boot up much faster than others.

  7. Soccera1 Avatar

    I can’t speak for non UNIX systems, but for UNIX and UNIX like systems, it goes like this:

    1. The physical hardware is given power
    2. The computer loads the efi file to load the bootloader
    3. The bootloader loads the kernel & initramfs
    4. The kernel loads the init
    5. The init reads /etc/inittab
    6. The init switches to the default runlevel in /etc/inittab
    7. The init runs the scripts in /etc/rcX.d, which start userspace processes
  8. Anxious_Ad936 Avatar

    All the teensy tiny pixies inside that flick the teensier tinier switches are receiving a tiny electric shock to wake them up before they can begin flicking said binary switches. It takes them a short period of time to open their eyes and make coffee before they get started.

  9. StereoMushroom Avatar

    It moves code from the slow storage to the fast memory. The fast memory “forgets” everything when the power is off, but the slow storage holds information without power.

    It’s like bringing a load of tools out of a box in the garage and laying them out on your desk so you can quickly grab what you need. If you went to the garage every time you needed a tool, then put the tool back in the garage every time you were done with it, you would work really slowly.

  10. YakPilot Avatar

    The big computer is a big dummy when it wakes up in its cave, and starving, but eating pebbles can make it smarter. As soon as it wakes up, it always sees a pebble close to it. Because it likes pebbles, it goes over to get it. Upon coming up to the pebble, it sees more pebbles, going off into the distance.

    The big dumb computer follows the pebbles and eats them, one by one, become smarter and more and more awake. When the path of pebbles ends, the computer is now very far away from its cave, but it is feeling ready to go about and do what it wants to do, because of all its pebbles. When it is told to go to sleep, the computer will know to walk back to its cave, and sleep.

    The computer doesn’t know who put the pebbles there at the start of its day, but that doesn’t matter, as long as it can see a pebble when it wakes up.

  11. aaraujo666 Avatar

    One aspect of this that no one seems to have mentioned, so far.

    The CPU, when it’s powered on, has a value hardcoded, an address, that it starts executing at, or where it gets the address to start working at.

    Example: 6502 processor… as part of the “boot” process, it looks at addresses FFFC and FFFD in memory. In *THAT* address, is the “vector” of where to start executing. This is known as a “RESET vector” or “INIT vector”

    So, if those addresses have values like “12” and “34”, the processor executes a JMP (jump) instruction to address “1234” in memory (or “3412”, depending on “endianness”).

    That’s all the processor knows how to do. It’s the CODE at address “1234” that knows how to “initialize all the hardware”, “run the Power On Self Test”, etc.

    Some processors just start executing the code that it finds at memory address “0000”. Each processor is different.

  12. Function_Unknown_Yet Avatar

    Very ELI5 version – the minute the power supply provides power to the motherboard, the hardware on your motherboard is pre-programmed to know where to look for the (somewhat) hardwired instructions to get all components running and staring the boot sequence, and the hardware knows basically where to start checking on the disc for the operating system, which then takes over running everything.

  13. NeoRemnant Avatar

    Connected and closed wire networks submolecularly vibrate back and forth creating the phenomenon of mobile electricity.

    Capacitors fill up with electric potential that generate tiny magnetic fields to maintain steady microcurrents to all the precision parts.

    A fan activates to allow airflow to maintain internal temperatures at slightly above room temperature.

    Power On Self Test begins for each hardware component to ensure it is safe to boot up.

    Screen activates; electric current overvolt pulse automatically degausses modern monitors on startup by outputting a specific frequency for monitor to synchronize with temporarily removing misalignment from magnetic interference.

    Other stuff.

  14. shiratek Avatar

    There is a chip on the motherboard that, when it receives power, says, “hey, CPU, everything working ok?” and waits for the CPU to reply back, “yep, everything is ok!” It does this for every hardware component. If any component returns an error, it is supposed to display a message on the screen. If every component says it is working, then the computer looks for a small file in a predetermined location that tells it where to find all of the required files to load the operating system.

  15. JakobWulfkind Avatar

    In order to explain what’s happening in a way that makes sense, I’ll first need to explain what a processor actually does.

    At its barest level, a processor has four components: an Arithmetic Logic Unit, or ALU, an Instruction Decoder, a Counter, and Memory. The counter selects an address from memory and loads it into the instruction decoder and ALU. The instruction decoder reads the instructions in that memory section and chooses which operations the ALU will perform and which memory section it will move to next under which circumstances. The ALU performs mathematical operations such as addition, subtraction, AND, OR, and equals. If an instruction specified jumping to another memory segment, the counter is then set to the address of that segment, otherwise it is increased by one in order to move on to the next instruction in the sequence.

    When a computer first turns on, the memory is empty except for the ROM, a set of hard-coded instructions that are executed at startup. The first order of business is to copy relevant instructions from the ROM into memory and then jump to the newly loaded memory sequence, and the instructions loaded into that sequence will guide the computer through performing initial self-tests, operating the storage systems to locate the operating system, loading the operating system into memory, and jumping to the OS’s starting point.