How to load variable size stage2 bootloader ?
Posted: Tue Jan 01, 2013 11:50 am
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.
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.