How to adjust Mender disk image artifact

I think it was discussed above that you need to adjust storage-total-size-mb parameter

–storage-total-size-mb 4000

i added this option in command but not working

./docker-mender-convert from-raw-disk-image
–raw-disk-image $RAW_DISK_IMAGE
–mender-disk-image $MENDER_DISK_IMAGE
–storage-total-size-mb 4000
–device-type $DEVICE_TYPE
–artifact-name $ARTIFACT_NAME
–bootloader-toolchain arm-buildroot-linux-gnueabihf
–demo
–demo-host-ip $DEMO_HOST_IP

but its not working … can u help me …

It’s printed there. You need to use:
–storage-total-size-mb 32000

I have already linked to this, but here it goes again,

Please read above.

am getting file not found , some files not found is there any problem pls check bellow commands execution…

sudo ./docker-mender-convert from-raw-disk-image \

        --raw-disk-image $RAW_DISK_IMAGE                     \
        --mender-disk-image $MENDER_DISK_IMAGE               \
        --device-type $DEVICE_TYPE                           \
        --artifact-name $ARTIFACT_NAME                       \
        --bootloader-toolchain arm-buildroot-linux-gnueabihf \
        --demo                                               \
        --demo-host-ip $DEMO_HOST_IP

Running mender-convert from-raw-disk-image --raw-disk-image input/HUL_PCBA_TF_1.0_20180713_1800.img --mender-disk-image input/golden-image-1-mender-integ.sdimg --device-type raspberrypi3 --artifact-name golden-image-1-mender-integ --bootloader-toolchain arm-buildroot-linux-gnueabihf --demo --demo-host-ip 192.168.1.242
*** Data partition size set to default value: 128MB ***
*** Total storage size set to default value: 8GB ***
1/9 Repartitioning raw disk image…
Detected raw disk image with 1 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
Generating boot partition (required, does not exist in original image)
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: 8388608 bytes
root filesystem size: 4114612224 bytes
data partition size: 134217728 bytes
Changes in partition table applied.
2/9 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.
3/9 Setting boot partition…
mcopy: File “::cmdline.txt” not found
sed: can’t read /mender-convert/output/cmdline.txt: No such file or directory
sed: can’t read /mender-convert/output/cmdline.txt: No such file or directory
/mender-convert/output/cmdline.txt: No such file or directory
mcopy: File “::config.txt” not found
Done.
4/9 Setting root filesystem partition…
Done.
5/9 Setting file system table…
Done.
6/9 Cleaning intermediate files…
Partition mappings cleaned.
7/9 Installing Mender to Mender disk image…
Downloading demo server certificate.
Installing files.
install -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.
8/9 Installing Bootloader to Mender disk image…
Building U-Boot related files.
Installing U-Boot related files.
cp: cannot stat ‘/mender-convert/output/sdimg/boot/cmdline.txt’: No such file or directory
sed: can’t read /mender-convert/output/cmdline.txt: No such file or directory
grep: /mender-convert/output/cmdline.txt: No such file or directory
cat: /mender-convert/output/cmdline.txt: No such file or directory
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.
9/9 Creating Mender Artifact…
Rootfs partition id not set - ‘primary’ will be used by default.
Storing data in golden-image-1-mender-integ.ext4.
Writing Mender artifact to: /mender-convert/output/golden-image-1-mender-integ.mender
This may take 10-20 minutes (using LZMA)…

What kind of image are you using? Raspbian? I see : input/HUL_PCBA_TF_1.0_20180713_1800.img . Is this image raspbian? Thanks.

no its beaglebone

hi ,

please which image file we have to use on mender-disk-image ?

please clarify me …
bash
DEVICE_TYPE=“raspberrypi3”
RAW_DISK_IMAGE=“input/golden-image-1.img”

ARTIFACT_NAME=“golden-image-1-mender-integ”
MENDER_DISK_IMAGE=“input/golden-image-1-mender-integ.sdimg”

DEMO_HOST_IP=“192.168.10.2”

./docker-mender-convert from-raw-disk-image
–raw-disk-image $RAW_DISK_IMAGE
–mender-disk-image $MENDER_DISK_IMAGE
–device-type $DEVICE_TYPE
–artifact-name $ARTIFACT_NAME
–bootloader-toolchain arm-buildroot-linux-gnueabihf
–demo
–demo-host-ip $DEMO_HOST_IP

if it’s beaglebone above must be adjusted. Thanks.

wher i have to find out MENDER_DISK_IMAGE=“input/golden-image-1-mender-integ.sdimg” .sdimg file…

what i have to do

DEVICE_TYPE=“beaglebone”

Also please describe exact step as it looks like you mixed rpi3 with begalebone. Thanks.

DEVICE_TYPE=“raspberrypi3”
RAW_DISK_IMAGE=“input/golden-image-1.img”

ARTIFACT_NAME=“golden-image-1-mender-integ”
MENDER_DISK_IMAGE=“input/golden-image-1-mender-integ.sdimg”

DEMO_HOST_IP=“192.168.10.2”

wher i have to find golden-image-1-mender-integ.sdimg file for MENDER_DISK_IMAGE

The MENDER_DISK_IMAGE in this example is actually an output file. It is what is being created by the tool. I have pushed a documentation fix to avoid this confusion. Thanks.

i done Building for demo environment and Provisioning a new device https://docs.mender.io/2.0/artifacts/debian-family

https://docs.mender.io/2.0/artifacts/provisioning-a-new-device
then what i have to do next step ?

Then you should be ready to perform updates on your device.

my beaglebone restarting every 5 seconds…

resetting …

U-Boot SPL 2019.04-dirty (Jun 04 2019 - 12:52:47 +0530)
Trying to boot from MMC2
Loading Environment from EXT4…
** Unable to use mmc 0:1 for loading the env **

U-Boot 2019.04-dirty (Jun 04 2019 - 12:52:47 +0530)

CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver ‘omap_hsmmc’
No match for driver ‘omap_hsmmc’
Some drivers were not found
Reset Source: Global warm SW reset has occurred.
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4…
** Unable to use mmc 0:1 for loading the env **
Board: BeagleBone Black
not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net: eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
board_name=[A335BNLT] …
board_rev=[00C0] …
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1…
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt …
188 bytes read in 2 ms (91.8 KiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from /uEnv.txt
Importing environment from mmc …
Checking if uenvcmd is set …
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd …
400896 bytes read in 31 ms (12.3 MiB/s)
Scanning disks on usb…
Disk usb0 not ready
Disk usb1 not ready
Disk usb2 not ready
Disk usb3 not ready
Scanning disks on mmc…
MMC Device 2 not found
MMC Device 3 not found
Found 6 disks
WARNING: booting without device tree

Starting EFI application at 80007fc0 …

Welcome to GRUB!

lock: OK
lock: OK

prefetch abort
pc : [] lr : [<00000001>]
reloc pc : [] lr : []
sp : 9df37250 ip : 00000028 fp : 00000023
r10: 000002a8 r9 : 00000000 r8 : 9df3724c
r7 : 9ceca93c r6 : 9cd462c0 r5 : 9cedf7b0 r4 : 9ce54910
r3 : 000001ff r2 : 00000002 r1 : 00000002 r0 : 00280000
Flags: nZCv IRQs off FIQs on Mode SVC_32
Code: 0000ffff 0000ffff 0000ffff 0000ffff (0000ffff)
UEFI image [0x9ceca000:0x9cf2bdff] ‘/VenHw(e61d73b9-a384-4acc-aeab-82e828f3628b) /USB(0x6,0x0)/HD(1,MBR,0xd4c8f6f0,0x4000,0x8000)/uEnv.txt’
Resetting CPU …

resetting …

U-Boot SPL 2019.04-dirty (Jun 04 2019 - 12:52:47 +0530)
Trying to boot from MMC2
Loading Environment from EXT4…
** Unable to use mmc 0:1 for loading the env **

U-Boot 2019.04-dirty (Jun 04 2019 - 12:52:47 +0530)

CPU : AM335X-GP rev 2.1
I2C: ready
DRAM: 512 MiB
No match for driver ‘omap_hsmmc’
No match for driver ‘omap_hsmmc’
Some drivers were not found
Reset Source: Global warm SW reset has occurred.
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4…
** Unable to use mmc 0:1 for loading the env **
Board: BeagleBone Black
not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net: eth0: MII MODE
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
board_name=[A335BNLT] …
board_rev=[00C0] …
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1…
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt …
188 bytes read in 2 ms (91.8 KiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from /uEnv.txt
Importing environment from mmc …
Checking if uenvcmd is set …
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd …
400896 bytes read in 30 ms (12.7 MiB/s)
Scanning disks on usb…
Disk usb0 not ready
Disk usb1 not ready
Disk usb2 not ready
Disk usb3 not ready
Scanning disks on mmc…
MMC Device 2 not found
MMC Device 3 not found
Found 6 disks
WARNING: booting without device tree

Starting EFI application at 80007fc0 …