Hello All,
I just stated to write bootloader from scratch and I am completely beginner in writing bootloader.
I have implemented a stage1 bootloader which loads stage2 in memory.
But I am stuck at a point where, if my stage2 bootloader varies in size, then I have to change no of sectors to read in stage1.
My question is, How can I determine no of sectors to read to load complete stage2 in memory programmatically?
I am using an unformated floppy image for booting and bochs for emulating.
Is I have to use FAT/EXT formated disk image?
How does grub loads stage2 from unformated floppy image?
Here is my stage1.asm.
Any help will be appreciated.
Thank You.
How to load variable size stage2 bootloader ?
-
- Posts: 5
- Joined: Fri Sep 23, 2011 3:15 pm
How to load variable size stage2 bootloader ?
- Attachments
-
- stage1.asm
- (1.63 KiB) Downloaded 38 times
Re: How to load variable size stage2 bootloader ?
If you will use formatted image you can use file size field. It's more right way.dnyaneshgate wrote:My question is, How can I determine no of sectors to read to load complete stage2 in memory programmatically?
I am using an unformated floppy image for booting and bochs for emulating.
GRUB holds all required info in boot sector and in first sector of stage2.How does grub loads stage2 from unformated floppy image?
If you have seen bad English in my words, tell me what's wrong, please.
Re: How to load variable size stage2 bootloader ?
In my Boot Tools I described how you can build in one click the unformatted Bochs bootable image, where the bootloader reads exactly the necessary number of sectors. See the "direct.bin" description.dnyaneshgate wrote:My question is, How can I determine no of sectors to read to load complete stage2 in memory programmatically?
I am using an unformated floppy image for booting and bochs for emulating.