flat assembler
Message board for the users of flat assembler.

Index > Linux > bootloader

Thread Post new topic Reply to topic

Joined: 21 May 2010
Posts: 287
Im having some problems with booting linux and i think i dont understand few things.

- What is the grub doing? Is it just loaded into MBR and loading VBRs, or doing more?
- Where in booting chain using grup linux enters protected mode?

I would like to put linux in single partition, and bot it using my own bootloader. Linux can keep its own VBR. How can i do it? I have a linux on HDD, i want to use rest 3 primary partitions (linux is on 4th primary), have myy own MBR and boot linux of my own os from another partition.

- In MBR partition table, is it safe to assume if:
0x08 LBA is 0, wich means LBA field is invalid, as its lowest value can be 1 (sector 1). LBA 0 means sector 1, wich is MBR, partition cant start there.
0x01 CHS bits are all 0, meaning that CHS bits are not supported, so i have to use LBA. CHS 0, means sector 0 and sector 1 is actual 0 so invalid.
Can i assume those? Can chs be all 0 and be valid, or LBA be 0 and still be valid?
Is the CHS addressing limited to 8GB, and is it logical address or physical one? Can i pass CHS directly to int 13h?

I want my mbr work on legacy OS like DOS or windows 9x wich dont know LBA, as well on newest OS wich use LBA. So on old os i use CHS field, will that be ok? Will os use logical CHS, or do some conversions?
Post 13 Mar 2011, 13:16
View user's profile Send private message Reply with quote

Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Just give your boot loader a chain loading functionality. You could install Lilo or Grub to your Linux partition's VBR, and chain load that from your boot loader.

That said, IMO, you're going about it the wrong way. You should keep Grub, the well developed and established boot loader in the MBR, and have it chain load your boot loader from a VBR.
Post 13 Mar 2011, 19:29
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.