[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Maximum initrd.gz image size for netbooting...



Hi-
Not sure if this should be an offline discussion or not... In response to Mr. Hess' question about netboot image size limits (to which I had no idea of the answer) I e-mailed HPA, the syslinux guy. He responded (posted below) that the only restriction is that the uncompressed + compressed image must fit into system memory. That said, we could guesstimate what the maximum image size must be for any given system memory space, approximating the formula:

k + z + u(z) < M

where k is the size of the kernel, z is the size of the compressed image, u(z) is the size of the uncompressed image, and M is the system memory.

Taking as an example the compression ratio of the current netboot-initrd image found thusly:

erik@linuxbox:/var/ftpd/temp$ gunzip -l ../netboot-initrd.gz
         compressed        uncompressed  ratio uncompressed_name
            2153194             7462912  71.1% ../netboot-initrd

	Or a ratio of about 3.5 to 1 (2.1 * 3.5 = )

	If we were to guess that this estimate will hold, the formula becomes:

k + (4.5 * z) < M

The kernel is presently uncompressed (I think???) and weighs in at 730K. By these numbers, systems with the following memory could handle the following initrd.gz sizes:

Round down (M - .800 / 4.5 )

System RAM	: Max initrd size
16 MB		: 3 MB
32 MB		: 6.5 MB
64 MB		: 14 MB

	Does this make sense or am I way off somewhere?

Erik
-------- Original Message --------
Subject: Re: [syslinux] Pxelinux Image size restriction?
Date: Wed, 04 Feb 2004 12:08:30 -0800
From: H. Peter Anvin <hpa@zytor.com>


The only limit is that if the image is compressed, the compressed *plus*
the uncompressed image needs to fit in system RAM.

That being said, I have successfully downloaded images over 512 MB in size.

	-hpa

Erik Dykema wrote:
> Hi-
>     Is there any size restriction (maximum?) on the size of kernels or
> initrd.gz images that pxelinux can fetch over the network and load?
>     We are currently loading a 730k kernel, and a 2.1 megabyte initrd.gz
> image, and everything is working fine.  It would be nice, however, to
> load larger images that have more stuff on them.  Is there any inherent
> maximum (other than system ram) to how large of an image we could load?
>     For example, we could compile more drivers into the initrd.gz image,
> and it would become 6 megabytes.  Is this too large for pxelinux, the
> PXE protocol, or typical hardware to handle?
>


Joey Hess wrote:
Erik Dykema wrote:

OK, I think i get it, thanks! I was attempting to install the 'testing' distribution, that must be why it didn't work.
	So the 'fix' for this is to get the 2.4.24 kernel into testing.
	OR, to build a 'testing' version of d-i.


Yes, I may see about getting the 2.4.24 kernel into testing eventually.
However, if you want to test unstable d-i -- and there's no reason to
use the unstable netboot images if you don't -- then you should still
pick unstable.


As a side note, I have a question regarding why the netboot images need not contain all the necessary drivers? At their current size (2.1 megs) they are too small to fit onto a floppy disk, so they are mostly used by (perhaps here is where I am wrong?) those doing PXE boots (like me)? On the sizes that we are working with ( 1 - 10 megabytes ) I don't think it would necessarily hurt to include more drivers / modules in the netboot image.


I think there are some netboot image size limits, though I really don't
know.




Reply to: