Questions tagged [bootloader]

Bootloader is a program that loads the operating system into the computer's memory and set it into execution. When a computer is powered-up or restarted, the basic input/output system (BIOS) performs some initial tests, and then transfers control to the Bootloader.

A computer's central processor can only execute program code found in read-only memory (ROM), random access memory (RAM). Modern operating systems and application program code and data are stored on nonvolatile data storage devices, such as hard drives, CD, DVD, flash memory cards (like an SD card), USB flash drive, and floppy disk.

When a computer is first powered on, it usually does not have an operating system in ROM or RAM. The computer must execute a relatively small program stored in ROM along with the bare minimum of data needed to access the nonvolatile devices from which the operating system programs and data are loaded into RAM.

The small program that starts this sequence of loading into RAM is known as a bootstrap loader, bootstrap or boot loader. This small boot loader program's only job is to load other data and programs which are then executed from RAM. Often, multiple-stage boot loaders are used, during which several programs of increasing complexity sequentially load one after the other in a process of chain loading.

1488 questions
266
votes
4 answers

How to run a program without an operating system?

How do you run a program all by itself without an operating system running? Can you create assembly programs that the computer can load and run at startup, e.g. boot the computer from a flash drive and it runs the program that is on the CPU?
user2320609
  • 1,659
  • 3
  • 11
  • 6
64
votes
3 answers

What is the booting process for ARM?

As we know, for X86 architecture: After we press the power button, machine starts to execute code at 0xFFFFFFF0, then it starts to execute code in BIOS in order to do hardware initialization. After BIOS execution, it use bootloader to load the OS…
Fengwei Zhang
  • 967
  • 2
  • 9
  • 13
43
votes
5 answers

Why does the general program usually start at 0x8000?

I am not new to bootloader and system SW, but I don't know the origin of the reason why the general program starts at 0x8000. I already know the address 0x8000 has been used as start address in normal C/C++ program. Does the minimum size of the…
OfusJK
  • 657
  • 1
  • 5
  • 12
30
votes
2 answers

Arduino Bootloader

Can someone please explain how the Arduino bootloader works? I'm not looking for a high level answer here, I've read the code and I get the gist of it. There's a bunch of protocol interaction that happens between the Arduino IDE and the bootloader…
vicatcu
  • 5,397
  • 5
  • 35
  • 53
29
votes
2 answers

What is the difference between a Bootrom vs bootloader on ARM systems

I primarily come from an x86 system background where BIOS (Firmware) is responsible for loading a bootloader (like GRUB) from PowerON which in turn loads the OS. I now have been reading the equivalent boot sequence on ARM systems and it seems there…
modest
  • 1,277
  • 3
  • 14
  • 20
28
votes
2 answers

bootloader - switching processor to protected mode

I'm having difficulties understanding how a simple boot loader works. The boot loader I'm talking about is the one from MITs course "Operating Systems Engineering". First, let me show you a piece of assembly code the BIOS executes: [f000:fec3] …
solyd
  • 772
  • 2
  • 8
  • 18
23
votes
6 answers

Why do we need a bootloader in an embedded device?

I'm working with ELinux kernel on ARM cortex-A8. I know how the bootloader works and what job it's doing. But i've got a question - why do we need bootloader, why was the bootloader born? Why we can't directly load the kernel into RAM from flash…
chainz
  • 243
  • 1
  • 2
  • 8
22
votes
5 answers

Bootloader in C won't compile

I am a newbie in writing bootloaders. I have written a helloworld bootloader in asm, and I am now trying to write one in C. I have written a helloworld bootloader in C, but I cannot compile it. This is my code. What am I doing wrong? Why won't it…
Dnyanesh Gate
  • 1,022
  • 3
  • 12
  • 26
21
votes
4 answers

Bootloader in C/C++?

Is it possible to create a bootloader in C or C++ without using some type of Assembler (and preferably without using __asm)? I'm writing an Operating System and would like it to be completely written in C and C++.
Joshua Vega
  • 561
  • 1
  • 8
  • 20
18
votes
4 answers

What is significance of memory at 0000:7c00 to booting sequence?

Why does bios read at partition's boot record at 0000:7c00 ? What is special about that address ? what ':' doing in referencing an address ?
Xinus
  • 26,861
  • 26
  • 111
  • 160
17
votes
1 answer

Boot loader doesn't jump to kernel code

I'm writing small operation system - for practice. I started with bootloader. I want to create small command system that runs in 16 bit real mode (for now). I've created bootloader that resets drive, then loads sector after bootloader. The problem…
vakus
  • 642
  • 8
  • 22
17
votes
10 answers

To write a bootloader in C or C++?

I am writing a program, more specifically a bootloader, for an embedded system. I am going to use a C library to interact with some of the hardware components and I have the choice of writing it either in C or C++. Is there any reason I should…
waffleman
  • 3,817
  • 8
  • 35
  • 61
17
votes
1 answer

Is there any documentation about how Minix 3.2 (latest) boot?

I found this site: http://www.os-forum.com/minix/boot/ which claims to document the boot sequence of Minix. But in the source tree of Minix 3.2 I just get from Git, the files described in the above site simply don't exist. They…
smwikipedia
  • 52,824
  • 76
  • 267
  • 432
15
votes
2 answers

Legacy BIOS bootloader to bootstrap real-mode code in second stage

I am working on writing my own operating system. So far, my code exceeds 512 bytes, which is too large to fit in a simple boot sector. I understand that I now have to write a bootloader that reads arbitrary code that may or may not be greater than a…
Michael Petch
  • 42,023
  • 8
  • 87
  • 158
13
votes
2 answers

x86 NASM 'org' directive meaning

I am following this tutorial as a first foray into bootloader/OS development for x86 using NASM: http://joelgompert.com/OS/TableOfContents.htm And I'm on Lesson 4, which is making my bootloader print the "Hello, world" string. I'm not understanding…
tdenniston
  • 3,166
  • 2
  • 16
  • 28
1
2 3
99 100