Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 277
  • Last Modified:



         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.
  • 2
1 Solution
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.
RadhajAuthor Commented:

     Thanks for your suggestion. How to load(invoke) the first stage bootloader?
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now