Failed to start Resin state partition mount service


#1

I’m making a custom image from scratch. I’ve added BSP and minimal configuration to it. Once image start on target board, I get this error:

[  OK  ] Started udev Wait for Complete Device Initialization.
         Starting Initialize system clock from RTC...
[  OK  ] Started Initialize system clock from RTC.
         Starting Initialize system clock from build timestamp...
[  OK  ] Started Initialize system clock from build timestamp.
[FAILED] Failed to start Resin state partition mount service.
See 'systemctl status resin-state.service' for details.
[DEPEND] Dependency failed for Bind mount for /var/lib/NetworkManager.
[DEPEND] Dependency failed for Bind mount for /etc/resin-supervisor.
[DEPEND] Dependency failed for Resin supervisor.
[DEPEND] Dependency failed for Bind mount for /etc/docker.
[DEPEND] Dependency failed for Balena Application Container Engine.
[DEPEND] Dependency failed for Bind mount for /var/lib/chrony.
[DEPEND] Dependency failed for Bind mount for /home/root/.docker.
[DEPEND] Dependency failed for Bind mount for /home/root/.rnd.
[DEPEND] Dependency failed for Bind mount for /etc/openvpn.
[DEPEND] Dependency failed for OpenVPN.
[DEPEND] Dependency failed for Bind mount for /etc/hostname.
[DEPEND] Dependency failed for Resin Hostname Configuration.
[DEPEND] Dependency failed for Avahi mDNS/DNS-SD Stack.
[DEPEND] Dependency failed for Bind mount for /etc/dropbear.
[DEPEND] Dependency failed for Bind mount for /home/root/.ssh.
[DEPEND] Dependency failed for Bind mount for /var/lib/systemd.
[DEPEND] Dependency failed for Resin reset OS state.
[DEPEND] Dependency failed for Bind mount fo��…NetworkManager/system-connections.
[DEPEND] Dependency failed for Resin network configure service.
[FAILED] Failed to start Resin boot partition mount service.
See 'systemctl status resin-boot.service' for details.
[DEPEND] Dependency failed for Show Plymouth Boot Screen.
[DEPEND] Dependency failed for OS configuration update service.
[DEPEND] Dependency failed for Resin device uuid.
[DEPEND] Dependency failed for Prepare OpenVPN.
[DEPEND] Dependency failed for Resin proxy configuration service.
[DEPEND] Dependency failed for redsocks transparent proxy redirector.
[DEPEND] Dependency failed for OS configuration device key service.
[DEPEND] Dependency failed for Config.json path watch.
[FAILED] Failed to start Resin active root partition mount service.
See 'systemctl status mnt-sysroot-active.service' for details.
[DEPEND] Dependency failed for Balena Application Container Engine (host).
[FAILED] Failed to start Resin inactive root partition mount service.
See 'systemctl status mnt-sysroot-inactive.service' for details.
         Starting Expand resin-data partition...
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Reached target Paths.
         Starting Load/Save Random Seed...
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Reached target System Initialization.
...
[  OK  ] Started Network Manager.
[  OK  ] Reached target Network.
         Starting Resin init service...
         Starting DNS forwarder and DHCP server...
         Starting Hostname Service...
[  OK  ] Started Resin init service.
[FAILED] Failed to start DNS forwarder and DHCP server.
See 'systemctl status dnsmasq.service' for details.
[  OK  ] Started Hostname Service.
[  OK  ] Started Authorization Manager.
         Starting Network Manager Script Dispatcher Service...
[  OK  ] Started Network Manager Script Dispatcher Service.
[  OK  ] Started Modem Manager.

The outputs from systemctl status are:

systemctl status resin-state.service
��● resin-state.service - Resin state partition mount service
   Loaded: loaded (/lib/systemd/system/resin-state.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-08-24 14:52:47 UTC; 21min ago
  Process: 105 ExecStart=/usr/bin/resin-partition-mounter --mount resin-state (code=exited, status=1/FAILURE)
 Main PID: 105 (code=exited, status=1/FAILURE)

Aug 24 14:52:47 localhost resin-partition-mounter[105]: ERROR: Timeout while waiting for filesystem label to appear.
Aug 24 14:52:47 localhost systemd[1]: resin-state.service: Main process exited, code=exited, status=1/FAILURE
Aug 24 14:52:47 localhost systemd[1]: Failed to start Resin state partition mount service.
Aug 24 14:52:48 localhost systemd[1]: resin-state.service: Unit entered failed state.
Aug 24 14:52:48 localhost systemd[1]: resin-state.service: Failed with result 'exit-code'.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

systemctl status resin-boot.service
��● resin-boot.service - Resin boot partition mount service
   Loaded: loaded (/lib/systemd/system/resin-boot.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-08-24 14:52:48 UTC; 27min ago
  Process: 107 ExecStart=/usr/bin/resin-partition-mounter --mount resin-boot (code=exited, status=1/FAILURE)
 Main PID: 107 (code=exited, status=1/FAILURE)

Aug 24 14:52:47 localhost resin-partition-mounter[107]: ERROR: Timeout while waiting for filesystem label to appear.
Aug 24 14:52:48 localhost systemd[1]: resin-boot.service: Main process exited, code=exited, status=1/FAILURE
Aug 24 14:52:48 localhost systemd[1]: Failed to start Resin boot partition mount service.
Aug 24 14:52:48 localhost systemd[1]: resin-boot.service: Unit entered failed state.
Aug 24 14:52:48 localhost systemd[1]: resin-boot.service: Failed with result 'exit-code'.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

systemctl status mnt-sysroot-active.service
��● mnt-sysroot-active.service - Resin active root partition mount service
   Loaded: loaded (/lib/systemd/system/mnt-sysroot-active.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-08-24 14:52:48 UTC; 28min ago
  Process: 109 ExecStart=/usr/bin/resin-partition-mounter --sysroot --mount active (code=exited, status=1/FAILURE)
 Main PID: 109 (code=exited, status=1/FAILURE)

Aug 24 14:52:47 localhost resin-partition-mounter[109]: ERROR: Timeout while waiting for filesystem label to appear.
Aug 24 14:52:48 localhost systemd[1]: mnt-sysroot-active.service: Main process exited, code=exited, status=1/FAILURE
Aug 24 14:52:48 localhost systemd[1]: Failed to start Resin active root partition mount service.
Aug 24 14:52:48 localhost systemd[1]: mnt-sysroot-active.service: Unit entered failed state.
Aug 24 14:52:48 localhost systemd[1]: mnt-sysroot-active.service: Failed with result 'exit-code'.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

systemctl status mnt-sysroot-inactive.service
��● mnt-sysroot-inactive.service - Resin inactive root partition mount service
   Loaded: loaded (/lib/systemd/system/mnt-sysroot-inactive.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2018-08-24 14:52:48 UTC; 28min ago
  Process: 110 ExecStart=/usr/bin/resin-partition-mounter --sysroot --mount inactive (code=exited, status=1/FAILURE)
 Main PID: 110 (code=exited, status=1/FAILURE)

Aug 24 14:52:47 localhost resin-partition-mounter[110]: ERROR: Timeout while waiting for filesystem label to appear.
Aug 24 14:52:48 localhost systemd[1]: mnt-sysroot-inactive.service: Main process exited, code=exited, status=1/FAILURE
Aug 24 14:52:48 localhost systemd[1]: Failed to start Resin inactive root partition mount service.
Aug 24 14:52:48 localhost systemd[1]: mnt-sysroot-inactive.service: Unit entered failed state.
Aug 24 14:52:48 localhost systemd[1]: mnt-sysroot-inactive.service: Failed with result 'exit-code'.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

systemctl status dnsmasq.service
Warning: dnsmasq.service changed on disk. Run 'systemctl daemon-reload' to reload units.
��● dnsmasq.service - DNS forwarder and DHCP server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/dnsmasq.service.d
           ��└��─dnsmasq.conf
   Active: failed (Result: exit-code) since Fri 2018-08-24 15:13:42 UTC; 12min ago
  Process: 400 ExecStart=/usr/bin/dnsmasq -x /run/dnsmasq.pid -a 127.0.0.2,10.114.102.1 -7 /etc/dnsmasq.d/ -r /etc/resolv.dnsmasq -z --
  Process: 393 ExecStartPre=/usr/bin/dnsmasq --test (code=exited, status=0/SUCCESS)

Aug 24 15:13:42 localhost systemd[1]: Starting DNS forwarder and DHCP server...
Aug 24 15:13:42 localhost dnsmasq[393]: dnsmasq: syntax check OK.
Aug 24 15:13:42 localhost dnsmasq[400]: dnsmasq: failed to create listening socket for 10.114.102.1: Cannot assign requested address
Aug 24 15:13:42 localhost dnsmasq[400]: failed to create listening socket for 10.114.102.1: Cannot assign requested address
Aug 24 15:13:42 localhost dnsmasq[400]: FAILED to start up
Aug 24 15:13:42 localhost systemd[1]: dnsmasq.service: Control process exited, code=exited status=2
Aug 24 15:13:42 localhost systemd[1]: Failed to start DNS forwarder and DHCP server.
Aug 24 15:13:42 localhost systemd[1]: dnsmasq.service: Unit entered failed state.
Aug 24 15:13:42 localhost systemd[1]: dnsmasq.service: Failed with result 'exit-code'.

Any ideas in what this could be causing this issues ?


#4

I was missing additional partitions and it’s labels. Following https://docs.resin.io/reference/OS/overview/2.x/#image-partition-layout. My board needs to boot from GPT, so I made this layout

resin-boot, ext4, 64 MB, legacy_boot flag
resin-rootA, ext4, 312 MB
resin-rootB, ext4, 312 MB
resin-state, ext4, 20 MB
resin-data, ext4, 1 GB

And fails during boot came down to 1, but it’s not allowing balena service to work:

Welcome to Resin OS !

[    4.316640] systemd[1]: No hostname configured.
[    4.320892] systemd[1]: Set hostname to <localhost>.
[    4.379107] systemd[1]: Hardware watchdog 'STM32 Independent Watchdog', version 0
[    4.429073] systemd[1]: Set hardware watchdog to 10s.
[    5.266024] random: systemd: uninitialized urandom read (16 bytes read)
[    5.274307] systemd[1]: Created slice System Slice.
[  OK  ] Created slice System Slice.
[    5.282380] random: systemd: uninitialized urandom read (16 bytes read)
[    5.288977] systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
[    5.298366] random: systemd: uninitialized urandom read (16 bytes read)
[    5.309316] systemd[1]: Mounting POSIX Message Queue File System...
         Mounting POSIX Message Queue File System...
[    5.319667] systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
[  OK  ] Created slice system-getty.slice.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
         Mounting Kernel Debug File System...
[  OK  ] Created slice system-resin\x2dinfo.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Reached target Remote File Systems.
[  OK  ] Reached target Swap.
         Mounting Temporary Directory (/tmp)...
[  OK  ] Listening on Journal Socket.
         Starting Setup Virtual Console...
         Starting Journal Service...
         Starting Resin active root partition mount service...
         Starting Remount Root and Kernel File Systems...
         Starting Resin boot partition mount service...
         Starting Resin inactive root partition mount service...
[  OK  ] Created slice User and Session Slice.
[  OK  ] Reached target Slices.
         Starting Resin state partition mount service...
         Starting Load Kernel Modules...
[  OK  ] Listening on udev Control Socket.
[  OK  ] Mounted Kernel Debug File System.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted Temporary Directory (/tmp).
[  OK  ] Started Setup Virtual Console.
[    5.952312] Goodix-TS 0-005d: i2c test failed attempt 1: -6
[    5.989276] Goodix-TS 0-005d: i2c test failed attempt 2: -6
[    6.029093] Goodix-TS 0-005d: I2C communication failure: -6
[  OK  ] Started Load Kernel Modules.
         Mounting Kernel Configuration File System...
         Starting Apply Kernel Variables...
         Mounting FUSE Control File System...
[  OK  ] Mounted Kernel Configuration File System.
[    6.146011] random: crng init done
[    6.147955] random: 7 urandom warning(s) missed due to ratelimiting
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Started Journal Service.
[  OK  ] Started Apply Kernel Variables.
[    6.628614] EXT4-fs (mmcblk0p5): re-mounted. Opts: (null)
[  OK  ] Started Remount Root and Kernel File Systems.
         Starting Create Static Device Nodes in /dev...
         Starting udev Coldplug all Devices...
[  OK  ] Started Create Static Device Nodes in /dev.
         Starting udev Kernel Device Manager...
[  OK  ] Reached target Local File Systems (Pre).
         Mounting /var/volatile...
[  OK  ] Mounted /var/volatile.
         Starting Bind mount volatile /srv...
         Starting Bind mount volatile /var/cache...
         Starting Bind mount volatile /var/spool...
         Starting Bind mount volatile /var/lib...
[  OK  ] Started Bind mount volatile /srv.
[  OK  ] Started Bind mount volatile /var/cache.
[  OK  ] Started Bind mount volatile /var/spool.
[  OK  ] Started Bind mount volatile /var/lib.
[  OK  ] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
         Starting Tell Plymouth To Write Out Runtime Data...
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Tell Plymouth To Write Out Runtime Data.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Reached target Sound Card.
[    9.187389] remoteproc remoteproc0: powering up m4
[    9.191376] remoteproc remoteproc0: Direct firmware load for rproc-m4-fw failed with error -2
[    9.229114] remoteproc remoteproc0: Falling back to user helper
[    9.249644] wm8994-codec wm8994-codec: Failed to request Mic1 detect IRQ: -22
[    9.255327] wm8994-codec wm8994-codec: Failed to request Mic1 short IRQ: -22
[  OK  ] Found device /dev/ttyS3.
[    9.286677] media: Linux media interface: v0.10
[    9.316407] Linux video capture interface: v2.00
[    9.332427] wm8994-codec wm8994-codec: Failed to request Mic2 detect IRQ: -22
[    9.332437] wm8994-codec wm8994-codec: Failed to request Mic2 short IRQ: -22
[    9.360819] asoc-audio-graph-card sound: wm8994-aif1 <-> 4400b004.audio-controller mapping ok
[    9.365032] asoc-audio-graph-card sound: wm8994-aif2 <-> 4400b024.audio-controller mapping ok
[    9.369359] asoc-audio-graph-card sound: dit-hifi <-> 50027004.audio-controller mapping ok
[    9.372650] asoc-audio-graph-card sound: dir-hifi <-> 4000d000.audio-controller mapping ok
[  OK  ] Created slice system-systemd\x2dbacklight.slice.
         Starting Load/Save Screen Backlight��䀦ss of backlight:panel-backlight...
[    9.512804] ov5640 0-003c: Linked as a consumer to regulator.10
[    9.517308] ov5640 0-003c: 0-003c supply DVDD not found, using dummy regulator
[    9.531673] ov5640 0-003c: Linked as a consumer to regulator.0
[    9.541708] ov5640 0-003c: 0-003c supply AVDD not found, using dummy regulator
[  OK  ] Started udev Coldplug all Devices.
         Starting udev Wait for Complete Device Initialization...
[  OK  ] Started Load/Save[    9.849217] stm32-dcmi 4c006000.dcmi: Probe done
 Screen Backlight ��…ness of backlight:panel-backlight.
[  OK  ] Listening on Load/Save RF Kill Switch Status /dev/rfkill Watch.
[   11.348493] remoteproc remoteproc0: request_firmware failed: -11
[FAILED] Failed to start Resin active root partition mount service.
See 'systemctl status mnt-sysroot-active.service' for details.
[   12.488735] EXT4-fs (mmcblk0p4): mounted filesystem with ordered data mode. Opts: (null)
[DEPEND] Dependency failed for Balena Application Container Engine (host).
[  OK  ] Started Resin boot partition mount service.
[   12.578664] EXT4-fs (mmcblk0p7): mounted filesystem with ordered data mode. Opts: (null)
[  OK  ] Started Resin state partition mount service.
[  OK  ] Started udev Wait for Complete Device Initialization.
[   13.619719] EXT4-fs (mmcblk0p6): mounted filesystem with ordered data mode. Opts: (null)
[  OK  ] Started Resin inactive root partition mount service.
         Starting Initialize system clock from RTC...
         Starting Bind mount for /etc/hostname...
         Starting Bind mount for /var/lib/NetworkManager...
         Starting Bind mount for /etc/docker...
         Starting Bind mount for /etc/NetworkManager/system-connections...
         Starting Bind mount for /home/root/.ssh...
         Starting Bind mount for /var/lib/chrony...
         Starting Bind mount for /var/lib/systemd...
         Starting Bind mount for /home/root/.rnd...
         Starting Bind mount for /etc/openvpn...
         Starting Bind mount for /etc/dropbear...
         Starting Bind mount for /etc/resin-supervisor...
         Starting Bind mount for /home/root/.docker...
         Starting Show Plymouth Boot Screen...
         Starting Expand resin-data partition...
         Starting OS configuration device key service...
[  OK  ] Started Initialize system clock from RTC.
         Starting Initialize system clock from build timestamp...
[  OK  ] Started Initialize system clock from build timestamp.
[   15.714034] EXT4-fs (mmcblk0p8): mounted filesystem with ordered data mode. Opts: (null)
[   20.142852] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   20.179214] Generic PHY stmmac-0:00: attached PHY driver [Generic PHY] (mii_bus:phy_addr=stmmac-0:00, irq=POLL)
[   20.200261] dwmac4: Master AXI performs any burst length
[   20.204170] stm32-dwmac 5800a000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
[   20.215660] stm32-dwmac 5800a000.ethernet eth0: registered PTP clock
[   20.221396] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

Resin OS 2.14.3 localhost ttyS3

localhost login: 

The error is the same as before and details from systemctl are the same:

systemctl status mnt-sysroot-active.service
��● mnt-sysroot-active.service - Resin active root partition mount service
   Loaded: loaded (/lib/systemd/system/mnt-sysroot-active.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Wed 2018-08-22 19:24:29 UTC; 18 years 7 months left
  Process: 109 ExecStart=/usr/bin/resin-partition-mounter --sysroot --mount active (code=exited, status=32)
 Main PID: 109 (code=exited, status=32)

Aug 22 19:24:29 localhost resin-partition-mounter[109]: INFO: Mounting /dev/disk/by-state/active in /mnt/sysroot/active.
Aug 22 19:24:29 localhost resin-partition-mounter[109]: mount: /mnt/sysroot/active: /dev/mmcblk0p5 already mounted on /.
Aug 22 19:24:29 localhost systemd[1]: mnt-sysroot-active.service: Main process exited, code=exited, status=32/n/a
Aug 22 19:24:29 localhost systemd[1]: Failed to start Resin active root partition mount service.
Aug 22 19:24:29 localhost systemd[1]: mnt-sysroot-active.service: Unit entered failed state.
Aug 22 19:24:29 localhost systemd[1]: mnt-sysroot-active.service: Failed with result 'exit-code'.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

Is there something else missing with the partitions ?