Bin, Boot

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Programmer

Bin, Boot

Post by Programmer »

Hello all,
I've some questions about my fisrt OS.

Do I'll put the whole system in the Bin file or can I put the in other formats (like exe,etc...) ?

How to tell the boot sector in the floppy disk to start the system from a certin file on the hard or disk ?

Thank you...
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Bin, Boot

Post by Pype.Clicker »

Programmer wrote: Hello all,
I've some questions about my fisrt OS.

Do I'll put the whole system in the Bin file or can I put the in other formats (like exe,etc...) ?
It roughly depends on what your bootloader understand. With a 'homemade' bootloader, you're likely to pack everything by hand in one big BIN. With Clicker's bootloader (SOS), you have one almost-bin for the kernel and one Small File System image (another big file) with the rest. With grub, you can (afaik) have separate modules loaded by the bootloader coming from different files/list of sectors/whatever, being decompressed on the fly, with ELF relocation/resolutions(?) resolved etc.
How to tell the boot sector in the floppy disk to start the system from a certin file on the hard or disk ?
Once again, it depends on your bootloader. In most solutions (homemade/lilo, etc.) you have to provide a list of sectors to be loaded (which tends to require to locate the kernel in some kind of "reserved" area contiguously, and pray ...)

With Grub, it requires you to type

Code: Select all

root (hd0,0)
kernel /boot/mykernel
boot
if your filesystem is understood (reiser, fat, ext, ntfs ?) by grub.

Yeah, i know, i'm quoting TimBot again ...
Post Reply