Hi everyone,
I’m new to mender tool and I’m having a problem using mender-convert tool when it comes generating a mender image (.sdimg) from “golden image” Ubuntu Server 16.04 and which is running properly on Raspberry Pi 3 B+.
I have runned the following commands in order to do this:
sudo ./docker-mender-convert raw-disk-image-shrink-rootfs --raw-disk-image input/golden-image-1.img --storage-total-size-mb 8000
sudo ./docker-mender-convert from-raw-disk-image --raw-disk-image “input/golden-image-1.img” --mender-disk-image /home/integrasys/mender-convert/output/golden-image-1.sdimg --device-type “raspberrypi3” --artifact-name “golden-image-1” --bootloader-toolchain arm-buildroot-linux-gnueabihf --server-url “docker.mender.io” --demo --server-cert “./server.crt” --storage-total-size-mb 8000
The output is the following:
*** Data partition size set to default value: 128MB ***
1/10 Shrinking raw disk image root filesystem...
dumpe2fs 1.44.1 (24-Mar-2018)
resize2fs 1.44.1 (24-Mar-2018)
Root filesystem size:
minimal: 2473947136
aligned: 2474639360
sectors: 4833280
Raw disk image new endsector: 5103615
New root filesystem size (sectors): 4833280
2/10 Repartitioning raw disk image...
Detected raw disk image with 2 partition(s).
Calculating partitions' sizes of the Mender image.
Adjust Mender disk image size to the total storage size (8000MB).
Additional space for rootfs partitions not aligned.
Final image will be smaller than 8000MB
Extracting boot partition from raw disk image.
Storing data in boot.vfat.
Extracting root filesystem partition from raw disk image.
Storing data in rootfs.img.
Creating blank Mender disk image:
image size: 8384413696 bytes
boot partition size: 134217728 bytes
root filesystem size: 4051697664 bytes
data partition size: 134217728 bytes
Changes in partition table applied.
3/10 Formatting repartitioned raw disk image...
Creating MS-DOS filesystem for 'boot' partition.
Creating ext4 filesystem for 'primary' partition.
Creating ext4 filesystem for 'secondary' partition.
Creating ext4 filesystem for 'data' partition.
4/10 Setting boot partition...
Done.
5/10 Setting root filesystem partition...
Done.
6/10 Setting file system table...
Done.
7/10 Cleaning intermediate files...
Partition mappings cleaned.
8/10 Installing Mender to Mender disk image...
Downloading demo server certificate.
Installing files.
3install -m 755 -d /mender-convert/output/sdimg/primary/usr/bin
install -m 755 mender /mender-convert/output/sdimg/primary/usr/bin/
install -m 755 -d /mender-convert/output/sdimg/primary/etc/mender
install -m 644 mender.conf.production /mender-convert/output/sdimg/primary/etc/mender/mender.conf.production
install -m 644 mender.conf.production /mender-convert/output/sdimg/primary/etc/mender/mender.conf
install -m 644 mender.conf.demo /mender-convert/output/sdimg/primary/etc/mender/mender.conf.demo
echo "artifact_name=unknown" > /mender-convert/output/sdimg/primary/etc/mender/artifact_info
install -m 755 -d /mender-convert/output/sdimg/primary/usr/share/mender
install -m 755 -d /mender-convert/output/sdimg/primary/usr/share/mender/identity
install -m 755 support/mender-device-identity /mender-convert/output/sdimg/primary/usr/share/mender/identity/
install -m 755 -d /mender-convert/output/sdimg/primary/usr/share/mender/inventory
install -m 755 support/mender-inventory-bootloader-integration support/mender-inventory-hostinfo support/mender-inventory-network support/mender-inventory-os support/mender-inventory-rootfs-type /mender-convert/output/sdimg/primary/usr/share/mender/inventory/
install -m 755 -d /mender-convert/output/sdimg/primary/usr/share/mender/modules/v3
install -m 755 support/modules/deb support/modules/docker support/modules/directory support/modules/single-file support/modules/rpm support/modules/script /mender-convert/output/sdimg/primary/usr/share/mender/modules/v3/
install -m 755 -d /mender-convert/output/sdimg/primary/lib/systemd/system
install -m 0644 support/mender.service /mender-convert/output/sdimg/primary/lib/systemd/system/
Done.
9/10 Installing Bootloader to Mender disk image...
Building U-Boot related files.
Installing U-Boot related files.
cp: cannot stat '/mender-convert/output/sdimg/boot/kernel7.img': No such file or directory
install: cannot create regular file '/mender-convert/output/sdimg/primary/usr/lib/raspi-config/init_resize.sh': No such file or directory
unlink: cannot unlink '/mender-convert/output/sdimg/primary/etc/rc3.d/S01resize2fs_once': No such file or directory
rm: cannot remove '/mender-convert/output/sdimg/primary/etc/init.d/resize2fs_once': No such file or directory
Done.
10/10 Creating Mender Artifact...
Rootfs partition id not set - 'primary' will be used by default.
Storing data in golden-image-1.ext4.
Writing Mender artifact to: /mender-convert/output/golden-image-1.mender
This may take 10-20 minutes (using LZMA)...
Creating Mender Artifact succeeded.
Conversion complete!
The Mender disk image you can provision your device storage with is at:
/mender-convert/output/golden-image-1.sdimg
The Mender root file system partition is at:
/mender-convert/output/golden-image-1.ext4
The Mender Artifact you can upload to your Mender server to deploy to your devices is at:
/mender-convert/output/golden-image-1.mender*
Then I have flashed this generated image into the microSD but unsucess when I put it on the raspberry, it does not boot giving the following errors that appears in the capture:
Anyone has any suggestion about this issue?
Thanks in advance, I will appreciate any help because I am quite stucked with this. It’s possible to do this?
Best reagards.
Edit: @mirzak: formatting