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.

Filter by
Sorted by
Tagged with
311 votes
4 answers
130k views

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 ...
user2320609's user avatar
  • 2,117
68 votes
3 answers
80k views

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 ...
Fengwei Zhang's user avatar
43 votes
5 answers
15k views

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 ...
OfusJK's user avatar
  • 706
33 votes
2 answers
57k views

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 ...
modest's user avatar
  • 1,417
30 votes
2 answers
10k views

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 ...
vicatcu's user avatar
  • 5,617
28 votes
2 answers
12k views

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 ...
solyd's user avatar
  • 782
26 votes
6 answers
29k views

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 ...
chainz's user avatar
  • 273
24 votes
5 answers
15k views

How does UEFI work?

I was studying about bootloaders when exactly came upon the term UEFI. I can understand some things about UEFI. But still, In what mode(Real,Protected,Long) does a system with UEFI start? If normal ...
prog481's user avatar
  • 329
23 votes
5 answers
36k views

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 ...
user avatar
22 votes
4 answers
10k views

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's user avatar
  • 30.1k
22 votes
4 answers
4k views

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 ...
Joshua Vega's user avatar
18 votes
9 answers
9k views

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 ...
waffleman's user avatar
  • 4,239
18 votes
2 answers
15k views

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 ...
tdenniston's user avatar
  • 3,459
18 votes
2 answers
2k views

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 ...
Michael Petch's user avatar
17 votes
1 answer
10k views

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, ...
vakus's user avatar
  • 732
17 votes
1 answer
3k views

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 ...
smwikipedia's user avatar
  • 63.2k
16 votes
1 answer
16k views

How does Raspberry Pi's boot loader work?

Recently I started to study about Embedded System and Embedded Linux. I know that in an embedded system, the operating system is stored on Flash or ROM. When it's turned on, the bootloader loads the ...
Heewon Hwang's user avatar
16 votes
1 answer
15k views

Debugging bootloader with gdb in qemu

There seems to be a problem with the Freedos bootloader. (It appears that the bootcode can't find the kernel in certain circumstances.) So I'm trying to debug the bootloader in qemu with gdb. ...
rhlee's user avatar
  • 4,017
15 votes
4 answers
51k views

ADB Fastboot error when flasing rom 'FAILED remote unknown command'

I'm trying to flash Google factory image file on nexus 6P but it always stops at the same point. USB debugging is enabled, MTP mode also. Bootloader is unlocked and communicating with ADB Fastboot etc,...
Zach89's user avatar
  • 193
14 votes
3 answers
25k views

Difference between bootloader and bootstrap loader?

how boot loader is different from bootstrap loader. According to me bootstrap loaders are stored in ROM and boot loaders are in hard disk in MBR (please correct me if I am wrong). bootstrap loader is ...
alice's user avatar
  • 141
14 votes
2 answers
2k views

Custom bootloader booted via USB drive produces incorrect output on some computers

I am fairly new to assembly, but I'm trying to dive into the world of low level computing. I'm trying to learn how to write assembly code that would run as bootloader code; so independent of any other ...
Austin Fay's user avatar
14 votes
2 answers
30k views

ARM bootloader: Interrupt Vector Table Understanding

The code following is the first part of u-boot to define interrupt vector table, and my question is how every line will be used. I understand the first 2 lines which is the starting point and the ...
user avatar
13 votes
2 answers
9k views

How can i put a compiled boot sector onto a USB stick or disk?

I'm actually interested in how an OS works, from the POST over the Boot process to the Kernel, GUI, etc. Well I have to start at the beginning: The bootsector Most tutorials only specify how to get ...
orossum's user avatar
  • 133
13 votes
1 answer
11k views

Why 55 AA is used as the boot signature on IBM PCs? [closed]

Why does the IBM PC architecture use 55 AA magic numbers in the last two bytes of a bootsector for the boot signature? I suspect that has something to do with the bit patterns they are: 01010101 ...
SasQ's user avatar
  • 14.4k
12 votes
1 answer
6k views

Far jump in gdt in bootloader

flush_gdt: lgdt [gdtr] jmp 0x08:complete_flush complete_flush: mov ax, 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax ret I am unable to understand ...
abkds's user avatar
  • 1,774
12 votes
2 answers
3k views

Page number in BIOS interrupts

I'm building a small bootloader for x86 as a project. For the moment I'm writing several functions to handle the screen, since it's a bit tedious. Most BIOS interrupt functions involve a page number ...
Guido's user avatar
  • 2,609
12 votes
4 answers
8k views

How does the bootloader pick up the command after a "restarting system with command"?

Looking in the android source for the reboot command we find the following line: __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, \ LINUX_REBOOT_CMD_RESTART2, argv[optind]); Which is the ...
Bjarke Freund-Hansen's user avatar
11 votes
2 answers
4k views

How to make the kernel for my bootloader?

I'm trying to make my own custom OS and I need some help with my code. This is my bootloader.asm: [ORG 0x7c00] start: cli xor ax, ax mov ds, ax mov ss, ax mov es, ax mov [...
Mohammed Ibrahim Ali's user avatar
11 votes
1 answer
2k views

Grub bootloader with shared library support

I'd like to load a shared library (closed-source binary user-space library) at boot stage with grub boot-loader. Are there any chances for this or I must write a custom-elf-loader (grub module) to do ...
tuantm's user avatar
  • 341
11 votes
4 answers
32k views

How do I run linux on an ARM Cortex M3 board?

I have a Luminary LM3s8962 ARM Cortex M3 development board, and while I've been able to program for it using the Keil RTOS, I'd much prefer to develop on top of linux and an embedded libc. What I ...
wooster's user avatar
  • 111
11 votes
1 answer
3k views

Disk Read Error while loading sectors into memory

I tried to develop a bootloader using this, but when it is run it shows: disk read error! If I ignore it, in a later part, it shows me wrong memory mapping. I also followed some other sources too ...
Palvit Garg's user avatar
11 votes
1 answer
17k views

how to build grub2 bootloader from it's source and test it with qemu emulator

I want to know how to build grub 2 bootloader from it's source in ubuntu and test it with qemu emulator. I would also like to change the default background image of grub2 bootloader in the new build?...
Project-A's user avatar
  • 153
11 votes
2 answers
13k views

Bootloader for Cortex M3

I am using a LPC 1768 board from mbed, (with cortex M3 cpu) and I am trying to achieve something here, mainly upgrade the user application from the SD Card, I am writing two programs, first a ...
batmat's user avatar
  • 225
10 votes
4 answers
771 views

My bootloader can't be compiled with gcc 4.6 and 4.7 ... only 4.5

I created my bootloader before 2 years under debian squeeze/stable with gcc 4.5. Now in debian wheezy/sid can't be compiled with 4.6 and 4.7 because creates bigger sections from these i expecting to ...
Memos Electron's user avatar
10 votes
3 answers
13k views

what is the need of second stage boot loader ? why different bootloaders like first stage and second stage?

I know the first stage boot loader will make basic hardware initializations and calls the second stage boot loader like u-boot. But I still do not understand for why we need multiple stages of boot ...
Pradeep G's user avatar
  • 111
10 votes
1 answer
6k views

Run a UEFI shell command from inside UEFI application

I'm new to UEFI application development. My requirement is that, I need to run an UEFI shell command from my UEFI application (app.efi) source code. Need guidance on how I can do this. Example, ...
Keshava GN's user avatar
  • 4,215
10 votes
3 answers
6k views

How to load second stage boot loader from first stage?

I have written simple first stage bootloader which displays "Hello world" using interrupt to bios. Now as a next obvious step to write a second stage, but where code for that should exist and how to ...
Xinus's user avatar
  • 30.1k
10 votes
1 answer
932 views

Intel hex format and position independent code using gcc

I'm not sure if this is specific to the processor I'm using, so for what it's worth I'm using a Cortex M0+. I was wondering: if I generate a hex file through gcc using -fPIC, I produce...Position ...
Michael Stachowsky's user avatar
10 votes
1 answer
236 views

Where is there good information about low level PC booting?

I'm interested in writing a boot loader for USB sticks that looks for a directory of ISOs and gives you the option to boot one of them as if it were a bootable CD. This is basically so I have a menu ...
Omnifarious's user avatar
  • 55.2k
9 votes
4 answers
11k views

How do I write a bin file (512 bytes) to the first sector (sector 0) of a floppy disk?

How do I write a .bin file to be in the first sector of a floppy disk/virtual floppy disk/floppy image? I'm trying to boot a simple 512-byte bootloader. The size on everywhere says "512 bytes" so I ...
Star OS's user avatar
  • 119
9 votes
3 answers
6k views

which core initializes first when a system boots?

I want to know which core of a multicore processor initializes first when the cpu boots ? ( i mean at the bootloader level ) is the first core ? or random core ?
Knight Rider's user avatar
9 votes
3 answers
5k views

How to step over interrupt calls when debugging a bootloader/bios with gdb and QEMU?

For educational purposes, I have adapted this bootloader from mikeos.berlios.de/write-your-own-os.html rewriting it to specifically load at address 0x7c00. The final code is this: [BITS 16] ...
Cesar Brod's user avatar
9 votes
1 answer
14k views

Using db to declare a string in assembly NASM

I am following a tutorial to write a hello world bootloader in assembly and I am using the NASM assembler for an x-86 machine. This is the code I am using : [BITS 16] ;Tells the assembler that its ...
Neeraj's user avatar
  • 137
9 votes
2 answers
6k views

How would I write a bootloader to load a c kernel?

I am learning NASM as I write bootloaders. So far I have a hello world bootloader. I want to know how to link a c program to it and have the bootloader load it into memory and start executing it's ...
user701329's user avatar
9 votes
1 answer
2k views

Stack segment in the MikeOS bootloader

I don't understand this piece of code: mov ax, 07C0h ; Set up 4K of stack space above buffer add ax, 544 ; 8k buffer = 512 paragraphs + 32 paragraphs (loader) cli ; Disable ...
qik's user avatar
  • 770
9 votes
1 answer
4k views

PC boot: dl register and drive number

I read somewhere in the internet that, before jumping to 0x7c00, the BIOS loads into %dl the "drive number" of the booted device. But what is this "drive number"? Each device attached to the computer ...
KevinRGT's user avatar
  • 399
8 votes
4 answers
17k views

Read a write a sector from hard drive with int 13h

I have a simple program. It must read first sector from hard drive (not mbr), and write it to the 0 sector (mbr). But it doesnt work. I think it is connected with wrong DAP. Thanks. [bits 16] ...
Vanzef's user avatar
  • 453
8 votes
2 answers
4k views

understanding nasm assembly for outputting characters in teletype mode

I am reading this wonderful skript on operating system programming http://www.cs.bham.ac.uk/~exr/lectures/opsys/10_11/lectures/os-dev.pdf On Page 12 there is a simple bootloader. If I understand ...
user3813234's user avatar
  • 1,650
8 votes
2 answers
11k views

How to switch from real mode to protected mode after bootloader?

I just finished up a very bare-bones bootloader for my OS and now I'm trying to switch to protected mode and jump to the kernel. The kernel exists on the second sector (right after the bootloader) ...
David's user avatar
  • 703
8 votes
1 answer
1k views

Near call/jump tables don't always work in a bootloader

General Problem I've been developing a simple bootloader and have stumbled on a problem on some environments where instructions like these don't work: mov si, call_tbl ; SI=Call table pointer ...
Michael Petch's user avatar

1
2 3 4 5
37