Grub Question

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
gommo

Grub Question

Post by gommo »

How much of my kernel does grub load into memory?? I am working with a grub_image.img file that is 1.44 mb so I can use it with a floppy, but how much of this is loaded into memory? Even using Grub, is it neccessary to load your OS into memory or does grub handle all this??

Currently I've put no thought into this as it is all just working and I have multithreading going etc..

Thanks
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:Grub Question

Post by Solar »

I am not sure I understand your question...?

GRUB is about loading a kernel binary. Your grub_image.img is probably a floppy image - I guess you have it read in by Bochs? In that case, your kernel binary is probably much smaller than that anyway...

It's pretty confusing. It's probably best if you post your GRUB configuration file, and probably your Makefile too so we can figure out what's going on...
Even using Grub, is it neccessary to load your OS into memory or does grub handle all this??
Again, I'm not sure what you mean. GRUB loads your kernel, and optionally, additional modules if you tell it to do so. Beyond that, everything else has to be handled by you (i.e., your kernel).
Every good solution is obvious once you've found it.
gommo

Re:Grub Question

Post by gommo »

I think you've answered my question then. If grub loads the kernel from my image file then I'm assuming, no matter how large the kernel is it will be loaded into memory at the starting location I assign (i.e. 0x100000).
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:Grub Question

Post by Pype.Clicker »

GRUB will boot whatever bytes it will find in the kernel= file on the root= device. It will also load whatever module= file you tell him. It's unlikely to read more than 1.44MB on a floppy disk, of course.
Post Reply