Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9171677
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:11:44+00:00 2026-06-17T16:11:44+00:00

This might be OS specific I am not sure (I am working on Linux).

  • 0

This might be OS specific I am not sure (I am working on Linux). When the BIOS brings the boot loader in the memory and the CPU starts executing it, how does it locate the OS? Is it stored in a special disk partition/well-known sector etc? If it is stored on the file system, then the boot loader needs to interact with the file system code which is stored in the OS. How is this chicken-egg problem resolved?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:11:45+00:00Added an answer on June 17, 2026 at 4:11 pm

    A bootloader falls into several parts. First of all, the BIOS fetches some code which match a very special format, called the MBR (Master Boot Record). Remember your old computer: you have to tell the BIOS in which order it will browse some device in search of that MBR. Once it has found an MBR (the MBR is 512 bytes long, ending with a magic number – 0x55aa), it copies this piece of code at a given offset in physical memory (0x7c00 on x86), and set the Instruction Pointer to this address. Most of the time, an MBR contains a partition table and will load some extra code from the device that will help in loading the actual system: this is referred as chain loading or multi-stage loading.

    Let’s elaborate that last point. Remember that the system is running at that point in real-mode, hence you can access only 1MB of physical memory, but on the other hand you can access to your HDD in a quite easy fashion through the BIOS Interrupt Call. Nowadays, operating systems ask for much more memory than 1MB, and they will want to switch the processor in protected-mode in order to have access to a full address-space (4GB, at least on a32bit system). But once the system is in protected-mode, BIOS Interrupt Call is no more available and input/output with the HDD must go through complex-setup communication such as DMA, and that setup usually doesn’t take place into the bootloader. A boot loader will switch back and forth from real-mode to protected-mode. It fetches a sector from the HDD into the 1MB address-space, and then it switches to protected-mode to copy this sector to some place into the 4GB address-space, and finally it switches back to real-mode to fetch another sector from the HDD. Once all the sectors has been fetched and copied to physical memory, the bootloader jump to the OS.

    To sum-up:

    1. The BIOS looks in a list of devices for an MBR located on the first sector of each device. An MBR is found if the last halword of the first sector matchs a magic number. The BIOS copies the MBR to physical memory, and jump on it.
    2. The MBR embeds a partition table, thus it knows from which location (basically which cylinder-head-sector of a HDD) it should loads more code to physical memory. This step could be the loading of GRUB for instance.
    3. Let say in GRUB, the multiboot specification is used to locate an OS. Check the link below for more info on multiboot.

    You may want to take a look at these resources:

    • http://en.wikipedia.org/wiki/Master_boot_record
    • http://en.wikipedia.org/wiki/BIOS_interrupt_call
    • http://wiki.osdev.org/Boot_Sequence
    • http://duartes.org/gustavo/blog/post/how-computers-boot-up
    • http://www.gnu.org/software/grub/manual/multiboot/multiboot.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be iPhone specific, I'm not sure. The compiler doesn't complain when building
This might not be a Microsft.Practices specific question (probably not but not 100% sure)
Sorry, this might be duplicated, I'm not sure if my previous attempt to post
I'm not sure if this is specific question for Cassandra or this can also
This might be a doozy for some. I'm not sure if it's even 100%
This question might not be specific to the raspberry pi, of course. Also, I'm
Im not sure this is the correct forum for this type of question, but
I'm looking at how to solve a problem and I'm not even sure this
I haven't coded this bit up yet, because I'm not sure of which is
I've never asked anything this general before, and I'm not sure if it's going

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.