Now to add new type of filesystem for root of armbian image (xfs as example)


1 1

Recommended Posts

I did a patch to allow armbian build system produce image with root on xfs filesystem.

Kernel should have build-in filesystem support, and `RELEASE` have to contain required filesystem utilities. Then all need to be done — add filesystem to build process. Patch for builder attached.

Then image have to be build with separate /boot filesystem.

command should look like


diff --git a/lib/ b/lib/
index b825ca4b..2a65e075 100644
--- a/lib/
+++ b/lib/
@@ -41,7 +41,7 @@ fi
 [[ -z $ROOTFS_TYPE ]] && ROOTFS_TYPE=ext4 # default rootfs type is ext4
-[[ "ext4 f2fs btrfs nfs fel" != *$ROOTFS_TYPE* ]] && exit_with_error "Unknown rootfs type" "$ROOTFS_TYPE"
+[[ "ext4 f2fs btrfs xfs nfs fel" != *$ROOTFS_TYPE* ]] && exit_with_error "Unknown rootfs type" "$ROOTFS_TYPE"
 [[ -z $BTRFS_COMPRESSION ]] && BTRFS_COMPRESSION=zlib # default btrfs filesystem compression method is zlib
 [[ ! $BTRFS_COMPRESSION =~ zlib|lzo|zstd|none ]] && exit_with_error "Unknown btrfs compression method" "$BTRFS_COMPRESSION"
@@ -154,6 +154,8 @@ PACKAGE_LIST="bc cpufrequtils device-tree-compiler fping fake-hwclock psmisc chr
         ncurses-term sysfsutils toilet figlet u-boot-tools usbutils openssh-server \
         nocache debconf-utils python3-apt"
+[[ $ROOTFS_TYPE == xfs ]] && PACKAGE_LIST="$PACKAGE_LIST xfsprogs"
 # Non-essential packages for minimal build
 PACKAGE_LIST_ADDITIONAL="network-manager wireless-tools lsof htop mmc-utils wget nano sysstat net-tools resolvconf iozone3 jq libcrack2 cracklib-runtime curl"
diff --git a/lib/ b/lib/
index f47816ed..ccfd0ac0 100644
--- a/lib/
+++ b/lib/
@@ -315,6 +315,7 @@ prepare_partitions()
     parttype[f2fs]=ext4 # not a copy-paste error
+    parttype[xfs]=xfs
     # parttype[nfs] is empty
     # metadata_csum and 64bit may need to be disabled explicitly when migrating to newer supported host OS releases
@@ -327,6 +328,7 @@ prepare_partitions()
     # mkopts[f2fs] is empty
     mkopts[btrfs]='-m dup'
+    # mkopts[xfs] is empty
     # mkopts[nfs] is empty
@@ -334,6 +336,7 @@ prepare_partitions()
+    mkfs[xfs]=xfs
     # mkfs[nfs] is empty
@@ -341,6 +344,7 @@ prepare_partitions()
     # mountopts[fat] is empty
     # mountopts[f2fs] is empty
+    # mountopts[xfs] is empty
     # mountopts[nfs] is empty
     # default BOOTSIZE to use if not specified



Link to post
Share on other sites

Armbian is a community driven open source project. Do you like to contribute your code?

  • iav changed the title to Now to add new type of filesystem for root of armbian image (xfs as example)

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.

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.


1 1