oscartheduckin’ around

January 15, 2008

EXT2-fs: blocksize too small ramdisk

Filed under: ext2, GNU/linux, 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:


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.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: