Posted on 2003-03-24
Medium Priority
Last Modified: 2010-08-05

         I had to write BIOS for my PVR. My embedded device includes a Linux
 OS. I had to load my OS from hard disk into RAM. So i had to invoke
the bootloader from my BIOS program. I am using LILO bootloader. How shall
I invoke my bootloader from my BIOS program.
Question by:Radhaj
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 8200725
The way your question is worded is somewhat tough to understand, but I'll take a stab at it. LILO actually installs two bootloaders. The first bootloader (stage 1) resides somewhere in the first few sectors of the disk. Its job is to load the second bootloader (stage 2) from the appropriate partition on the hard disk. The stage 2 bootloader resides in the first few sectors of each partition, the total size allowed for it varies by filesystem (Fat12/Fat16 = 1 sector, Fat32 = 3 sectors, ext2fs = 32 sectors I think). In the case of Linux, the stage 2 bootloader is responsible for loading the kernel off the disk and into memory (it uses BIOS calls I believe), then switching the processor's memory handeler into real mode (2GB address space), then finally it begins executing the kernel in memory. Once execution is passed to the kernel it uncompresses itself, fresses the compressed memory image, and begins its bootup sequence. So to sum all this up, the job of your bios will be to load the stage1 bootloader from disk and execute it. After that the stage2 bootloader and kernel will take over.

Author Comment

ID: 8201684

     Thanks for your suggestion. How to load(invoke) the first stage bootloader?

Accepted Solution

cjs2895 earned 150 total points
ID: 8203722
To invoke it, you basically load the entire sector into memory then execute it (jmp to it). The LILO homepage is http://brun.dyndns.org/pub/linux/lilo/ and the syslinux (another bootloader) homepage is http://syslinux.zytor.com/. If you write the authors of either package I'm sure they'd be happy to tell you in more explicit detail how to invoke their stage 1 loaders. I'd try to give more detail, but I seem to have misplaced one of my notebooks.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question