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 eMMC to MicroSD

Featured Replies

I couldn't find anything on the web, I looked everywhere.
With the dd command I can of course create a complete image of the eMMC anywhere, even on a network path, but I can't find anything that allows me to do what the "nand-sata-install.sh" script does, which formats the eMMC and populates it with all the contents of the MicroSD, appropriately adapting some files needed for booting.
It would be many useful to be able to do the exact opposite as well, i.e. clone eMMC to MicroSD, which would be useful to have a bootable backup with all the customizations performed on the eMMC, without having to go through the process of creating an image file.
I tried modifying the script to do this but could not do it, there is actually an option already there to do this but it doesn't work for me.
Surely there is someone better than me, I hope, who maybe has already done this.

nand-sata-install.sh

Edited by Erario

Since you are posting in the TV Box sub-forum, I'm assuming you are talking about a TV Box.  But you have't provided any informaion about your setup.  What TV Box do you have, what version of Armbian do you have (by version I mean the name of the image you downloaded, and where downloaded from).

  • Author

I solved with two scripts, the first one creates a dump to img in mounted Windows filesystem (to be executed only once), the second one keeps the image aligned via rsync as needed.

Edited by Erario

  • Author

Another excellent method that works perfectly is this.
The advantage of this script is that it succeeds in copying the entire filesystem to SD or USB drives without performing a mirror clone as with dd, so even if the destination is smaller than the source as long as it has the space needed for the actual space occupied.
I had been using it for years on RPI, I didn't think it was compatible with Armbian as well, instead it works great.
And by taking the correct version from here is already compatible with Armbian, also acts on correcting UUID on the target device to make it boot correctly after the clone.
If it works on my tvbox it will also work on any official Armbian distribution, so on any device... absolutely must have! :P

 

Booted disk: mmcblk2 63.7GB                Destination disk: mmcblk0 31.4GB
---------------------------------------------------------------------------
Part     Size    FS    Label           Part   Size    FS    Label
1 root    58.7G  ext4  --              1       29.3G  ext4  --
---------------------------------------------------------------------------
== Initialize: IMAGE partition table - forced by option ==
1 root                (6.7G used)    : RESIZE  MKFS  SYNC to mmcblk0p1
---------------------------------------------------------------------------
-e clone fstab edit    : edit mmcblk2p device entries to mmcblk0p.
Run setup script       : no.
Verbose mode           : no.
-----------------------:
** WARNING **          : All destination disk mmcblk0 data will be overwritten!
-----------------------:

Initialize and clone to the destination disk mmcblk0?  (yes/no): y
Optional destination ext type file system label (16 chars max):

Initializing
  Imaging past partition 1 start.
  => dd if=/dev/mmcblk2 of=/dev/mmcblk0 bs=1M count=8 ...
  Resizing destination disk last partition ...
    Resize success.
  Changing destination Disk ID ...
  => mkfs -t ext4  /dev/mmcblk0p1 ...

Syncing file systems (can take a long time)
Syncing mounted partitions:
  Mounting /dev/mmcblk0p1 on /mnt/clone
  => rsync // /mnt/clone with-root-excludes ...

     Editing /boot/armbianEnv.txt UUID to use 08477615-e9ee-4faa-8574-d58796f838ad for partition 1
     Editing /etc/fstab UUID to use 08477615-e9ee-4faa-8574-d58796f838ad for partition 1
===============================
Done with clone to /dev/mmcblk0
   Start - 14:56:29    End - 14:57:55    Elapsed Time - 1:26

 

Edited by Erario

  • SteeMan locked this topic
Guest
This topic is now closed to further replies.

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.