Getting Error on flash .img file (ubuntu 18.04 X86) generated using mender_convert latest tool

@mirzak, @drewmoseley
Note: Previous mender_convert version 2.0 I followed the same steps and it was successful.

Steps that I had followed:

  1. Downloaded tool
    https://github.com/mendersoftware/mender-convert/tree/2.2.x

  2. cd mender-convert

  3. created generic-x86_64 at path “mender-convert/configs/generic-x86_64”
    MENDER_STORAGE_DEVICE=/dev/sda
    MENDER_DEVICE_TYPE=“generic-x86_64”
    MENDER_STORAGE_TOTAL_SIZE_MB=“24000”
    MENDER_BOOT_PART_SIZE_MB=“512”
    MENDER_DATA_PART_SIZE_MB=“2000”

    Nothing to copy

    MENDER_COPY_BOOT_GAP=“n”

  4. mkdir -p input & cd input

  5. copy ubuntu18.04 .img into input folder

  6. convert virtual box .vhd to .img file
    sudo VBoxManage clonehd <path to .vhd file of Virtual box Ubuntu 18.04> <.img destination file path> --format raw

  7. sudo su

  8. Execute ./docker-build

  9. Generate Mender Artifact image file (.mender) and golden SD card Image file (.img similar to .sdimg) from Ubuntu 18.04 raw image (.img) file by entering below command.
    MENDER_ARTIFACT_NAME=release-1 ./docker-mender-convert --disk-image input/<.img file created in previous Section:Create Raw Ubuntu 18.04 Image> --config configs/generic-x86_64

  10. fdisk -l -u <.img golden image filename>

  11. Mount SD image partition & Edit grub configuration file with below commands.
    sudo mkdir /mnt/boot sudo mount -o loop,offset=((512*16384)) <.img golden image file-path> /mnt/boot cd /mnt/boot/EFI/BOOT/
    $ sudo gedit grub.cfg

Replace mender_grub_storage_device=hd0 in grub.cfg.
grub_storage=${root}

if [ “$grub_storage” == “hd0,msdos1” ]; then
mender_grub_storage_device=hd0
elif [ “$grub_storage” == “hd1,msdos1” ]; then
mender_grub_storage_device=hd1
elif [ “$grub_storage” == “hd2,msdos1” ]; then
mender_grub_storage_device=hd2
elif [ “$grub_storage” == “hd3,msdos1” ]; then
mender_grub_storage_device=hd3
elif [ “$grub_storage” == “hd4,msdos1” ]; then
mender_grub_storage_device=hd4
elif [ “$grub_storage” == “hd5,msdos1” ]; then
mender_grub_storage_device=hd5
elif [ “$grub_storage” == “hd6,msdos1” ]; then
mender_grub_storage_device=hd6
elif [ “$grub_storage” == “hd7,msdos1” ]; then
mender_grub_storage_device=hd7
fi

  1. Assign kernel_imagetype and initrd_imagetype fields values
    kernel_imagetype=vmlinuz-5.3.0-51-generic
    initrd_imagetype=initrd.img-5.3.0-51-generic

  2. Unmount boot partition
    cd sudo umount /mnt/boot

  3. Burn Golden image (.img) on SD Card Format the SD card to type FAT32
    $ sudo dd if=<.img file path> of= bs=1M status=progress conv=fsync && sudo sync

  4. Burn Host Machine with prepared SD Card with Golden Image
    a. Insert Ubuntu 18.04 bootable pen drive on Host Machine (machine on which mender image (.mender) will deploy) and boot up Host Machine with Pen drive and Try Ubuntu option.
    b. After booting up with Pen Drive and Try Ubuntu, Insert SD Card on Host Machine.

    c. Format using gparted or disk utility application. Delete all partitions and then format it to FAT32.
    d. Open a terminal and burn the golden image on the Host machine
    sudo dd if= of= bs=1M status=progress conv=fsync && sudo sync
    e. On successfully burn on Host Machine Primary Partition, Reboot Host Machine.

On reboot, i am getting an error as "login incorrect sulogin: crypt failed: Invalid argument"
image

image

I would gladly accept if you have an idea or want to give advice.
Best regards

I don’t have any specific idea. It seems that something is not correct with your pam configuration or something.

Sorry I can’t be of more help.

Drew