# Cannot execute binary file: Exec format error after copying DietPi to eMMC on NanoPi R5C

**URL:** <https://dietpi.com/forum/t/cannot-execute-binary-file-exec-format-error-after-copying-dietpi-to-emmc-on-nanopi-r5c/24684>\
**Category:** Troubleshooting\
**Created:** [16 November 2025 12:30 UTC](https://dietpi.com/forum/t/cannot-execute-binary-file-exec-format-error-after-copying-dietpi-to-emmc-on-nanopi-r5c/24684 "2025-11-16T12:30:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![temp](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/t/f04885/32.png) [@temp](https://dietpi.com/forum/u/temp)\
**Post date:** [16 November 2025 12:30 UTC](https://dietpi.com/forum/t/cannot-execute-binary-file-exec-format-error-after-copying-dietpi-to-emmc-on-nanopi-r5c/24684/1 "2025-11-16T12:30:18Z")

</div>

Hello DietPi community,

I’m trying to copy my DietPi installation from an SD card to the eMMC on my **NanoPi R5C** following the instructions from [this DietPi blog post](https://dietpi.com/blog/?p=1236).

The process seemed to complete without errors, but after rebooting from the eMMC, whenever I try to run a command, I get:

```auto
bash: <command>: cannot execute binary file: Exec format error

```

Here’s what I’ve checked so far:

- The SD card version works fine.
- I verified the architecture on the SD card: `uname -m` returns `aarch64` (64-bit ARM).
- I used `dd` to copy the SD card to the eMMC, targeting what I believe is the correct eMMC device.

I’m not sure if this is:

1. Something wrong with the way I copied the SD card to the eMMC.

Could someone advise the **correct way to clone DietPi to eMMC on the NanoPi R5C** without running into this “exec format” problem?

Any guidance would be greatly appreciated!

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![temp](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/t/f04885/32.png) [@temp](https://dietpi.com/forum/u/temp)\
**Post date:** [16 November 2025 13:20 UTC](https://dietpi.com/forum/t/cannot-execute-binary-file-exec-format-error-after-copying-dietpi-to-emmc-on-nanopi-r5c/24684/2 "2025-11-16T13:20:54Z")

</div>

this was my solution [NanoPi R5S image - #9 by Joulinar](https://dietpi.com/forum/t/nanopi-r5s-image/13841/9)

---

<div class="post-metadata">

**Author:** ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)\
**Post date:** [16 November 2025 13:44 UTC](https://dietpi.com/forum/t/cannot-execute-binary-file-exec-format-error-after-copying-dietpi-to-emmc-on-nanopi-r5c/24684/3 "2025-11-16T13:44:05Z")

</div>

Means it is working now?

---

<div class="post-metadata">

**Author:** ![temp](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/t/f04885/32.png) [@temp](https://dietpi.com/forum/u/temp)\
**Post date:** [16 November 2025 17:50 UTC](https://dietpi.com/forum/t/cannot-execute-binary-file-exec-format-error-after-copying-dietpi-to-emmc-on-nanopi-r5c/24684/4 "2025-11-16T17:50:22Z")

</div>

Yes but not according the how to on the blog I flashed the image directly on emmc

---

<div class="post-metadata">

**Author:** ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)\
**Post date:** [17 November 2025 16:43 UTC](https://dietpi.com/forum/t/cannot-execute-binary-file-exec-format-error-after-copying-dietpi-to-emmc-on-nanopi-r5c/24684/5 "2025-11-17T16:43:39Z")

</div>

That blog post is more meant for used instances, where you want to avoid starting from scratch with installing software etc. But it should work, of course.

Did you remove the SD card before trying to boot from eMMC?

Since you obviously did have console access, most commands seem to work fine, `systemd`, `bash` itself, and all the libraries and executables involved to bring up the system to that point. I guess all `bash` internals at least work, so `command -v <commen>` can be used to check the path of the command that fails with this error. And then that one could be further checked, its ELF headers etc, to see which architecture it has, comparing that to the kernel loaded.

However, seems to be irrelevant now, just in case someone else lands here with a similar issue.

---

<div class="post-metadata">

**Author:** ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)\
**Post date:** [15 February 2026 16:44 UTC](https://dietpi.com/forum/t/cannot-execute-binary-file-exec-format-error-after-copying-dietpi-to-emmc-on-nanopi-r5c/24684/6 "2026-02-15T16:44:31Z")

</div>

Closed on 15 February 2026 16:44 UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
