12

I try to run Android from SD-card. This card is prepared. There are partitions: boot(FAT32), rootfs(ext4), system(ext4), cache(ext4) and usedata(ext4). Boot partitions has files to run u-boot: MLO, u-boot.bin and uImage. To run it I use commands

mmcinit 0
fatload mmc 0 0x80000000 uImage
setenv bootargs 'console=ttyO2,115200n8 mem=456M@0x80000000 mem=512M@0xA0000000 init=/init vram=10M omapfb.vram=0:4M androidboot.console=ttyO2 root=/dev/mmcblk1p2 rw rootwait rootfstype=ext4'
bootm 0x80000000

Than I see how Linux starts. But after few seconds on step of loading rootfs I see an error message

[    4.015655] EXT4-fs (mmcblk1p2): couldn't mount RDWR because of unsupported optional features (400)
[    4.036499] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    4.079986] List of all partitions:
[    4.083801] b300        31162368 mmcblk0  driver: mmcblk
[    4.089660]   b301             128 mmcblk0p1 f9f21f00-a8d4-5f0e-9746-594869aec34e
[    4.097839]   b302             256 mmcblk0p2 f9f21f01-a8d4-5f0e-9746-594869aec34e
[    4.106018]   b303             128 mmcblk0p3 f9f21f02-a8d4-5f0e-9746-594869aec34e
[    4.114288]   b304           16384 mmcblk0p4 f9f21f03-a8d4-5f0e-9746-594869aec34e
[    4.122436]   b305              16 mmcblk0p5 f9f21f04-a8d4-5f0e-9746-594869aec34e
[    4.130676]   b306            8192 mmcblk0p6 f9f21f05-a8d4-5f0e-9746-594869aec34e
[    4.138916]   b307            8192 mmcblk0p7 f9f21f06-a8d4-5f0e-9746-594869aec34e
[    4.147094]   103:00000     524288 mmcblk0p8 f9f21f07-a8d4-5f0e-9746-594869aec34e
[    4.155334]   103:00001     262144 mmcblk0p9 f9f21f08-a8d4-5f0e-9746-594869aec34e
[    4.163574]   103:00002   30342128 mmcblk0p10 f9f21f09-a8d4-5f0e-9746-594869aec34e
[    4.171874] b310            2048 mmcblk0boot1  (driver?)
[    4.177734] b308            2048 mmcblk0boot0  (driver?)
[    4.183593] b318        15179776 mmcblk1  driver: mmcblk
[    4.189453]   b319          102400 mmcblk1p1 00000000-0000-0000-0000-000000000000
[    4.197692]   b31a           10240 mmcblk1p2 00000000-0000-0000-0000-000000000000
[    4.205932]   b31b               1 mmcblk1p3 00000000-0000-0000-0000-000000000000
[    4.214141]   b31d          262144 mmcblk1p5 00000000-0000-0000-0000-000000000000
[    4.222351]   b31e        13228032 mmcblk1p6 00000000-0000-0000-0000-000000000000
[    4.230682]   b31f         1572864 mmcblk1p7 00000000-0000-0000-0000-000000000000
[    4.238891] No filesystem could mount root, tried:  ext4
[    4.244812] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,26)
[    4.254089] CPU1: stopping

I don't know why it happens. How can I solve this problem?

2 Answers 2

21

The ext4 feature (400) is the new metadata_csum feature. If this feature is enabled and old tools are used to mount the filesystem they will only be able to mount read-only.

https://ext4.wiki.kernel.org/index.php/Ext4_Metadata_Checksums

To create a ext4 filesystem without this feature:

sudo mke2fs /dev/sdb1 -O ^metadata_csum

Or turn it off on an already created filesystem:

sudo tune2fs -O ^metadata_csum /dev/sdb1
3
  • 2
    git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/tree/lib/ext2fs/… #define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM 0x0400
    – jjcf89
    Jul 12, 2018 at 14:59
  • 1
    It is a shame that they made the new ext4 incompatible with the older one. As a comparison, FAT32 can be used on Windows 10, as well as on DOS. Couldn't older mount tools just ignore the new features?
    – Nuclear
    Apr 10, 2019 at 20:07
  • You would think so.
    – jjcf89
    Apr 11, 2019 at 21:57
7

The error "EXT4-fs : couldn't mount RDWR because of unsupported optional features (400)" is due to different versions between the partition formatter (mkfs.ext4) and the mounter.

You have two options:

a) Either you have to upgrade the mounter program using a newer distro inside the SD-card.

b) or you have to backup the files, reformat the SD-card with the same distro (the same ext4 versions) you are doing the mounting, and after the reformat copy the files again to the SD-card.

In the second option, care must be taken with the original ext4 options the formatter has put, trying to consider the same options at reformat. Note also that a reformat of partitions doesn't need a repartition of the whole device, so the boot MBR would not be altered.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.