jump to navigation

what a weird problem… March 19, 2007

Posted by TSAI HONG-BIN in Linux.
trackback

Have you ever seen this error message before?

“EXT2-fs: blocksize too small for device …”

It’s because while checking EXT2 file system, the default block size of EXT2 (that is 1024) fails the check

size "smaller than" bdev_hardsect_size(bdev)

at line 72 in file fs/block_dev.c

The check fails because this kernel config

CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096

It’s because your initrd mostly is in CPIO format so that it will not go to the blocksize check. However, if you create a hand-made root filesystem and config it as an initial ramdisk, then the problem shows up.

So either you change your root filesystem into CPIO archive, or recompile the kernel and replace that config as

CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024

and your problem shall be solved.

Plus, if you need the path of menuconfig, go to Device Drivers –> Block devices –> Default ramdisk block size

Press enter and assign a number as you desired.

[update] in fact, there is another easier way to fix this up. Just give a ramdisk_blocksize=1024 in kernel parameter at [bootloader].conf.

Advertisements

Comments»

No comments yet — be the first.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: