Jump to content

Recommended Posts

Posted

I have written a shell script that can make your Armbian installation run on a ZFS root. It has not been tested enough for my liking. Use at your own risk. Before running this script, please make a full backup of all your mission-critical files.

 

URL: https://www.dropbox.com/s/ya3expllg1bqgfg/fructify.20211011.sh.gz

 

To install the script, please run these commands:-

# sudo wget https://www.dropbox.com/s/ya3expllg1bqgfg/fructify.20211011.sh.gz -O /usr/local/bin/fructify.sh.gz

# sudo gunzip /usr/local/bin/fructify.sh.gz

# sudo chmod +x /usr/local/bin/fructify.sh

 

Oh, and install ZFS on your own OS installation.

 

To use the script, either download an existing Armbian image or use your own system as the basis for the new installation. Next, please make sure (i) there is a blank micro-SD card in an adapter, (ii) the adapter is plugged into a USB port, and (iii) you know which /dev entry refers to that adapter’s USB port. It will probably be /dev/sda; please do not assume so. In the below commands, replace sdX with sda (or whatever).

 

Method 1: Download and use an existing Armbian image

# wget https://mirrors.netix.net/armbian/dl/nanopineo3/archive/Armbian_21.08.1_Nanopineo3_focal_current_5.10.60.img.xz -O /root/npneo3_focal.img.xz

# xz -d /root/npneo3_focal.img.xz

# fructify.sh /root/npneo3_focal.img.xz zfs /root/out.img

# dd status=progress bs=1024k if=/root/out.img of=/dev/sdX

 

Method 2: Use your existing filesystem as the basis

# fructify.sh / zfs /dev/sdX

 

In either case, please take care not to write the image to the wrong device.

 

This script can also work with btrfs, ext4, or xfs.

 

The script assumes that you have only one partition on your boot drive. That drive is usually /dev/mmcblk0; the boot/root partition is expected to be /dev/mmcblk0p1. It may be that the script also works if the boot drive is /dev/mmcblk1 and the boot/root partition is /dev/mmcblk1p1; I do not know. In any case, the script shrinks partition #1 (for boot) and allocates approximately 4GB to a newly created partition #2 (for root).

 

If you create a ready-to-install Armbian image and boot it on a micro-SD card, the OS will expand partition #2 to fill the remainder of the micro-SD card. If you create a ZFS-ified (or whatever) copy of your existing installation, the SD card’s second partition will already have been expanded by the script itself.

 

All feedback is welcome. I am new at this. Thank you.

 

  • TangerineToupée changed the title to Running Armbian on a ZFS, BTRFS, or XFS root filesystem
This thread is quite old. Please consider starting a new thread rather than reviving this one.

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines