cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP1 Starter Package Boot Failure: "EXT4-fs error"

Richardn
Associate

I followed the instructions here with a STM32MP157F-DK2 board till before step 8, with a serial console to the board set up. However, instead of booting into "root" as described, from the console output my board enters "emergency mode", and the last outputs are related to "EXT4-fs error".

I then tried the guide here, generated the image specified by the "FlashLayout_sdcard_stm32mp157f-dk2-trusted.tsv" (I changed that "c" to "f" myself) provided in the starter package and loaded the image into the SD card from my laptop to the SD card. The board still failed to boot from the SD card with the same outputs.

I will put the last error prints here and attach the full output since reset:

[   14.704163] EXT4-fs error: 2 callbacks suppressed
[   14.724165] EXT4-fs error (device mmcblk0p10): ext4_readdir:258: inode #6601: block 86816: comm systemd-sysctl: path /usr/lib/sysctl.d: bad entry in directory: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, size=4096 fake=0
[  OK  ] Created slice Slice /system/systemd-backlight.
[  OK  ] Reached target Bluetooth Support.
[  OK  ] Reached target Sound Card.
[  OK  ] Listening on Load/Save RF …itch Status /dev/rfkill Watch.
         Starting Load/Save Screen …of backlight:5a000000.dsi.[   15.353993] EXT4-fs error (device mmcblk0p10): ext4_find_dest_de:2087: inode #15755: block 119737: comm (acklight): bad entry in directory: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, size=4096 fake=0
0...
[   15.413900] EXT4-fs error (device mmcblk0p10): ext4_find_dest_de:2087: inode #15755: block 119737: comm systemd: bad entry in directory: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, size=4096 fake=0
[FAILED] Failed to start Network Name Resolution.
See 'systemctl status systemd-resolved.service' for details.
[  OK  ] Reached target Network.
[  OK  ] Reached target Host and Network Name Lookups.
[  OK  ] Stopped Network Time Synchronization.
[   15.593233] EXT4-fs error (device mmcblk0p10): ext4_find_dest_de:2087: inode #15755: block 119737: comm systemd: bad entry in directory: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, size=4096 fake=0
[FAILED] Failed to start Network Time Synchronization.
See 'systemctl status systemd-timesyncd.service' for details.
[FAILED] Failed to start Load/Save …s of backlight:5a000000.dsi.0.
See 'systemctl status systemd-backlight…ht:5a000000.dsi.0.service' for details.
[   15.768038] EXT4-fs error (device mmcblk0p10): ext4_find_dest_de:2087: inode #15755: block 119737: comm systemd: bad entry in directory: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, size=4096 fake=0
[   15.810889] EXT4-fs error (device mmcblk0p10): ext4_find_dest_de:2087: inode #15755: block 119737: comm (d-rfkill): bad entry in directory: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, size=4096 fake=0
[   15.830267] EXT4-fs error (device mmcblk0p10): ext4_find_dest_de:2087: inode #15755: block 119737: comm systemd: bad entry in directory: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, size=4096 fake=0
[   15.900932] EXT4-fs error (device mmcblk0p10): ext4_find_dest_de:2087: inode #15755: block 119737: comm systemd: bad entry in directory: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, size=4096 fake=0
[   15.952926] EXT4-fs error (device mmcblk0p10): ext4_find_dest_de:2087: inode #15755: block 119737: comm (d-rfkill): bad entry in directory: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, size=4096 fake=0
[   15.972394] EXT4-fs error (device mmcblk0p10): ext4_find_dest_de:2087: inode #15755: block 119737: comm systemd: bad entry in directory: rec_len is smaller than minimal - offset=0, inode=0, rec_len=0, size=4096 fake=0
[   16.030482] using random self ethernet address
[   16.035467] using random host ethernet address
[   16.143232] usb0: HOST MAC c0:31:24:4f:e4:d2
[   16.146323] usb0: MAC de:bc:ca:40:f0:a0
[   16.150199] dwc2 49000000.usb-otg: bound driver configfs-gadget
You are in emergency mode. After logging in, type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, "systemctl default" or "exit"
to boot into default mode.
Press Enter for maintenance
(or press Control-D to continue):

As additional info, the board booted successfully from the original SD card content in the SD card shipped with the original packaging of the hardware.

My question is then: What is happening? How to fix the problem, or is there actually a problem? I am new to this chip and device, and I dare not proceed if I cannot get even the starter package running.

--- Update ---

The error messages indicated that there are multiple corrupted nodes in partition #10. I (on my laptop) force fixed the partition by "fsck -cvf /dev/sdb10" and now the board actually logged into root. However judging from the fact that there were a lot of services failed to start and there is nothing on the screen, the system is still faulty, possibly because some required files were with the corrupted nodes and now they were purged.

--- Update ---

The board boots fine with Starter Package v4.0.0, so it is very likely that the latest images you provided are faulty.

1 REPLY 1
PatrickF
ST Employee

Hi @Richardn​ 

Have you tried a different SD-Card ?

I can confirm that stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23 image for STM32MP157F-DK2 is working fine on my side after flashing using CubeProgrammer as described in https://wiki.st.com/stm32mpu/wiki/STM32MP15_Discovery_kits_-_Starter_Package#Image_flashing.

Regards,

Patrick

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.