Bug 7790 - Invalid ext4 image generated by Buildroot
Summary: Invalid ext4 image generated by Buildroot
Status: RESOLVED INVALID
Alias: None
Product: buildroot
Classification: Unclassified
Component: Other (show other bugs)
Version: 2014.11
Hardware: PC Linux
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-10 21:27 UTC by Thomas Petazzoni
Modified: 2015-01-10 21:34 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Petazzoni 2015-01-10 21:27:27 UTC
Using:

BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_EABIHF=y
BR2_ARM_ENABLE_NEON=y
BR2_ARM_FPU_VFPV3D16=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.1"
BR2_LINUX_KERNEL_DEFCONFIG="vexpress"
BR2_LINUX_KERNEL_ZIMAGE=y
BR2_PACKAGE_NFS_UTILS=y
BR2_PACKAGE_RPCBIND=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
# BR2_TARGET_ROOTFS_TAR is not set

I get:

EXT3-fs (mmcblk0): error: couldn't mount because of unsupported optional features (40)
EXT2-fs (mmcblk0): error: couldn't mount because of unsupported optional features (40)
EXT4-fs (mmcblk0): bad geometry: block count 6593 exceeds size of device (6400 blocks)
List of all partitions:
1f00          131072 mtdblock0  (driver?)
b300            6400 mmcblk0  driver: mmcblk
No filesystem could mount root, tried:  ext3 ext2 ext4 cramfs squashfs vfat

When using a 3.18 kernel, running under Qemu. I'm attaching the filesystem image.
Comment 1 Thomas Petazzoni 2015-01-10 21:34:17 UTC
Turned out to be a Qemu emulation issue: my version of Qemu does not align up the size of the block device emulated, but aligns it down, compared to the size of the filesystem image being passed.

For example, when forcing the size of the filesystem image to 8192 blocks, everything is fine. When using 8193 blocks, mounting fails with:

bad geometry: block count 8193 exceeds size of device (8192 blocks).

Closing the bug.