http://oscartheduck.wordpress.com/2008/01/15/ext2-fs-blocksize-too-small-ramdisk/

EXT2-fs: blocksize too small ramdisk

Filed under: GNU/linux, ext2, how to, linux, ramdisk — oscartheduck @ 3:08 pm

I received this error creating ramdisks, and it was somewhat annoying finding a solution, though the error is perfectly clear.

It turns out that I had created my ramdisk with an ext2 file system and a blocksize of 1024, the default size. However, the kernel has built into it that it wants a size of 4096 for the block.

I couldn’t quite believe that it needed blocks that large, but the kernel guys know better than I do what to do. At first, I had tried a mere 2048 for the blocksize, but that didn’t cut it. Finding out that it wanted something that large was a shock, though.

Especially as the amount of RAM I have in my client is 256 meg. I have a 20 meg or so ramdisk image I am pushing down. Using a blocksize of 4096 resulted in a whopping 300 meg image. Too much for the memory.

Fortunately, you can pass the following as an option to the kernel:

ramdisk_blocksize=1024

or indeed any abitrary ramdisk blocksize, as long as it matches your real blocksize. If you’re using pxe, as I am, put it in your APPEND line. If you’re using grub to do this somehow, then add it in the boot line, I assume.


Reply via email to