Transfer Installed OS
Armbian provides a utility called nand-sata-install to transfer OS from SD card to other device such as USB, SATA, or NVMe. The utility can be invoke directly,
sudo nand-sata-install
or the recommended way, through armbian-config
sudo armbian-config
Helios64 support following boot mode
Boot Device | System / Rootfs Device |
---|---|
eMMC | eMMC SATA Drive USB Drive |
Boot device contains bootloader and other boot files such as kernel and DTB. It will be mounted under /boot/ if it resides on separate device.
Notes
nand-sata-install requires the target device to be already partitioned!
Important
If you have installed and configured OMV, please read Existing OS Has OMV Installed section before transferring the OS.
System on eMMC¶
Step 1 - Run Armbian Configuration Utility
Step 2 - Select Install Menu
Step 3 - Select Boot from eMMC - system on eMMC
Step 4 - Confirm that the process will erase data on eMMC
Step 5 - Select filesystem type for eMMC
Step 6 - Wait for transfer process to complete
Step 7 - Power Off Helios64 if you don't have OMV Installed
DO NOT power off if you have installed OMV. There are several OMV files & folders not transferred by nand-sata-install. Please refer to After running nand-sata-install section before continue to next step.
Step 8 - Remove Micro SD card and power on the system
Step 9 - Verify if the system transferred correctly
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk
└─sda1 8:1 0 111.8G 0 part
sdb 8:16 0 111.8G 0 disk
└─sdb1 8:17 0 111.8G 0 part
sdc 8:32 1 28.7G 0 disk
└─sdc1 8:33 1 28.4G 0 part
mmcblk1 179:0 0 14.6G 0 disk
└─mmcblk1p1 179:1 0 14.4G 0 part /
mmcblk1boot0 179:32 0 4M 1 disk
mmcblk1boot1 179:64 0 4M 1 disk
zram0 251:0 0 50M 0 disk /var/log
zram1 251:1 0 1.9G 0 disk [SWAP]
You should see mmcblk1p1 has MOUNTPOINT /
System on USB or SATA (Including M.2 SATA)¶
List available block devices and determine the type by running
lsblk
ls -l /sys/block/
Example output:
dev@helios64:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk
└─sda1 8:1 0 111.8G 0 part
sdb 8:16 0 111.8G 0 disk
└─sdb1 8:17 0 111.8G 0 part
sdc 8:32 1 28.7G 0 disk
└─sdc1 8:33 1 28.4G 0 part
mmcblk0 179:0 0 14.9G 0 disk
└─mmcblk0p1 179:1 0 14.7G 0 part /
mmcblk1 179:32 0 14.6G 0 disk
└─mmcblk1p1 179:33 0 14.4G 0 part
mmcblk1boot0 179:64 0 4M 1 disk
mmcblk1boot1 179:96 0 4M 1 disk
zram0 251:0 0 50M 0 disk /var/log
zram1 251:1 0 1.9G 0 disk [SWAP]
dev@helios64:~# ls -l /sys/block/
total 0
lrwxrwxrwx 1 root root 0 Nov 5 10:13 loop0 -> ../devices/virtual/block/loop0
lrwxrwxrwx 1 root root 0 Nov 5 10:13 loop1 -> ../devices/virtual/block/loop1
lrwxrwxrwx 1 root root 0 Nov 5 10:13 loop2 -> ../devices/virtual/block/loop2
lrwxrwxrwx 1 root root 0 Nov 5 10:13 loop3 -> ../devices/virtual/block/loop3
lrwxrwxrwx 1 root root 0 Nov 5 10:13 loop4 -> ../devices/virtual/block/loop4
lrwxrwxrwx 1 root root 0 Nov 5 10:13 loop5 -> ../devices/virtual/block/loop5
lrwxrwxrwx 1 root root 0 Nov 5 10:13 loop6 -> ../devices/virtual/block/loop6
lrwxrwxrwx 1 root root 0 Nov 5 10:13 loop7 -> ../devices/virtual/block/loop7
lrwxrwxrwx 1 root root 0 Nov 5 10:13 mmcblk0 -> ../devices/platform/fe320000.mmc/mmc_host/mmc0/mmc0:aaaa/block/mmcblk0
lrwxrwxrwx 1 root root 0 Nov 5 10:13 mmcblk1 -> ../devices/platform/fe330000.sdhci/mmc_host/mmc1/mmc1:0001/block/mmcblk1
lrwxrwxrwx 1 root root 0 Nov 5 10:13 mmcblk1boot0 -> ../devices/platform/fe330000.sdhci/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1boot0
lrwxrwxrwx 1 root root 0 Nov 5 10:13 mmcblk1boot1 -> ../devices/platform/fe330000.sdhci/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1boot1
lrwxrwxrwx 1 root root 0 Nov 5 10:13 sda -> ../devices/platform/f8000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ata1/host0/target0:0:0/0:0:0:0/block/sda
lrwxrwxrwx 1 root root 0 Nov 5 10:13 sdb -> ../devices/platform/f8000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb
lrwxrwxrwx 1 root root 0 Nov 5 10:13 sdc -> ../devices/platform/usb@fe900000/fe900000.usb/xhci-hcd.0.auto/usb2/2-1/2-1.3/2-1.3:1.0/host5/target5:0:0/5:0:0:0/block/sdc
lrwxrwxrwx 1 root root 0 Nov 5 10:13 zram0 -> ../devices/virtual/block/zram0
lrwxrwxrwx 1 root root 0 Nov 5 10:13 zram1 -> ../devices/virtual/block/zram1
lrwxrwxrwx 1 root root 0 Nov 5 10:13 zram2 -> ../devices/virtual/block/zram2
From output above, the types are:
Block Device | Physical drive | Remarks |
---|---|---|
mmcblk0 | micro SD card | |
mmcblk1 | eMMC | |
sda | SATA or M.2 drive connected to Port 1 | ../devices/platform/f8000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ata1/ |
sdb | SATA drive connected to Port 4 | ../devices/platform/f8000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ata4/ |
sdc | USB drive connected to USB Port 3 (Front Panel) | ../devices/platform/usb@fe900000/fe900000.usb/xhci-hcd.0.auto/usb2/2-1/2-1.3/ |
Step 1 - Run Armbian Configuration Utility
sudo armbian-config
Step 2 - Select Install Menu
Step 3 - Select Boot from eMMC - system on SATA, USB or NVMe
Step 4 - Select storage device and partition for rootfs*
SATA drive at port 1 as System drive
USB drive as System drive
Step 5 - Confirm that the process will erase data on eMMC and system partition
Step 6 - Select filesystem type for eMMC
Wait until formatting process completed
Step 7 - Select filesystem type for system partition
Wait until formatting process is completed
Step 8 - Wait for transfer process to be completed
Step 9 - Power Off Helios64 if you don't have OMV Installed
DO NOT power off if you have installed OMV. There are several OMV files & folders not transferred by nand-sata-install. Please refer to After running nand-sata-install section before continue to next step.
Step 10 - Remove Micro SD card and power on the system
Step 11 - Verify if the system transferred correctly
System on SATA or M.2
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk
└─sda1 8:1 0 111.8G 0 part /
sdb 8:16 0 111.8G 0 disk
└─sdb1 8:17 0 111.8G 0 part
sdc 8:32 1 28.7G 0 disk
└─sdc1 8:33 1 28.4G 0 part
mmcblk1 179:0 0 14.6G 0 disk
└─mmcblk1p1 179:1 0 14.4G 0 part /media/mmcboot
mmcblk1boot0 179:32 0 4M 1 disk
mmcblk1boot1 179:64 0 4M 1 disk
zram0 251:0 0 50M 0 disk /var/log
zram1 251:1 0 1.9G 0 disk [SWAP]
You should see SATA drive at Port 1 has MOUNTPOINT / and eMMC has MOUNTPOINT /media/mmcboot
System on USB
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk
└─sda1 8:1 0 111.8G 0 part
sdb 8:16 0 111.8G 0 disk
└─sdb1 8:17 0 111.8G 0 part
sdc 8:32 1 28.7G 0 disk
└─sdc1 8:33 1 28.4G 0 part /
mmcblk1 179:0 0 14.6G 0 disk
└─mmcblk1p1 179:1 0 14.4G 0 part /media/mmcboot
mmcblk1boot0 179:32 0 4M 1 disk
mmcblk1boot1 179:64 0 4M 1 disk
zram0 251:0 0 50M 0 disk /var/log
zram1 251:1 0 1.9G 0 disk [SWAP]
You should see USB drive has MOUNTPOINT / and eMMC has MOUNTPOINT /media/mmcboot
Transfer rootfs from eMMC to SATA or USB¶
List available block devices and determine the type by running
lsblk
ls -l /sys/block/
Example output:
dev@helios64:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk
└─sda1 8:1 0 111.8G 0 part
sdb 8:16 0 111.8G 0 disk
└─sdb1 8:17 0 111.8G 0 part
sdc 8:32 1 28.7G 0 disk
└─sdc1 8:33 1 28.4G 0 part
mmcblk1 179:0 0 14.6G 0 disk
└─mmcblk1p1 179:1 0 14.4G 0 part /
mmcblk1boot0 179:32 0 4M 1 disk
mmcblk1boot1 179:64 0 4M 1 disk
dev@helios64:~$ ls -l /sys/block
total 0
lrwxrwxrwx 1 root root 0 Nov 11 04:19 loop0 -> ../devices/virtual/block/loop0
lrwxrwxrwx 1 root root 0 Nov 11 04:19 loop1 -> ../devices/virtual/block/loop1
lrwxrwxrwx 1 root root 0 Nov 11 04:19 loop2 -> ../devices/virtual/block/loop2
lrwxrwxrwx 1 root root 0 Nov 11 04:19 loop3 -> ../devices/virtual/block/loop3
lrwxrwxrwx 1 root root 0 Nov 11 04:19 loop4 -> ../devices/virtual/block/loop4
lrwxrwxrwx 1 root root 0 Nov 11 04:19 loop5 -> ../devices/virtual/block/loop5
lrwxrwxrwx 1 root root 0 Nov 11 04:19 loop6 -> ../devices/virtual/block/loop6
lrwxrwxrwx 1 root root 0 Nov 11 04:19 loop7 -> ../devices/virtual/block/loop7
lrwxrwxrwx 1 root root 0 Nov 11 04:19 mmcblk1 -> ../devices/platform/fe330000.sdhci/mmc_host/mmc1/mmc1:0001/block/mmcblk1
lrwxrwxrwx 1 root root 0 Nov 11 04:19 mmcblk1boot0 -> ../devices/platform/fe330000.sdhci/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1boot0
lrwxrwxrwx 1 root root 0 Nov 11 04:19 mmcblk1boot1 -> ../devices/platform/fe330000.sdhci/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1boot1
lrwxrwxrwx 1 root root 0 Nov 11 04:19 sda -> ../devices/platform/f8000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ata1/host0/target0:0:0/0:0:0:0/block/sda
lrwxrwxrwx 1 root root 0 Nov 11 04:19 sdb -> ../devices/platform/f8000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ata4/host3/target3:0:0/3:0:0:0/block/sdb
lrwxrwxrwx 1 root root 0 Nov 11 04:19 sdc -> ../devices/platform/usb@fe900000/fe900000.usb/xhci-hcd.0.auto/usb2/2-1/2-1.3/2-1.3:1.0/host5/target5:0:0/5:0:0:0/block/sdc
From output above, the types are:
Block Device | Physical drive | Remarks |
---|---|---|
mmcblk1 | eMMC | |
sda | SATA or M.2 drive connected to Port 1 | ../devices/platform/f8000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ata1/ |
sdb | SATA drive connected to Port 4 | ../devices/platform/f8000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/ata4/ |
sdc | USB drive connected to USB Port 3 (Front Panel) | ../devices/platform/usb@fe900000/fe900000.usb/xhci-hcd.0.auto/usb2/2-1/2-1.3/ |
Step 1 - Run Armbian Configuration Utility
sudo armbian-config
Step 2 - Select Install Menu
Step 3 - Select Boot from SD - system on SATA, USB or NVMe
Info
The utility has flaw that it mistakenly read current boot device as SD card instead of eMMC. But it actually set the eMMC as boot device and system on SATA or USB device.
Step 4 - Select storage device and partition for rootfs
SATA drive at port 1 as System drive
USB drive as System drive
Step 5 - Confirm that the process will erase data on eMMC and system partition
Step 6 - Select filesystem type for eMMC
Wait until formatting process is completed
Step 7 - Wait for transfer process to be completed
Step 8 - Reboot Helios64 if you don't have OMV Installed
DO NOT reboot if you have installed OMV. There are several OMV files & folders not transferred by nand-sata-install. Please refer to After running nand-sata-install section before continue to next step.
Step 9 - Power on the system
Step 10 - Verify if the system transferred correctly
System on SATA or M.2
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk
└─sda1 8:1 0 111.8G 0 part /
sdb 8:16 0 111.8G 0 disk
└─sdb1 8:17 0 111.8G 0 part
sdc 8:32 1 28.7G 0 disk
└─sdc1 8:33 1 28.4G 0 part
mmcblk1 179:0 0 14.6G 0 disk
└─mmcblk1p1 179:1 0 14.4G 0 part /media/mmcboot
mmcblk1boot0 179:32 0 4M 1 disk
mmcblk1boot1 179:64 0 4M 1 disk
zram0 251:0 0 50M 0 disk /var/log
zram1 251:1 0 1.9G 0 disk [SWAP]
You should see SATA drive at Port 1 has MOUNTPOINT / and eMMC has MOUNTPOINT /media/mmcboot
System on USB
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111.8G 0 disk
└─sda1 8:1 0 111.8G 0 part
sdb 8:16 0 111.8G 0 disk
└─sdb1 8:17 0 111.8G 0 part
sdc 8:32 1 28.7G 0 disk
└─sdc1 8:33 1 28.4G 0 part /
mmcblk1 179:0 0 14.6G 0 disk
└─mmcblk1p1 179:1 0 14.4G 0 part /media/mmcboot
mmcblk1boot0 179:32 0 4M 1 disk
mmcblk1boot1 179:64 0 4M 1 disk
zram0 251:0 0 50M 0 disk /var/log
zram1 251:1 0 1.9G 0 disk [SWAP]
You should see USB drive has MOUNTPOINT / and eMMC has MOUNTPOINT /media/mmcboot
Existing OS Has OMV Installed¶
Transferring rootfs using nand-sata-install will break OMV due to missing files. To prevent this, you need to perform the following actions.
Preparation before running nand-sata-install¶
If you have configured NFS share located on SATA drive(s), you might like to prevent the content to be copied over to eMMC. run following command to prevent it
echo "/export/*" | sudo tee -a /usr/lib/nand-sata-install/exclude.txt
Lastly, if you're using ZFS, which by default mounts to /
After running nand-sata-install¶
OMV 5 stores part of its config (salt and pillar folders) in /srv/ which are excluded by nand-sata-install.
Before power off the system to finalize the system transfer, we need to mount system partition and copy those folders into it and finally power off the system.
sudo mkdir -p /mnt/system
sudo mount /dev/sda1 /mnt/system
sudo cp -rf -t /mnt/system/srv/ /srv/salt /srv/pillar
sudo poweroff
Note
Pay attention to block device of system partition at second command. In this case /dev/sda1 is SATA drive at Port 1.
Now you can resume back to the steps your were following.
After rebooting¶
Once you are done transferring the OS to new location and have restarted your system, OMV might not mount the drives you have configured previously because the fstab hasn't been regenerated properly. However, the mount configuration is still there in the OMV configuration files you have transferred. You will just need to regenerate the fstab file by using the following command.
sudo omv-salt deploy run fstab