Page 1 of 1

Grub: Max size of kernel

Posted: Wed Feb 24, 2010 5:05 am
by sebihepp
Hello,

what is the maximum size a kernel can have for loading with grub? On Floppy, Harddisk (FAT32) and CDRom?

Sebihepp

Re: Grub: Max size of kernel

Posted: Wed Feb 24, 2010 5:23 am
by Brendan
Hi,
sebihepp wrote:what is the maximum size a kernel can have for loading with grub? On Floppy, Harddisk (FAT32) and CDRom?
I doubt there is a maximum size. It would depend on the size of the disk (e.g. you can't put a 5 MiB kernel on a 1440 KiB floppy) and the amount of usable RAM in the computer; where "usable RAM" is contiguous RAM starting at 0x000100000 - anywhere from 1 MiB (if it's a very old computer with 2 MiB of RAM installed) to about 3583 MiB (if it's a computer with 3.5 GiB or more RAM and a very small "PCI hole").

Of course it's fairly common for beginners to have problems once their kernel reaches a certain size. This is because the multi-boot header needs to be within the first 8 KiB of the kernel; and beginners tend to forget to put the multi-boot header in it's own section to make sure it stays at the start of kernel (and doesn't shift out of the first 8 KiB as the kernel gets larger)... ;)


Cheers,

Brendan

Re: Grub: Max size of kernel

Posted: Wed Feb 24, 2010 7:55 am
by sebihepp
Thanks, then I dont't need to be worry about the size of the kernel. =)

Re: Grub: Max size of kernel

Posted: Wed Feb 24, 2010 8:58 am
by Merdini
It'll just take longer time to load you kernel if it's really big.

Re: Grub: Max size of kernel

Posted: Wed Feb 24, 2010 2:16 pm
by Selenic
WRT kernel sizes, to give a comparison: The Linux kernel can be anywhere from a bit under 1MB up to a few meg, but it's compressed (via either gzip, bzip2 or LZMA, I believe, though bz2 is discouraged (relatively slow) and LZMA is relatively new)

It really depends what the minimum you want to support is - do you want to support old computers (potentially down to 386es) or only relatively new ones with a lot of memory and a fast processor?