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

  • Home
  • SEARCH
  • 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 8938809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:42:57+00:00 2026-06-15T10:42:57+00:00

I’ve been looking at LILO bootsect.s and GRUB stage1.s. LILO loads things(or something) from

  • 0

I’ve been looking at LILO bootsect.s and GRUB stage1.s.

LILO loads things(or something) from a specific hard-coded sector; it doesn’t use some reserved bytes that can be patched up on installation. I wonder how does this work for if when you’re on a partition and not alone on a drive? How does LILO tell its bootsec.s where it is on the disk and so adjust appropriately where the files it needs to load are?

LILO doesn’t have space for a BPB, so it is for the most part an ext bootloader. ext only has another 512 reserved right after the bootsector. Can LILO’s stage 2 really fit in just that little space? Or does it place it on a reserved block?

On the other hand, GRUB does have a reserved dword for where the stage2 resides, which I reckon can be patched up on installation. But it doesn’t say anything about the size of it. Looking at it, it seems that it just reads a single sector(mov ax, 0x0201) and then jumps to it. Looking at the stage2 directory, I don’t think it can fit on just a single sector.

Both the LILO and GRUB config files have nothing about the filesystem on which they are on. How do they continue with the bootprocess? I mean it contains paths for the files, but I don’t think that helps much. Do they try to find out? How so? If there is an already existing OS, won’t there be any conflicts with how the current OS likes its filesystem setup and the bootloader files? Given that their stage1 is pretty much filesystem-stupid.

When LILO and GRUB sets up a partition bootsector(a pre-partitioned disk), does it read the partition table on the MBR and so infers where the rest of it is on the disk and so the ‘fixed addressing’ can work since it will patch stuff, or does it actually load its stuff on fixed hard disk sectors? I go back to my conflict question.

I’m trying to write a bootloader and I feel that something that just reads off a static disk address isn’t good enough as it can conflict with filesystem structures and I am lost on how to ‘know’ where I am on the disk because I don’t know if I could trust that the DS:SI points to a real partition table(what if I’m on LBA 0?) and reading the MBR partition table and patching some dword in my stage1 doesn’t sit very well to me. So I’m looking for some inspiration from LILO and GRUB. Not being written in NASM doesn’t really help. 🙁

  • 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-15T10:42:58+00:00Added an answer on June 15, 2026 at 10:42 am

    There is apparently what is called the ‘DOS compatibility region’. Insight here

    Basically, CHS 0:0:2 – 0:0:63 is ‘free’; partitions start at 1:0:1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I have been unable to fix a problem with Java Unicode and encoding. The
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Does anyone know how can I replace this 2 symbol below from the string

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.