# Getting error during artefacts creation from Ubuntu 18.04 x64 image using mender-convert-next

**URL:** <https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305>\
**Category:** General Discussions\
**Created:** [December 2, 2019, 7:04am UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305 "2019-12-02T07:04:53Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rohita83](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/rohita83/32/436_2.png) [@Rohita83](https://hub.mender.io/u/Rohita83)\
**Post date:** [December 2, 2019, 7:04am UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/1 "2019-12-02T07:04:54Z")

</div>

Hello,

With [ubuntu](https://d1b0l86ne08fsf.cloudfront.net/mender-convert/images/Ubuntu-Bionic-x86-64.img.gz) test image. i have “.sdimg” and “.mender” files But I am getting error below with Ubuntu 18.04.3 LTS (Bionic beaver) Desktop image after execute mender-convert using mender-convert-next repo.

I have followed the steps as below.

1. Download Ubuntu 18.04.3 LTS (Bionic beaver) Desktop iso image.  
[Ubuntu 18.04.6 LTS (Bionic Beaver)](http://releases.ubuntu.com/18.04/)

2. **Could you please assist me, what is the right way to convert iso file into .img file for mender?**

Note: Here all three above ways .img successfully booted on X86 m/c.

1. Download mender-convert source code  
git clone -b next [GitHub - mendersoftware/mender-convert: An easy way to integrate the Mender client into an existing image](https://github.com/mendersoftware/mender-convert.git)

2. copy .img under input folder  
cd mender-convert  
mkdir -p input  
#Copy the .img file under input folder

3. Execute below commands

**Terminal Output 7 Error:**

> **2019-12-02 05:56:53 [INFO] [mender-convert-extract] Using configuration file: configs/mender\_convert\_config**  
> **2019-12-02 05:56:53 [INFO] [mender-convert-extract] Using configuration file: configs/qemux86-64\_config**  
> **2019-12-02 05:56:53 [INFO] [mender-convert-extract] Validating disk image**  
> **2019-12-02 05:56:53 [INFO] [mender-convert-extract] Disk parsed succesfully**  
> **2019-12-02 05:56:53 [INFO] [mender-convert-extract] NUMBER OF PARTS: 2 TYPE: dos**  
> **2019-12-02 05:56:53 [INFO] [mender-convert-extract] PART 1: SIZE: 2G TYPE: 0x0**  
> **2019-12-02 05:56:53 [INFO] [mender-convert-extract] PART 1: extracting to work/part-1.fs**  
> **2019-12-02 05:57:48 [INFO] [mender-convert-extract] PART 2: SIZE: 2.4M TYPE: 0xef**  
> **2019-12-02 05:57:48 [INFO] [mender-convert-extract] PART 2: extracting to work/part-2.fs**  
> **dd: invalid number: ‘-1’**

Anyone assist me to resolve error during create artifacts from Ubuntu 18.04 x64 desktop image using mender-convert-next repo.

can anyone please replicate same above and guide me if i missed something.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [December 2, 2019, 3:54pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/2 "2019-12-02T15:54:53Z")

</div>

Hi @Rohita83,

I don’t think mender-convert will function on the ISO files directly. That could certainly be added but it would not be terribly useful since that is the Ubuntu installer image and on an “installed” Ubuntu. I think the best approach is to boot this ISO in a machine (a VM is fine), do the installation, and then use “dd” to make an image of the installed partition.

Drew

---

<div class="post-metadata">

**Author:** ![Rohita83](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/rohita83/32/436_2.png) [@Rohita83](https://hub.mender.io/u/Rohita83)\
**Post date:** [December 3, 2019, 1:27pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/3 "2019-12-03T13:27:37Z")

</div>

> [@drewmoseley](#):
>
> (a VM is fine), do the installation, and then use “dd” to make an image of the installed partition.

@drewmoseley, Thanks for the quick informative response.

if possible, Could you please share the steps or docs to make an iso image (mender compatible) from ubuntu18.04 desktop iso through VM.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [December 3, 2019, 2:59pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/4 "2019-12-03T14:59:13Z")

</div>

I didn’t actually validate these instructions but [this wiki](https://www.wikihow.com/Install-Ubuntu-on-VirtualBox) looks pretty helpful for doing the actual installation of Ubuntu into Virtualbox. Basically, just create a new VirtualBox machine from the “Machine” menu, make sure to add a disk (VDI mode); then edit the machine settings and add the Ubuntu ISO to the IDE Storage controller as a CDROM device. Then boot the machine and select the “Install Ubuntu” option. Once that completes, power off the virtual machine.

Now you need to convert the VDI image to raw format. Note that this will create a file as large as you specified the disk to be, so make sure you have sufficient disk space. On my Ubuntu Laptop, the disk image is stored in “/home/dmoseley/Documents/VirtualBox/Ubuntu 18/Ubuntu 18.vdi”. It may be different in your case:

```
$ VBoxManage clonehd ~/Documents/VirtualBox/Ubuntu\ 18/Ubuntu\ 18.vdi /work/dmoseley/scratch/foo.img --format raw

```

This foo.img file should be usable with mender-convert however please note that we have not added support for Ubuntu/X86 in mender-convert yet so you will likely have further development to do to get this to work.

HTH,  
Drew

---

<div class="post-metadata">

**Author:** ![sandiprakhasiya](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@sandiprakhasiya](https://hub.mender.io/u/sandiprakhasiya)\
**Post date:** [December 4, 2019, 7:17am UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/5 "2019-12-04T07:17:47Z")

</div>

I have tried the same as above and created a mender image ( **sdimg.gz 5.55 GB** ) successfully.  
But failed during flashing.

After that, I have checked SD Card in GParted. It shows 2 partitions of 100 GB and another 3 partitions.

**Is there any specific configuration to create .vdi (VirtualBox image) or with mender?**

---

<div class="post-metadata">

**Author:** ![Rohita83](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/rohita83/32/436_2.png) [@Rohita83](https://hub.mender.io/u/Rohita83)\
**Post date:** [December 4, 2019, 1:10pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/6 "2019-12-04T13:10:48Z")

</div>

> [@drewmoseley](#):
>
> This foo.img file should be usable with mender-convert howeve

@drewmoseley, Thanks so much for suggesting the right steps. The steps given is working fine for qemux86\_64 emulator.  
Is it possible to convert for x86\_64 generic hardware machine?.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [December 4, 2019, 6:08pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/7 "2019-12-04T18:08:57Z")

</div>

Supporting a generic X86 machine is possible but will likely require some customization in mender-convert. We have not tested that machine type yet and would love a pull request implementing it.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [December 4, 2019, 6:10pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/8 "2019-12-04T18:10:29Z")

</div>

Hi @sandiprakhasiya, welcome to Mender Hub.  
I’m not quite sure what you are asking here. Mender convert will output a multiple partition image with the SDIMG suffix. You may need to run either qemu-img or VBoxManage to convert that to something directly usable by VirtualBox but I’ve not tried that.

Drew

---

<div class="post-metadata">

**Author:** ![sachinkakatkar](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/sachinkakatkar/32/465_2.png) [@sachinkakatkar](https://hub.mender.io/u/sachinkakatkar)\
**Post date:** [December 6, 2019, 12:37pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/9 "2019-12-06T12:37:21Z")

</div>

Yes I will love to implement for ubuntu generic x86\_64. Can you please guide from where i can start? Ubuntu working for qemux86\_64 nice one and Thanks for the steps.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [December 6, 2019, 7:29pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/10 "2019-12-06T19:29:38Z")

</div>

The docs are in the process of being updated. Take a look here for details: [https://github.com/mendersoftware/mender-docs/blob/62d9b1cba2130f0162f96902a504149be1d3507a/04.Artifacts/02.Debian-family/02.image-configuration/docs.md](https://github.com/mendersoftware/mender-docs/blob/62d9b1cba2130f0162f96902a504149be1d3507a/04.Artifacts/02.Debian-family/02.image-configuration/docs.md)

Drew

---

<div class="post-metadata">

**Author:** ![sachinkakatkar](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/sachinkakatkar/32/465_2.png) [@sachinkakatkar](https://hub.mender.io/u/sachinkakatkar)\
**Post date:** [December 18, 2019, 9:07am UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/11 "2019-12-18T09:07:07Z")

</div>

Thanks for the documents. I am able to boot on generic-x86\_64 machine with Micro SD card as a boot-able media. Trying to run on computer hard disk HDD but the facing issue while booting.

Thanks and Regards,  
Sachin

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [December 18, 2019, 2:26pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/12 "2019-12-18T14:26:09Z")

</div>

What issue are you seeing? You need to ensure that the MENDER\_STORAGE\_DEVICE variable is changed to whatever is appropriate for the hard disk.

---

<div class="post-metadata">

**Author:** ![sachinkakatkar](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/sachinkakatkar/32/465_2.png) [@sachinkakatkar](https://hub.mender.io/u/sachinkakatkar)\
**Post date:** [December 20, 2019, 8:17am UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/13 "2019-12-20T08:17:51Z")

</div>

Micro SD card set MENDER\_STORAGE\_DEVICE=/dev/sdb and that it perfectly working. For hard disk HDD set MENDER\_STORAGE\_DEVICE=/dev/sda but that it not working. Just blank after power on. Set MENDER\_GRUB\_STORAGE\_DEVICE=hd0 for both sd card and HDD.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [December 20, 2019, 3:08pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/14 "2019-12-20T15:08:04Z")

</div>

Whether those device nodes are correct is going to depend on your hardware and how specifically the devices are enumerated by the BIOS.

Also, some BIOSes renumber things when external devices are connected. I’ve seen some where they boot find when the HDD is the only device connected but then when you put a USB key in and boot, the HDD is pushed to HD1. I’m working on a fix for that but in the meantime if you just make sure that the HDD is the only block device in the system, that may help.

Drew

---

<div class="post-metadata">

**Author:** ![sachinkakatkar](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/sachinkakatkar/32/465_2.png) [@sachinkakatkar](https://hub.mender.io/u/sachinkakatkar)\
**Post date:** [December 23, 2019, 1:50pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/15 "2019-12-23T13:50:38Z")

</div>

Hello Drew,

Only with HDD device also i tried but not booting. Here is more information. SD image (.sdimg)after mender-convert programmed with dd command in to HDD from sd card and that’s not booting but when i do same procedure for .img image before mender-convert it is booting from HDD. if i connect micro sd card and inside that in grub.cfg file if i give the boot and roots path of HDD storage then it is booting from HDD.

Thanks and Regards,  
Sachin

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [December 24, 2019, 2:04pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/16 "2019-12-24T14:04:45Z")

</div>

It sounds like there is some changes needed in the mender-convert setup for the GRUB installation. We have not currently validated X86 platforms with mender-convert so that’s not terribly surprising. We’d happily accept a PR implementing this if you are so inclined.  
Drew

---

<div class="post-metadata">

**Author:** ![sachinkakatkar](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/sachinkakatkar/32/465_2.png) [@sachinkakatkar](https://hub.mender.io/u/sachinkakatkar)\
**Post date:** [December 25, 2019, 6:19pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/17 "2019-12-25T18:19:27Z")

</div>

Hello Drew,

Tried for the Another x86-64 machine that’s working perfectly and One of the x86-64 machine it was not working even after trying repeatedly. Both machines with HDD memory only. Most probably as you said before maybe because of the BIOS settings. Another machine where it is working fine is in legacy boot mode. PR? pull request, I am not aware?

Thanks and Regards,  
Sachin

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [December 26, 2019, 2:36pm UTC](https://hub.mender.io/t/getting-error-during-artefacts-creation-from-ubuntu-18-04-x64-image-using-mender-convert-next/1305/18 "2019-12-26T14:36:49Z")

</div>

Yes, PR meant Pull Request. Sorry for being unclear.

Indeed, if it works on one machine and not the other then it is likely something odd in the device numbering as handled by the BIOS. You can try using the mender-partuuid setup but I’m not sure how easy that is to do in mender-convert. If you grep through the [meta-mender sources](https://github.com/mendersoftware/meta-mender) for partuuid, that may give you an idea.

Drew
