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.

Create backup boot SD by script

Featured Replies

I have a NanoPi Neo V1.4 running Armbian 23.8.1 bullseye with kernel nanopineo 6.1.63-current-sunxi.

Now, that I got my micro-USB port working for a SD card holder, I want to programmatically backup my boot SD on a regular base to another SD.

Yes, it works by a full dd-copy. but this is quite time consuming and I want to skip some directories while backup, which does not work with dd.

 

The idea:

  • Take a new SD (same model as source SD)
  • Create a new partition table and a primary partition 1 with fully equal parameters as my source SD
  • Format partition 1 with ext4 and mount to /mnt
  • rsync all files (exclude some directories as e.g. /var/log) from source / to target / (which is /mnt/)
  • Use this SD in case of a problem with the source SD as new boot SD

 

In /boot/armbianEnv.txt i have rootdev=/dev/mmcblk0p1. No UUID used.

 

But, it just does not boot. The LED's of my NanoPi stay on with no blinking at all. Nothing is written to /var/log.

Unfortunately I cannot connect a console to the NanoPi to see the boot messages. Only SSH at this time.

 

What is missing on the new SD? I assume something with the U-Boot bootloader?

 

Can anybody help me? What is missing and needs to be copied to the SD? I assume to the bytes 512-8192 just in front of partition 1 and after the partition table.

Even that a full dd works, I'd like to know how to do that manually.

 

Thanks a lot for help 🙂

Edited by mdrmdr

  • Author

Why is it always the case that after asking for help, you keep looking and then you find the solution? 😉

 

The SD boots using the instructions on this page: https://docs.armbian.com/User-Guide_Recovery/#flashing-boot-loader

In my case using this U-Boot files: https://mirrors.dotsrc.org/armbian-apt/pool/main/l/linux-u-boot-nanopineo-current/

 

Maybe this helps someone having the same issue.

 

Update question:

Maybe one can answer that: I did use u-boot-sunxi-with-spl.bin from the above URL, which works perfectly well.

Why does the same file from https://ftp.de.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/u-boot/NanoPiNeo/ not work?

With the one from the Debian site, the NanoPi does not boot. To write I use: dd if=u-boot-sunxi-with-spl.bin of=/dev/sda bs=8k seek=1

 

Update 2:

Guess I found my error. The Debian U-Boot file is just not made for an NanoPi Neo running Armbian.

I'm now using the one which comes with the installation, which is /usr/lib/linux-u-boot-current-nanopineo/u-boot-sunxi-with-spl.bin. This works fine.

Edited by mdrmdr

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.