# Mender-convert fails because of unknown arch

**URL:** https://hub.mender.io/t/mender-convert-fails-because-of-unknown-arch/3303
**Category:** General Discussions
**Created:** [March 5, 2021, 12:24pm UTC](https://hub.mender.io/t/mender-convert-fails-because-of-unknown-arch/3303 "2021-03-05T12:24:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![trailsurfer](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@trailsurfer](https://hub.mender.io/u/trailsurfer)
#### Post date: [March 5, 2021, 12:24pm UTC](https://hub.mender.io/t/mender-convert-fails-because-of-unknown-arch/3303/1 "2021-03-05T12:24:31Z")

</div>

I am trying to convert a image of a x86 linux system with mender-convert,  
its the second convert that I run. The first try with another linux x86 machine worked well,  
I was able to install the result of the deploy folder. But at the second try with another image and the same configuration of mender-convert I get a error message:  
[…]  
2021-03-05 12:01:14 [FATAL] [mender-convert-modify] Unknown arch:

Does anybody of the experts has a Idea what went wrong? The only difference at the second image is, that the disk has been converted from MBR to GPT with UEFI before, to make it fit for mender.

> /data/sandbox/mender-convert$ MENDER\_ARTIFACT\_NAME=release-2021-3-5-A ./docker-mender-convert --disk-image input/mdm-dell-server\_20210304-uefi.img --config configs/generic\_x86-64\_hdd\_config  
> Running mender-convert --disk-image input/mdm-dell-server\_20210304-uefi.img --config configs/generic\_x86-64\_hdd\_config  
> Running mender-convert-extract: --disk-image input/mdm-dell-server\_20210304-uefi.img --config configs/generic\_x86-64\_hdd\_config  
> 2021-03-05 11:56:01 [INFO] [mender-convert-extract] Using configuration file: configs/mender\_convert\_config  
> 2021-03-05 11:56:01 [INFO] [mender-convert-extract] Using configuration file: configs/generic\_x86-64\_hdd\_config  
> 2021-03-05 11:56:01 [INFO] [mender-convert-extract] Validating disk image  
> 2021-03-05 11:56:01 [INFO] [mender-convert-extract] Disk parsed successfully  
> 2021-03-05 11:56:01 [INFO] [mender-convert-extract] NUMBER OF PARTS: 5 TYPE: gpt  
> 2021-03-05 11:56:01 [INFO] [mender-convert-extract] PART 1: SIZE: 15.8G TYPE: 0fc63daf-8483-xxxx-xxxx-3d69d8477de4  
> 2021-03-05 11:56:01 [INFO] [mender-convert-extract] PART 1: extracting to work/part-1.fs  
> 2021-03-05 11:58:57 [INFO] [mender-convert-extract] PART 2: SIZE: 10G TYPE: 0fc63daf-8483-xxxx-xxxx-3d69d8477de4  
> 2021-03-05 11:58:57 [INFO] [mender-convert-extract] PART 2: extracting to work/part-2.fs  
> 2021-03-05 12:00:31 [INFO] [mender-convert-extract] PART 3: SIZE: 15M TYPE: 21686148-xxxx-xxxx-744e-656564454649  
> 2021-03-05 12:00:31 [INFO] [mender-convert-extract] PART 3: extracting to work/part-3.fs  
> 2021-03-05 12:00:31 [INFO] [mender-convert-extract] PART 4: SIZE: 10G TYPE: 0fc63daf-8483-4772-8e79-3d69d8477de4  
> 2021-03-05 12:00:31 [INFO] [mender-convert-extract] PART 4: extracting to work/part-4.fs  
> 2021-03-05 12:01:11 [INFO] [mender-convert-extract] PART 5: SIZE: 512M TYPE: c12a7328-f81f-11d2-ba4b-xxx  
> 2021-03-05 12:01:11 [INFO] [mender-convert-extract] PART 5: extracting to work/part-5.fs  
> mender-convert-extract has finished. Cleaning up…  
> Running mender-convert-modify: --disk-image input/mdm-dell-server\_20210304-uefi.img --config configs/generic\_x86-64\_hdd\_config  
> 2021-03-05 12:01:13 [INFO] [mender-convert-modify] Using configuration file: configs/mender\_convert\_config  
> 2021-03-05 12:01:13 [INFO] [mender-convert-modify] Using configuration file: configs/generic\_x86-64\_hdd\_config  
> 2021-03-05 12:01:14 [INFO] [mender-convert-modify] Installing Mender client and related files  
> 2021-03-05 12:01:14 [FATAL] [mender-convert-modify] Sorry, not able to determine target architecture  
> 2021-03-05 12:01:14 [FATAL] [mender-convert-modify] Unknown arch:  
> mender-convert-modify has finished. Cleaning up…

---

<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: [March 5, 2021, 3:21pm UTC](https://hub.mender.io/t/mender-convert-fails-because-of-unknown-arch/3303/2 "2021-03-05T15:21:23Z")

</div>

I suspect our probing just doesn’t handle your image properly. There are 3 functions in modules/probe.sh that return that string. I suspect that one of them may need some more logic to properly parse your input image.

- [mender-convert/probe.sh at 407351f500eee3e0bd1e472e1348798a605b6f23 · mendersoftware/mender-convert · GitHub](https://github.com/mendersoftware/mender-convert/blob/407351f500eee3e0bd1e472e1348798a605b6f23/modules/probe.sh#L56)
- [mender-convert/probe.sh at 407351f500eee3e0bd1e472e1348798a605b6f23 · mendersoftware/mender-convert · GitHub](https://github.com/mendersoftware/mender-convert/blob/407351f500eee3e0bd1e472e1348798a605b6f23/modules/probe.sh#L80)
- [mender-convert/probe.sh at 407351f500eee3e0bd1e472e1348798a605b6f23 · mendersoftware/mender-convert · GitHub](https://github.com/mendersoftware/mender-convert/blob/407351f500eee3e0bd1e472e1348798a605b6f23/modules/probe.sh#L106)

We happily accept pull requests so if you find a fix please submit it back.

---

<div class="post-metadata">

### Author: ![Dirk](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dirk/32/1289_2.png) [@Dirk](https://hub.mender.io/u/Dirk)
#### Post date: [April 8, 2021, 12:27pm UTC](https://hub.mender.io/t/mender-convert-fails-because-of-unknown-arch/3303/3 "2021-04-08T12:27:35Z")

</div>

Hi @trailsurfer,

how did you solved your problem?I opened a new ticket with the same error.

thanx  
Dirk

---

<div class="post-metadata">

### Author: ![trailsurfer](https://avatars.discourse-cdn.com/v4/letter/t/87869e/32.png) [@trailsurfer](https://hub.mender.io/u/trailsurfer)
#### Post date: [April 9, 2021, 7:15am UTC](https://hub.mender.io/t/mender-convert-fails-because-of-unknown-arch/3303/4 "2021-04-09T07:15:52Z")

</div>

Hi, Thank you very much for your Mail.

I had multiple problems with mender-convert.

The „unknown arch“ problem was solved by changing modules/probe.sh

and make the function returning as “${target\_arch}” directly the value target\_arch=“x86-64”

probe\_arch() {

target\_arch=“x86-64”

echo “${target\_arch}”

}

I guess that there was no bug in Mender-convert that caused the problem.

The second problem was regarding the disc partitions sequence.

I solved the problem by changing the sequence of my disc partitions,

The first disk image that I tried to use with mender-convert das the boot partition at partition #4, the linux partition was #2.

I created a new GPT disk with boot partition at #1 and linux partition at #2, gave this to mender-convert, and everything was just fine.

Thanks and best regards for your help,

Alexander
