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.

Armbian Debian - create boot image WITHOUT file system

Featured Replies

Hi guys,

 

I am currently working on backing up my armbian installation. Following situation:

 

boot: sd card

file system: nfs root

 

backing up the file system is not an issue, there I am using a rsync logic that transfers only changed files, which works great. The problem is with the boot files. In case of sd card failure I need an image that I can quickly restore to a new sd card, without the whole file system, as it is on nfs root and backed up differently.

 

Now my question is: what is the best way to create an image file with only the boot logic? On Raspbian this is simple, as the boot device is a fat32 partition, but on Armbian there is no separate partition I can use for that.

 

Help is much appreciated!

 

Thanks!
 

Bye

  • Author

these files are loaded from sd card, this is why I would like to backup them as an image file to be able to quickly restore them.

9 hours ago, Talkabout said:

On Raspbian this is simple


Raspbian is an OS and RPi is a (proprietary boot) hardware that must have FAT partition. It can't boot without ... The main problem we have with Armbian is that every hardware (family) has different method of booting. Only from the user perspective it looks (almost) the same. Because we cover more than one (simple) device, things are not simple.

 

In general you have boot loader(s) outside, below filesystem and stuff in the /boot + (optional) /lib/modules. 

 

Which device you are actually talking about?

  • Author

I am using RockPI. While rsyncing the file system all the folder (including /boot) are backed up, but to restore a damaged sd card currently I would need to install stock armbian and modify the boot files in order to boot from nfs root. I would like to simplify this process by creating a small "img" file that I can restore easily on sd card failure. Is there any way to do that?

 

Thanks!

Well if you are booting from sd now, you could use dd, etcher, win32diskimager or another tool to create a full image of the sd card. Then just write that to a backup sd. 

Or copy /boot to new sd with rsync and write bootloader manually. 

  • Author

My requirement is a little bit different: I would like to include this "boot image creation" into my backup process as an automatic action. Maybe the solution is to

 

- create temporary partition

- copy /boot to that partition

- install boot loader on this partition => this is something I do not know how to do it

- create img out of this partition

 

The problem is I am not really into the whole "boot thing" that is why I am asking for help (or maybe some howtos).

 

is the above process the best option?

 

Thanks!

You could just use dd to backup your sd into some image automatically? Might be big depending on the size of the sd card. Or just dd it to the image once, and for automatic backups mount the image as loop, and rsync /boot. No need to backup bootloader each time 

  • Author

hm..., possible but not very nice ;) Thanks for the hint!

 

So with Armbian the boot partition and ext4 root partition are basically the same? And the bootloader simply points to the /boot folder?

 

Bye

  • Author

Device is RockPI as mentioned above.

 

Your statement means that if I create a small partition, put only the /boot folder there and then export it via "dd" to an image file, restoring that to an SD should give me the ability to boot correctly?

You may test the following approach:

- have a look with `fdisk -l /dev/<sd card>` and find out where the first (and only) partition starts

- copy with `dd bs=512 if=/dev/<sd card> of=<imagefile> count=<start sector of first partition>  

- copy the contents of /boot to a different location

- look which file system features have been enabled for / (`tune2fs -l /dev/<sd card>`) 

- write the image file to a different sd card

- delete and recreate on the different sd card the first partition according to the space requirements of /boot, make sure that your starting sector count stays the same

- create a filesystem for the newly created partition and make sure that the features match the information you have gathered before, some bootloaders cannot deal with journaling nor with 64bit filesystems which are switched on by default 

- copy the contents of /boot back to your different sd card

 

As far as for the boot loader. We pack it with a process to burn it into the SD/eMMC. For examle, this board, is within repository:
https://apt.armbian.com/pool/main/l/linux-u-boot-rockpi-4b-legacy/linux-u-boot-legacy-rockpi-4b_19.11.3_arm64.deb

  • boot loader in binary form
  • script for flashing to correct location

You can extract the content of DEB package and DIY. 

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.