Bad partitioning

Hello, everyone! I’ve a question about the Mender A/B partitioning mechanism. I try to make four partitions for a device, using this form:

p1 → boot 
p2 → rootfs A
p3 → rootfs B
p4 → data

I’ve a .wks.in file, which I integrate it in my local.conf file. This is the file:

#1. Boot partition

part /boot 
–source mender-boot 
–ondisk mmcblk2 
–fstype=vfat 
–label boot 
–active 
–align 1024 
–size 24M

#2. RootFS A

part / 
–source mender-rootfs 
–ondisk mmcblk2 
–fstype=ext4 
–label rootfs_a 
–align 1024 
–size 1400M

#3. RootFS B

part / 
–source mender-rootfs 
–ondisk mmcblk2 
–fstype=ext4 
–label rootfs_b 
–align 1024 
–size 1400M

#4. Data partition

part /data 
–source mender-data 
–ondisk mmcblk2 
–fstype=ext4 
–label data 
–align 1024

#Bootloader

bootloader --ptable msdos

The problem is when I boot my device, here are some logs:

[ 2.225414] mmc1: SDHCI controller on 2194000.mmc [2194000.mmc] using ADMA 
[ 2.229865] mmc0: SDHCI controller on 2190000.mmc [2190000.mmc] using ADMA 
[ 2.232364] mmc2: SDHCI controller on 2198000.mmc [2198000.mmc] using ADMA 
[ 2.309093] mmc2: new DDR MMC card at address 0001 
[ 2.314912] mmcblk2: mmc2:0001 M04A11 3.64 GiB 
[ 2.317095] usb 1-1: new high-speed USB device number 2 using ci_hdrc 
[ 2.328324] mmcblk2: p1 p2 
[ 2.332287] mmcblk2boot0: mmc2:0001 M04A11 4.00 MiB 
[ 2.339686] mmcblk2boot1: mmc2:0001 M04A11 4.00 MiB 
[ 2.346689] mmcblk2rpmb: mmc2:0001 M04A11 4.00 MiB, chardev (242:0)


Welcome to Poky (Yocto Project Reference Distro) 5.0.8 (scarthgap)!

[    4.231703] systemd[1]: Initializing machine ID from random generator.
[    4.238675] systemd[1]: Installed transient /etc/machine-id file.
[    4.795962] systemd[1]: /usr/lib/systemd/system/mender-fix-timestamps.service:15: Unknown key 'StartLimitIntervalSec' in section [Service], ignoring.
[    5.293440] systemd[1]: Queued start job for default target Multi-User System.
[    5.378872] systemd[1]: Created slice Slice /system/getty.
[  OK  ] Created slice Slice /system/getty.
[    5.421906] systemd[1]: Created slice Slice /system/modprobe.
[  OK  ] Created slice Slice /system/modprobe.
[    5.459114] systemd[1]: Created slice Slice /system/serial-getty.
[  OK  ] Created slice Slice /system/serial-getty.
[    5.501726] systemd[1]: Created slice Slice /system/systemd-fsck.
[  OK  ] Created slice Slice /system/systemd-fsck.
[    5.539722] systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
[    5.576519] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[    5.616930] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
[    5.656416] systemd[1]: Expecting device /dev/mmcblk0p1...
         Expecting device /dev/mmcblk0p1...
[    5.686186] systemd[1]: Expecting device /dev/mmcblk2p4...
         Expecting device /dev/mmcblk2p4...
[    5.716766] systemd[1]: Reached target Path Units.
[  OK  ] Reached target Path Units.
[    5.746429] systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[    5.786605] systemd[1]: Reached target Slice Units.
[  OK  ] Reached target Slice Units.
[    5.816522] systemd[1]: Reached target Swaps.
[  OK  ] Reached target Swaps.
[    5.846460] systemd[1]: Reached target System Time Set.
[  OK  ] Reached target System Time Set.
[    5.888477] systemd[1]: Listening on RPCbind Server Activation Socket.
[  OK  ] Listening on RPCbind Server Activation Socket.
[    5.926498] systemd[1]: Reached target RPC Port Mapper.
[  OK  ] Reached target RPC Port Mapper.
[    5.967862] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[    6.007274] systemd[1]: Listening on initctl Compatibility Named Pipe.
[  OK  ] Listening on initctl Compatibility Named Pipe.
[    6.064263] systemd[1]: Journal Audit Socket was skipped because of an unmet condition check (ConditionSecurity=audit).
[    6.076469] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[    6.118147] systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
[    6.158865] systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
[    6.197775] systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
[    6.237943] systemd[1]: Listening on User Database Manager Socket.
[  OK  ] Listening on User Database Manager Socket.
[    6.277984] systemd[1]: Huge Pages File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/mm/hugepages).
[    6.376513] systemd[1]: Mounting POSIX Message Queue File System...
         Mounting POSIX Message Queue File System...
[    6.421937] systemd[1]: Mounting Kernel Debug File System...
         Mounting Kernel Debug File System...
[    6.457097] systemd[1]: Kernel Trace File System was skipped because of an unmet condition check (ConditionPathExists=/sys/kernel/tracing).
[    6.483523] systemd[1]: Mounting Temporary Directory /tmp...
         Mounting Temporary Directory /tmp...
[    6.524439] systemd[1]: Starting Create List of Static Device Nodes...
         Starting Create List of Static Device Nodes...
[    6.573565] systemd[1]: Starting Mender service to grow data partition size...
         Starting Mender service to grow data partition size...
[    6.623956] systemd[1]: Starting Load Kernel Module configfs...
         Starting Load Kernel Module configfs...
[    6.664044] systemd[1]: Starting Load Kernel Module drm...
         Starting Load Kernel Module drm...
[    6.704499] systemd[1]: Starting Load Kernel Module fuse...
         Starting Load Kernel Module fuse...
[    6.744983] systemd[1]: Starting RPC Bind...
         Starting RPC Bind...
[    6.783119] systemd[1]: Starting File System Check on Root Device...
         Starting File System Check on Root Device...
[    6.828781] systemd[1]: systemd-journald.service: unit configures an IP firewall, but the local system does not support BPF/cgroup firewalling.
[    6.841987] systemd[1]: systemd-journald.service: (This warning is only shown for the first unit using IP firewalling.)
[    6.860637] systemd[1]: Starting Journal Service...
         Starting Journal Service...
[    6.919217] systemd[1]: Load Kernel Modules was skipped because no trigger condition checks were met.
[    6.937756] systemd[1]: Mounting NFSD configuration filesystem...
         Mounting NFSD configuration filesystem...
[    6.957095] systemd[1]: Starting Generate network units from Kernel command line...
         Starting Generate network units from Kernel command line...
[    6.977173] systemd[1]: Starting Apply Kernel Variables...
         Starting Apply Kernel Variables...
[    7.007293] systemd[1]: Starting Coldplug All udev Devices...
         Starting Coldplug All udev Devices...
[    7.055263] systemd-journald[140]: Collecting audit messages is disabled.
[    7.067058] systemd[1]: Started RPC Bind.
[  OK  ] Started RPC Bind.
[    7.108371] systemd[1]: Mounted POSIX Message Queue File System.
[  OK  ] Mounted POSIX Message Queue File System.
[    7.147235] systemd[1]: Mounted Kernel Debug File System.
[  OK  ] Mounted Kernel Debug File System.
[    7.187106] systemd[1]: Mounted Temporary Directory /tmp.
[  OK  ] Mounted Temporary Directory /tmp.
[    7.228235] systemd[1]: Finished Create List of Static Device Nodes.
[  OK  ] Finished Create List of Static Device Nodes.
[    7.267148] systemd[1]: mender-grow-data.service: Main process exited, code=exited, status=1/FAILURE
[    7.277734] systemd[1]: mender-grow-data.service: Failed with result 'exit-code'.
[    7.286843] systemd[1]: Failed to start Mender service to grow data partition size.
[FAILED] Failed to start Mender service to grow data partition size.
See 'systemctl status mender-grow-data.service' for details.
[    7.356969] systemd[1]: Started Journal Service.
[  OK  ] Started Journal Service.
[  OK  ] Finished Load Kernel Module configfs.
[  OK  ] Finished Load Kernel Module drm.
[  OK  ] Finished Load Kernel Module fuse.
[  OK  ] Finished File System Check on Root Device.
[FAILED] Failed to mount NFSD configuration filesystem.
See 'systemctl status proc-fs-nfsd.mount' for details.
[DEPEND] Dependency failed for NFS Mount Daemon.
[DEPEND] Dependency failed for NFS server and services.
[  OK  ] Finished Generate network units from Kernel command line.
[  OK  ] Finished Apply Kernel Variables.
         Mounting FUSE Control File System...
         Mounting Kernel Configuration File System...
         Starting Remount Root and Kernel File Systems...
         Starting Create Static Device Nodes in /dev gracefully...
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Mounted Kernel Configuration File System.
[    8.068625] EXT4-fs (mmcblk2p2): re-mounted 249d2d43-e9aa-4d65-bdf8-5b6d94ca1a35 r/w. Quota mode: none.
[  OK  ] Finished Create Static Device Nodes in /dev gracefully.
[  OK  ] Finished Remount Root and Kernel File Systems.
         Starting Flush Journal to Persistent Storage...
[    8.290197] systemd-journald[140]: Received client request to flush runtime journal.
         Starting Create System Users...
[  OK  ] Finished Coldplug All udev Devices.
[  OK  ] Finished Flush Journal to Persistent Storage.
         Starting User Database Manager...
[  OK  ] Started User Database Manager.
[  OK  ] Finished Create System Users.
         Starting Create Static Device Nodes in /dev...
[  OK  ] Finished Create Static Device Nodes in /dev.
[  OK  ] Reached target Preparation for Local File Systems.
         Mounting /var/volatile...
         Starting Rule-based Manager for Device Events and Files...
[  OK  ] Mounted /var/volatile.
         Starting Load/Save OS Random Seed...
[  OK  ] Started Rule-based Manager for Device Events and Files.
[    9.609167] fec 2188000.ethernet main: renamed from eth0
[   10.287949] caam-snvs 20cc000.caam-snvs: ipid matched - 0x3e
[   10.293715] caam-snvs 20cc000.caam-snvs: violation handlers armed - non-secure state
[   10.307703] caam 2100000.crypto: Entropy delay = 3200
[   10.325325] caam 2100000.crypto: Instantiated RNG4 SH0
[   10.339744] caam 2100000.crypto: Instantiated RNG4 SH1
[   10.344958] caam 2100000.crypto: device ID = 0x0a16010000000000 (Era 4)
[   10.395007] caam 2100000.crypto: job rings = 2, qi = 0
[  OK  ] Reached target Sound Card.
[  OK  ] Reached target Hardware activated USB gadget.
[   11.697099] caam algorithms registered in /proc/crypto
[   11.702565] caam 2100000.crypto: rng crypto API alg registered prng-caam
[   11.712482] caam 2100000.crypto: registering rng-caam
[   11.718066] random: crng init done
[   11.726596] Device caam-keygen registered
         Starting Virtual Console Setup...
[  OK  ] Finished Load/Save OS Random Seed.
[  OK  ] Finished Virtual Console Setup.
[***   ] (1 of 2) A start job is running for /dev/mmcblk0p1 (9s / 1min 30s)

The device has a watchdog, which doesn’t allow me to enter in emergency mode, because it waits for jobs from /dev/mmcblk0p1 and /dev/mmcblk2p4 and it restarts continuously after the time for waiting expires. I don’t know why it waits for /dev/mmcblk0p1, because I set in local.conf MENDER_STORAGE_DEVICE = “/dev/mmcblk2”. Also, in logs it seems that mender-grow-data.service has crashed and I think it links to /dev/mmcblk2p4 because it is for /data.

In uboot console, the output for mmc list command is:

# mmc list 

FSL_SDHC: 1 
FSL_SDHC: 2 
FSL_SDHC: 0 (eMMC)

I mention that I can’t reach the device console, except the uboot one.