Lagor wrote:
If I make the kernel large enough, GRUB2 won't change the loading address, it just loads it at 0 and run out of memory.
Yet another reason why not to use Grub
Your assumption (if the kernel doesn't fit, put it into the first big enough free block) makes a lot more sense imho.
Lagor wrote:
So I guess my question now is: can I always assume that starting from 1MB I will have a fairly large chunk of mem where to load my kernel?
Most kernels are just loaded to 1M. Considering your machine (or vm) has more memory than your kernel plus 1M, it is a safe assumption you'll have a large enough chunk of free memory there. However if your kernel is guaranteed to be smaller than 640k (a microkernel for example), then address 0 is a better choice imho.
Cheers,
bzt