Easy Installer fails with large images

I am using a Linux host with unattended flashing over Ethernet. The linux host serves nginx, dhcp and dns. I am using the Toradex easy installer 2.0b7-20210415 from the artifactory:

https://artifacts.toradex.com/artifactory/tezi-oe-prod-frankfurt/thud/release/4/apalis-imx8/tezi/tezi-run/oedeploy/https://artifacts.toradex.com/artifactory/tezi-oe-prod-frankfurt/thud/release/4/apalis-imx8/tezi/tezi-run/oedeploy/Apalis-iMX8_ToradexEasyInstaller_2.0b7-20210415.zip

I have no problem flashing the MMC with a mender image with a 1 GB rootfs size. But when I increase this to something larger (the total image size is well within the 16 GB total), I get the following popup error from the easy installer VNC connection:

2852-tezierror.png

What exactly the image size? Have you tried to flash it from USB stick or SD card?

I am flashing via unattended Ethernet (local nginx server connected via ethernet, serving as tezi.toradex.com). I have not tried to flash via USB stick, but I intend to.

My image.json file is:

{
    "config_format": 2,
    "autoinstall": true,
    "name": "Toradex Embedded Linux Reference Minimal Image",
    "description": "Minimal image without graphical interface that just boots",
    "version": "Mender dunfell",
    "release_date": "2021-07-16",
    "prepare_script": "prepare.sh",
    "wrapup_script": "wrapup.sh",
    "marketing": "mender-tezi-metadata/marketing_mender_toradex.tar",
    "icon": "mender-tezi-metadata/mender_toradex_linux.png",
    "supported_product_ids": [
        "0037",
        "0047",
        "0048",
        "0049"
    ],
    "blockdevs": [
        {
            "name": "mmcblk0",
            "table_type": "gpt",
            "content": {
                "rawfiles": [
                    {
                        "filename": "Reference-Minimal-Image-apalis-imx8.sdimg.bz2"
                    }
                ]
            }
        },
        {
            "name": "mmcblk0boot0",
            "erase": true,
            "content": {
                "filesystem_type": "raw",
                "rawfiles": [
                    {
                        "filename": "imx-boot",
                        "dd_options": "seek=0"
                    }
                ]
            }
        }
    ]
}

In the good case, where the image is written correctly and boots without error, the sdimg file looks like (fdisk -u -l):

Disk /var/www/html/apalis-imx8/Apalis-iMX8_Reference-Minimal-Image.sdimg: 1016 MiB, 1065353216 bytes, 2080768 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x684a9a61

Device                                                               Boot   Start     End Sectors  Size Id Type
/var/www/html/apalis-imx8/Apalis-iMX8_Reference-Minimal-Image.sdimg1 *      49152  114687   65536   32M  c W95 FAT32 (LBA)
/var/www/html/apalis-imx8/Apalis-iMX8_Reference-Minimal-Image.sdimg2       114688  966655  851968  416M 83 Linux
/var/www/html/apalis-imx8/Apalis-iMX8_Reference-Minimal-Image.sdimg3       966656 1818623  851968  416M 83 Linux
/var/www/html/apalis-imx8/Apalis-iMX8_Reference-Minimal-Image.sdimg4      1818624 2080767  262144  128M 83 Linux

In the error case, where the image is not written successfully, the sdimg file is (fdisk -u -l):

Disk /var/www/html/apalis-imx8/Apalis-iMX8_Reference-Minimal-Image.sdimg: 3,102 GiB, 4286578688 bytes, 8372224 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xdc70cdbd

Device                                                               Boot   Start     End Sectors  Size Id Type
/var/www/html/apalis-imx8/Apalis-iMX8_Reference-Minimal-Image.sdimg1 *      49152  114687   65536   32M  c W95 FAT32 (LBA)
/var/www/html/apalis-imx8/Apalis-iMX8_Reference-Minimal-Image.sdimg2       114688 4112383 3997696  1,9G 83 Linux
/var/www/html/apalis-imx8/Apalis-iMX8_Reference-Minimal-Image.sdimg3      4112384 8110079 3997696  1,9G 83 Linux
/var/www/html/apalis-imx8/Apalis-iMX8_Reference-Minimal-Image.sdimg4      8110080 8372223  262144  128M 83 Linux

In this case I get the error popup from tezi shown below.
2855-tezierror2gbrootfs.png

I have now verified that it works fine with the USB stick. But the same image served by my local host fails as described above. I also verified that the target can still ping tezi.toradex.com after the failure, so it is not losing the ethernet connection.

Hi @pally

Based on our conversation over in Mender Hub, you got this working by using the mender_tezi image but are still having trouble with the other mechanism right? Can you clarify how you are creating the image that fails and how it differs from the mender_tezi image?

Drew

Hi Drew,

I got it working by using a USB stick instead of unattended flashing over Ethernet. Both methods now use the same mender_tezi image, and the unattended Ethernet still fails in the way described above.

I would very much like to see this working with unattended Ethernet. I can flash with a USB stick for the time being, but it would be nice to get the other method working.

BTW, this thread looks different than it did this morning. For example, I already answered Alex’s question about image size, but I don’t see that any more.

Paul

Hi Paul,

Is it possible you have some kind of file size limitation on your server? Are there any logs there where you can see details of the transfer?

Drew

I spoke with @pally over on Mender Hub and he confirmed that this issue was an NFS server setting.

Yes, the problem was with the nginx server timing out on long transfers. I had to add /etc/nginx/conf.d/timeout.conf with the contents:

proxy_connect_timeout 1200;
proxy_send_timeout 1200;
proxy_read_timeout 1200;
send_timeout 1200;