First of all: Mender is quite new to me. I am trying to set up a system for firmware update of several devices (FriendlyELEC NanoPi R1) running Ubuntu 16.04, but I’m not able to deploy any artifacts to the devices. I would really appreceate if anybodyu could help me!
The Mender version of this distribution is created using ‘mender-convert’ based on info on https://docs.mender.io/system-updates-debian-family/convert-a-mender-debian-image
The deplyment log from hosted.mender.io reads:
2020-11-10 13:04:04 +0000 UTC info: Running Mender client version: 2.3.0
2020-11-10 13:04:05 +0000 UTC info: State transition: update-fetch [Download_Enter] -> update-store [Download_Enter]
2020-11-10 13:04:05 +0000 UTC info: No public key was provided for authenticating the artifact
2020-11-10 13:04:05 +0000 UTC error: Artifact install failed: Payload: can not install Payload: root_part_0.0.1.ext4.gz: No match between boot and root partitions.: exit status 1
2020-11-10 13:04:05 +0000 UTC info: State transition: update-store [Download_Enter] -> cleanup [Error]
2020-11-10 13:04:05 +0000 UTC info: State transition: cleanup [Error] -> update-status-report [none]
The error seems to be No match between boot and root partitions
.
Checking the device gives me a hint thtat something is wrong:
$ sudo mender show-artifact
ERRO[0000] Failed to read the current active partition: No match between boot and root partitions.: exit status 1
xxx_release_1
Checking fw_printenv also indicates something wrong with the boot (bad CRC):
$ sudo fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=1
baudrate=115200
fdt_high=0xffffffff
initrd_high=0xffffffff
rootdev=0
rootpart=2
bootpart=1
kernel=zImage
loadaddr=0x71080000
dtb_name=s5p4418-nanopi2-rev01.dtb
dtb_addr=0x7A000000
initrd_name=ramdisk.img
initrd_addr=0x79000000
initrd_size=0x600000
load_dtb=ext4load mmc ${rootdev}:${bootpart} ${dtb_addr} ${dtb_name}; run dtb_reserve
load_kernel=ext4load mmc ${rootdev}:${bootpart} ${loadaddr} ${kernel}
load_initrd=ext4load mmc ${rootdev}:${bootpart} ${initrd_addr} ${initrd_name}; setenv initrd_size 0x${filesize}
mmcboot=run load_kernel; run load_initrd; run load_dtb; bootz ${loadaddr} ${initrd_addr}:${initrd_size} ${dtb_addr}
bootcmd=run mmcboot
splashimage=0x78000000
splashfile=logo.bmp
splashpos=m,m
fb_addr=
dtb_reserve=if test -n "$dtb_addr"; then fdt addr $dtb_addr; fi
I’ve also read somewhere that mender_boot_part
environment variable is
unset or wrong. That may be the case, but currently I have no idea on how to fix it.
My problem is that I don’t have too much knowledge about uboot and boot configuration, so I am afraidthat the issue easily can be fixed in the configuration. I’ve tried to read as much as possible, both documentation on mender and looking for help in the Mender Hub, but i cannot find anything that fixes this problem.
Details:
- Core: Ubuntu 16.04 Xenial
- Hardware: FriendlyElec NanoPi R1
- Disk image: nanopi-r1_sd_friendlycore-xenial_4.14_armhf_20191219.img
- /mender-convert/configs/NanoPi_R1_config’:
MENDER_DEVICE_TYPE="NanoPi_R1"
MENDER_GRUB_EFI_INTEGRATION=n
MENDER_KERNEL_IMAGETYPE="zImage"
MENDER_PARTITION_ALIGNMENT="8388608"
MENDER_STORAGE_TOTAL_SIZE_MB="7456"
Commands to produce Mender image:
$ INPUT_DISK_IMAGE=$(ls nanopi-r1_sd_friendlycore-xenial_4.14_armhf_20191219.img)
$ export MENDER_ARTIFACT_NAME="xxx_release_1"
$ sudo ./scripts/bootstrap-rootfs-overlay-hosted-server.sh --output-dir ${PWD}/rootfs_overlay --tenant-token "<xxx>"
$ sudo -E ./mender-convert --disk-image $INPUT_DISK_IMAGE --config configs/nanopi_r1_config --overlay rootfs_overlay/
Commands to flash device (booted from external SD-card)
$ gzip -c -k -d nanopi-r1_sd_friendlycore-xenial_4.14_armhf_20191219-NanoPi_R1-mender.img.gz | dd of=/dev/mmcblk1 bs=10M status=progress conv=fdatasync