Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Clone any Armbian emmc|microSD with dd using Linux

Featured Replies

I can not reiterate enough just how easy it is to "clone" your modified emmc, or microSD card OS, ... into an image file that you can easily restore with (balena)Ethcher afterwards, and all withiin Linux.

 

1:/ you'll need a USB-card-reader-adapter.

2:/ no matter how your USB-reader card reader sees your emmc, microSD card, ..., it'll most likely be mounted on a /dev/sda1 partition.

3:/ sudo dd bs=4M if=/dev/sda of=~/tmp/armbian_odroidc4_11_01_2025.img
(you don't dd the partition, you dd the drive).

4:/ (optionally) sudo xz -v armbian_odroidc4_11_01_2025.img  
(this will take some time).

 

...and that's it, ... and you know the rest.

Edited by rin
spacing

  • rin changed the title to Clone any Armbian emmc|microSD with dd using Linux

Very cool. I didn't realize it could be that easy. Great (but potentially slow) for making backups.

Here's the "tricky parts" that I'm still trying to figure out...

- cloning a larger drive that only has part of it used to a smaller drive that has room for the used part.

- changing the UUID/boot info so that you can clone a µSD to the eMMC and still have it boot from either one.

Edited by Meestor_X

That tool is great for backing up, but not doing the UUID/boot change I need. I have to see if I can find some documentation on how to copy and change the boot info as staring at the source code of armbian-install (where this is solved) is making my eyes hurt. 😉

Edited by Meestor_X

Can I not just dd a downloaded armbian image file directly to the emmc? i.e. put the image file in a folder on the µSD card or on an external flash drive and dd it to the emmc?

I tried that but it doesn't seem to work. I don't end up with a bootable emmc.

 

-EDIT-

NM. Stupid user error. I didn't decompress the image file before copying. Works fine once I do that.

Edited by Meestor_X

I was extremely excited to read this. My issue currently is that I'm dealing with S805 and H3 builds which had builds dominated by the megalomaniacal user whose name starts with "B" (really not a fan of their behavior but extremely impressive work). 
For some reason, these builds never come with the install.sh scripts that Amlogic builds normally come with, and I can only write S805 builds to eMMC using builds with the 5.7/3.10 kernel to eMMC because they come with an install.sh. I really want to "finish" the builds by writing them.
I'm hoping to use dd to write to the eMMC but it doesn't come up with lsblk at all (except with the 3.10 kernel).
Does anyone have any suggestions about how to get around this?

On 1/12/2025 at 2:31 PM, rin said:

3:/ sudo dd bs=4M if=/dev/sda of=~/tmp/armbian_odroidc4_11_01_2025.img

 

You forgot to mention a very important caveat, in that all filesystems on that device sda should be unmounted when you dd (BTW, pv is cooler than dd for this).  That means, you have to boot off a different device.

 

"sudo dd bs=4M if=/dev/sda | xz -v armbian_odroidc4_11_01_2025.img.xz" gets you the desired compression in one go.  | is called a pipe.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.