Jump to content

bootloader & bootstrap difference?

Go to solution Solved by Mira Yurizaki,

Bootloader is a piece of software that lives on storage (a hard drive, a flash chip somewhere, etc.) that tells the computer how to load the operating system. The basic gist of a computer booting up is:

  • The CPU starts up and runs whatever program is the address of the reset vector.
  • The program in the reset vector address is usually a system startup program to set the hardware and perform tests to make sure thing are alright.
  • Afterwards, the system looks at all attached permanent storage devices.
  • If the permanent storage device has a boot sector, it loads and runs that. This tells the computer how to read the drive and where the bootloader is, if there is one.
  • The bootloader, as mentioned before, tells the computer how to load the operating system. Normally operating systems has its own startup programs (or perhaps just the kernel) located in a fixed location on the hard drive. The bootloader tells the computer where that location is.

Bootstrapping is the process I described above. It's shortened to just "booting"

can someone explain me the difference between the bootstrap and bootloader?I checked the whole Google and I didn't find any decent explanation..everybody just uses copy paste.I only know that when you turn on the PC,the CPU initializes itself,then the next thing is the ROM.It's function is to start the POST(power on self test) and to check all the hardware components and if everything is fine,the loading of OS begins.Where's the bootloader and bootstrap place in this?

Link to comment
Share on other sites

Link to post
Share on other sites

Bootloader is a piece of software that lives on storage (a hard drive, a flash chip somewhere, etc.) that tells the computer how to load the operating system. The basic gist of a computer booting up is:

  • The CPU starts up and runs whatever program is the address of the reset vector.
  • The program in the reset vector address is usually a system startup program to set the hardware and perform tests to make sure thing are alright.
  • Afterwards, the system looks at all attached permanent storage devices.
  • If the permanent storage device has a boot sector, it loads and runs that. This tells the computer how to read the drive and where the bootloader is, if there is one.
  • The bootloader, as mentioned before, tells the computer how to load the operating system. Normally operating systems has its own startup programs (or perhaps just the kernel) located in a fixed location on the hard drive. The bootloader tells the computer where that location is.

Bootstrapping is the process I described above. It's shortened to just "booting"

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, sample text said:

can someone explain me the difference between the bootstrap and bootloader?I checked the whole Google and I didn't find any decent explanation..everybody just uses copy paste.I only know that when you turn on the PC,the CPU initializes itself,then the next thing is the ROM.It's function is to start the POST(power on self test) and to check all the hardware components and if everything is fine,the loading of OS begins.Where's the bootloader and bootstrap place in this?

A bootloader is responsible for loading one or multiple operating systems upon boot. It also loads some basic hardware like USB keyboards before the OS initializes the rest.

 

From what I've found online, a bootstrap loader resides in the BIOS or other ROM-type non-volatile memory and loads the bootloader from the first few sectors of a hard drive on a BIOS system. In a UEFI system, a boot manager is included in the specification, allowing the bootstrap loader to instead detect different OSes on different EFI System Partitions (ESPs) and boot from a specified one. In a way, the UEFI system is sort of "intelligent" in that it is aware of different OSes and bootloaders in the system whereas the BIOS just blindly loads a boot sector off a disk.

 

Spoiler

My main desktop, "Rufus":

Spoiler

PC Specs:

CPU: AMD Ryzen 5 1600

CPU Cooler: Cooler Master MasterLiquid Lite 120

RAM: 2x8gb Corsair Vengence DDR4 Red LED @ 3066mt/s

Motherboard: MSI B350 Gaming Pro Carbon

GPU: XFX RX 580 GTR XXX White 

Storage: Mushkin ECO3 256GB SATA3 SSD + Some hitachi thing

PSU: Seasonic Focus Plus Gold 650W

Case: Corsair Crystal 460X

OS: Windows 10 x64 Pro Version 1607

Retro machine:

Spoiler

PC Specs:

CPU: Intel Core 2 Quad Q9550

CPU Cooler: Stock heatsink

RAM: GSkill 4gb DDR2 1066mt/s

Motherboard: Asus P5n-e SLI

GPU: 8800 GTS 640mb, I swap between that and my 8800 GTS 512mb

Storage: Seagate 320gb right from 2006

PSU: Ultra 600W 

Case: Deepcool Tesseract SW

OS: Windows XP SP3 32-bit, Linux Mint 18.2 Cinnamon 64-bit, Manjaro Deepin x64 (sorta)

Mac Pro Early 2008: Dual Xeon X5482s w/ 32GB RAM & HD 5770 running macOS High Sierra

More PC's

 

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, sample text said:

can someone explain me the difference between the bootstrap and bootloader?I checked the whole Google and I didn't find any decent explanation..everybody just uses copy paste.I only know that when you turn on the PC,the CPU initializes itself,then the next thing is the ROM.It's function is to start the POST(power on self test) and to check all the hardware components and if everything is fine,the loading of OS begins.Where's the bootloader and bootstrap place in this?

 

To the best of my knowledge, the simplest explanation I can use is this:

 

The bootloader is the first thing run after the hardware is initialised. On a UEFI system, this will be a .efi binary located in the efi partition of the boot drive. If Secure Boot is enabled, the firmware verifies the digital signature of this file before handing control over to it. If it's a traditional system using a BIOS, then it'll be at a specific sector on the selected boot volume.

 

Bootstrapping is something that has sort of changed meaning over the last few years as machines become more modern. In classical terms, its the term to describe the entire process of BIOS/firmware handing control to the operating system. But it used to specifically refer to (basically) combining multiple bootloaders. For example, in Linux terms, it used to be called Chainloading - where Grub or Lilo would be the bootloader that is run first, and would bootstrap (ie, run) NTLDR to allow booting of XP or older, or BCD to run Vista+. Grub couldn't boot directly to Windows, but it could pass the init over to the Windows loader instead. This transference was called bootstrapping, but isn't limited to this scenario. 

 

This isn't a completely technical explanation, but it's becoming less and less relevant as more and more machines move over to UEFI and less people run legacy software. UEFI doesn't have the same limitations (mainly on size) that required chainloading of traditional bootloaders to allow BIOS-based machines to run arbitrary operating system code, and the increased security requirements in modern machines would be impossible to fit within the size limitations of BIOS-based machines. 

 

Nowadays, the difference basically boils down to whether you're referring to the actual bootable code run first after hardware initialisation (the bootloader), and describing the process (bootstrapping). 

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, panther420 said:

A bootloader is responsible for loading one or multiple operating systems upon boot. It also loads some basic hardware like USB keyboards before the OS initializes the rest.

 

From what I've found online, a bootstrap loader resides in the BIOS or other ROM-type non-volatile memory and loads the bootloader from the first few sectors of a hard drive on a BIOS system. In a UEFI system, a boot manager is included in the specification, allowing the bootstrap loader to instead detect different OSes on different EFI System Partitions (ESPs) and boot from a specified one. In a way, the UEFI system is sort of "intelligent" in that it is aware of different OSes and bootloaders in the system whereas the BIOS just blindly loads a boot sector off a disk.

 

The highlighted section isn't entirely correct although it's not wrong either. The UEFI bootloader simply looks for an EFI file contained in a folder called EFI on the selected disk and boots it.

 

The differentiation that's important to understand is this doesn't necessarily need to be a bootloader or infact any part of an OS at all. Think of EFI files as EFI executables, the EFI could launch a self contained EFI application (something like a mem tester for example), a UEFI extension (so like a raid configuration utility) or even the UEFI itself.

 

If your machine is set to UEFI boot then try the following, from inside Windows hold down left shift then click Start > Power > Restart and you'll get a menu pop up. From this menu click Advanced > Reboot to UEFI Firmware and your computer will reboot and load straight into the UEFI. This works because Windows places a UEFI.efi file into the EFI boot folder that contains a command to tell a UEFI terminal to load the firmware interface. Windows merely hands the command over to the UEFI terminal then reboots and the terminal automatically loads the firmware interface.

 

In some ways EFI is in itself a mini operating system, it can load applets and has a terminal.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Master Disaster said:

The highlighted section isn't entirely correct although it's not wrong either. The UEFI bootloader simply looks for an EFI file contained in a folder called EFI on the selected disk and boots it.

 

The differentiation that's important to understand is this doesn't necessarily need to be a bootloader or infact any part of an OS at all. Think of EFI files as EFI executables, the EFI could launch a self contained EFI application (something like a mem tester for example), a UEFI extension (so like a raid configuration utility) or even the UEFI itself.

 

If your machine is set to UEFI boot then try the following, from inside Windows hold down left shift then click Start > Power > Restart and you'll get a menu pop up. From this menu click Advanced > Reboot to UEFI Firmware and your computer will reboot and load straight into the UEFI. This works because Windows places a UEFI.efi file into the EFI boot folder that contains a command to tell a UEFI terminal to load the firmware interface. Windows merely hands the command over to the UEFI terminal then reboots and the terminal automatically loads the firmware interface.

 

In some ways EFI is in itself a mini operating system, it can load applets and has a terminal.

That makes sense. I was aware of .EFI files and how UEFI works, I just wasn't very articulate in my abstraction for OP.

Spoiler

My main desktop, "Rufus":

Spoiler

PC Specs:

CPU: AMD Ryzen 5 1600

CPU Cooler: Cooler Master MasterLiquid Lite 120

RAM: 2x8gb Corsair Vengence DDR4 Red LED @ 3066mt/s

Motherboard: MSI B350 Gaming Pro Carbon

GPU: XFX RX 580 GTR XXX White 

Storage: Mushkin ECO3 256GB SATA3 SSD + Some hitachi thing

PSU: Seasonic Focus Plus Gold 650W

Case: Corsair Crystal 460X

OS: Windows 10 x64 Pro Version 1607

Retro machine:

Spoiler

PC Specs:

CPU: Intel Core 2 Quad Q9550

CPU Cooler: Stock heatsink

RAM: GSkill 4gb DDR2 1066mt/s

Motherboard: Asus P5n-e SLI

GPU: 8800 GTS 640mb, I swap between that and my 8800 GTS 512mb

Storage: Seagate 320gb right from 2006

PSU: Ultra 600W 

Case: Deepcool Tesseract SW

OS: Windows XP SP3 32-bit, Linux Mint 18.2 Cinnamon 64-bit, Manjaro Deepin x64 (sorta)

Mac Pro Early 2008: Dual Xeon X5482s w/ 32GB RAM & HD 5770 running macOS High Sierra

More PC's

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×