I have been thinking of how to "practically" load a hdd driver if their is no hdd driver to load the hdd driver
so I came up with a bit of an idea, what if the bootsector loaded a media driver and if need be, a filesystem driver and then load the kernel.
this would make an OS possible to boot from any type of media(and with proper emulation, even from read-only media with write emulation) most importantly, you wouldn't have to make any modifications to the actual OS...
so now..is their any OS(major or hobby) that does this kinda thing?
does any OS do this?
umm... Isn't that what grub modules and initrds are supposed to do? load stuff in for the os to be able to bootstrap itself. My kernel isn't fully set up after being called by grub. It firsts reads the grub modules(which contains my real kernel) and loads that to 3gb. Then it reads the drivers needed for the kernel to boot. It then creates page tables for each driver(my os is a microkernel-based one) and gives control to the kernel telling it all the things that happened.
I think the kernel image should contain all necessary drivers/modules to at least start loading all other drivers/modules. This basicly means error report module (and output driver), memory manager module (if you will relocate loaded modules) and a media driver (source of other modules, would be interesting if this was a network driver ). Then again this was said above...
JVFF
JVFF
Thath's how I do it too. Tell GRUB that your second-stage boot loader is actually your kernel, then, before launching my kernel proper I set up my physical RAM allocation bitmap, VESA (to be done!), paging, a GDT (as you cannot rely on a multiboot segment values), stack etc...iammisc wrote:umm... Isn't that what grub modules and initrds are supposed to do? load stuff in for the os to be able to bootstrap itself. My kernel isn't fully set up after being called by grub. It firsts reads the grub modules(which contains my real kernel) and loads that to 3gb. Then it reads the drivers needed for the kernel to boot. It then creates page tables for each driver(my os is a microkernel-based one) and gives control to the kernel telling it all the things that happened.
When I get around to implementing my disk drivers, I will get GRUB to load something like 'io.sys' which could be different depending on the medium you are using.
Cheers,
Adam