[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Osaka/Yokohama/Tokushima] Looking for infrastructure/server side engineers!

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Deployed by over 500 companies] AWS construction, operation, maintenance, and monitoring services

[Successor to CentOS] AlmaLinux OS server construction/migration service

[Successor to CentOS] AlmaLinux OS server construction/migration service

[For WordPress only] Cloud server “Web Speed”

[For WordPress only] Cloud server “Web Speed”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Cheap] Website security automatic diagnosis “Quick Scanner”

[Reservation system development] EDISONE customization development service

[Reservation system development] EDISONE customization development service

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Registration of 100 URLs is 0 yen] Website monitoring service “Appmill”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[Compatible with over 200 countries] Global eSIM “Beyond SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[If you are traveling, business trip, or stationed in China] Chinese SIM service “Choco SIM”

[Global exclusive service] Beyond's MSP in North America and China

[Global exclusive service] Beyond's MSP in North America and China

[YouTube] Beyond official channel “Biyomaru Channel”

[YouTube] Beyond official channel “Biyomaru Channel”

[For beginners] Illustrated explanation of the mechanism from turning on the server to completing booting

Hello.
I'm Kita from Beyond, who obtained super rare characters in the Great Cat War and is unrivaled.

Last time, I blogged about
hardware articles This time, I will explain in an easy-to-understand way how the server works from when it is powered on until it completes startup.

We usually casually start and stop servers in the cloud, but fewer people than we think understand the process that leads to that point.
(I was one of them too)

This time, I will explain the boot order in a way that even beginners can understand, including illustrations, so please read until the end.

Overall view when starting a Linux server

First of all, to conclude, a Linux system starts up as follows.

Firmware (BIOS/UEFI) → Bootloader → Kernel → init processing

However, it is difficult to understand with just this information, so I will explain it in more detail using diagrams.

There are a total of 8 steps from turning on the power to completing startup.
Roughly speaking, startup is completed as follows.

  1. Boot into BIOS/UEFI
  2. Hardware detection runs
  3. Boot device selection process runs
  4. GRUB starts
  5. kernel starts
  6. initramfs starts
  7. systemd starts
  8. Startup completed

Using the overall diagram, the flow is as shown above, and the entire system startup process is called a boot, and the process
from BIOS/UEFI startup to the above series of steps is called a "boot sequence" or "boot-up"
process. Next, we will explain the details of each item.

Description of each item

①BIOS/UEFI boot

when you press the power button on your computer and thing that runs is BIOS/UEFI.
BIOS/UEFI is installed in the ROM of the motherboard, and its role is to initialize various devices installed in the computer before starting the OS, and to properly start the OS.

There is a difference between BIOS and UEFI, but as you can see in the diagram, UEFI is an improved version of BIOS.
However, this does not mean that only UEFI is sufficient; currently, both coexist.

Functionally, both are similar, but UEFI has improved the operability of the conventional BIOS, which is complicated.

②Hardware detection

Next, we will explain hardware detection.

One of the BIOS processes called
POST (Power-On Self-Test) that recognizes, checks, and initializes connected hardware so that it can be used.

③Boot device selection

Next, the boot device selection process runs.
This is also one of the BIOS processes, and after performing POST (hardware recognition), the boot device (storage containing the OS) is selected.

The boot device is the storage (HDD/SSD) that contains the program that you want to run first when you start the server.
It is easy to understand if you remember that boot device = storage that contains the OS you want to boot

④Start bootloader

Next, the BIOS starts the boot loader stored in the boot device.
A bootloader is a program that recognizes and starts the OS (kernel) .

Many Linux systems use GRUB as their boot loader, and
there are two types of GRUB: "GRUB Legacy", which has been used for a long time, and "GRUB 2".
*Support for GRUB Legacy has already been discontinued.

Modern operating systems basically use the new version of GRUB 2.

⑤Kernel startup

Now it's time to start the kernel.

The kernel is the core program of Linux, and is also called Linux in the narrow sense.
It is mainly responsible for controlling the hardware connected to the server.

In summary, BIOS/UEFI starts the boot loader (GRUB) contained in the boot device, and the boot loader starts the kernel.

⑥Start initramfs

The kernel then starts the initramfs to access the data needed to boot the system.

After the initramfs is placed in memory by the boot loader, it is expanded and used temporarily by the kernel, and the kernel is responsible for mounting the file system.

The boot loader starts by loading the kernel and RAM file system (initramfs) into memory, then the kernel expands the initramfs and registers it as a temporary rootfs → initializes → mounts it.

This will allow you to load the necessary kernel modules and initialize the device.

After that process is complete, the original file system contained in the HDD or SSD will be remounted as rootfs.

This is a complicated topic, so I think it's best to briefly summarize it as a mechanism that allows the kernel to access the data necessary to boot the system

⑦Start systemd

After the initramfs mounts the root file system, the kernel loads and boots ``systemd''.

systemd is the first process (PID=1) that is created when the system starts.
It is an abbreviation for "system daemon," and a daemon resides in memory and has the role of controlling the entire system.

A daemon is a program that starts when the system starts and continues to run in the background while the system is running.

⑧Startup complete

Finally, the startup will be completed.
After systemd is called by the kernel, it sequentially generates the "child processes" necessary for system operation, and the login screen will be displayed.

summary

Finally, I will summarize and review the flow up to startup.

  1. First, press the power button to start the BIOS/UEFI (firmware)
  2. BIOS initializes hardware via POST
  3. BIOS selects boot device from recognized hardware
  4. BIOS launches the bootloader stored on the boot device
  5. The bootloader reads the kernel from the selected boot device and starts it.
  6. kernel starts initramfs
  7. initramfs allows the kernel to handle data needed to boot the system
  8. systemd takes over processing, generates child processes necessary for system operation, initializes the system, and displays the login screen

That's how it went.

lastly

Up to this point, we have explained in detail about BIOS/UEFI, boot devices, boot loaders, initramfs, systemd, etc. from the point of turning on the power to completing booting.

Since it has become common for the computer to start up, it may be rare to have the opportunity to understand the startup process, but it will be useful knowledge when troubleshooting if the startup does not work properly. I hope that this article will help you understand the process of starting a server.

was created with reference to the video of
Nezumiya's Infrastructure Engineer Dojo, a channel operated by our company This is a great channel where you can learn knowledge about infrastructure from scratch, so if you are interested, please subscribe to the channel and give it a high rating!

If you found this article helpful , please give it a like!
4
Loading...
4 votes, average: 1.00 / 14
120
X facebook Hatena Bookmark pocket
[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

[2025.6.30 Amazon Linux 2 support ended] Amazon Linux server migration solution

The person who wrote this article

About the author

Kita

Beyond picked me up from my part-time job.
Human Resources Department Education Division Infrastructure Engineer
I hate flying insects.