Jump to content

Gabriel Becker

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks for the replies. I understand that native UFS boot support is still very new, and that ext4 is currently the safest and expected path. After some more testing, I managed to get a separate ext4 /boot + btrfs / layout working on my NanoPi M5 with the onboard 64GB UFS. This is not a request for official support, and I do not want to imply that this is a recommended or fully tested solution. I am only sharing it as an experimental helper script for users who may want to test a similar layout. ============================================================ WORKING LAYOUT ============== The layout I tested successfully is: * /dev/sda1: ext4, mounted as /boot, LABEL=BOOT * /dev/sda2: btrfs, mounted as /, LABEL=ROOT * btrfs subvolume @ mounted as / * btrfs subvolume @snapshots mounted as /.snapshots The reason this works is that U-Boot only needs to read /boot from ext4. The Linux kernel and initramfs can then mount the root filesystem as btrfs. ============================================================ WHAT THE SCRIPT DOES ==================== The attached script does the following: 1. Checks that it is running as root. 2. Checks that the system is not currently running from UFS. 3. Checks that the expected UFS LUN devices exist. 4. Mounts an official Armbian NanoPi M5 image read-only through a loop device. 5. Creates a minimal safety backup. 6. Wipes and repartitions the UFS General LUN. 7. Creates an ext4 /boot partition starting at 32MiB. 8. Creates a btrfs root partition after /boot. 9. Creates btrfs subvolumes @ and @snapshots. 10. Sets @ as the default btrfs subvolume. 11. Copies the root filesystem from the Armbian image to the btrfs root. 12. Copies /boot from the Armbian image to the ext4 /boot partition. 13. Writes /etc/fstab. 14. Updates /boot/armbianEnv.txt with: rootdev=LABEL=ROOT rootfstype=btrfs 15. Ensures btrfs support is included in the target initramfs. 16. Regenerates /boot/boot.scr. 17. Uses the official write_uboot_platform_ufs() function from the image to write the UFS bootloader. 18. Performs some basic validation before finishing. The script does not patch boot.cmd. Instead, it relies on: * rootdev=LABEL=ROOT * rootfstype=btrfs * btrfs default subvolume set to @ This keeps the boot script closer to the official Armbian files. ============================================================ IMPORTANT NOTES =============== This script is destructive. It wipes the UFS General LUN. It assumes the usual NanoPi M5 UFS mapping: * /dev/sda = UFS General LUN * /dev/sdb = UFS Boot LUN A * /dev/sdc = UFS Boot LUN B * /dev/sdd = vendor/config LUN It was only tested on my NanoPi M5 with onboard 64GB UFS. Please review the script carefully before running it. I am attaching it only as an experimental helper for testing, not as an official solution. ============================================================ BASIC USAGE =========== Boot from an SD card maintenance system first. Make sure the Armbian image is already decompressed to .img. Example: sudo ./flash-nanopi-m5-ufs-btrfs.sh --image /path/to/Armbian_26.5.1_Nanopi-m5_trixie_vendor_6.1.115_minimal.img For a dry run: sudo ./flash-nanopi-m5-ufs-btrfs.sh --image /path/to/Armbian_26.5.1_Nanopi-m5_trixie_vendor_6.1.115_minimal.img --dry-run --yes-i-understand The script requires typing: YES_FLASH_UFS before it performs the destructive flashing operation, unless --yes-i-understand is used. ============================================================ RESULT ====== With this layout, the system boots successfully from UFS on my NanoPi M5 with the BOOT switch set to UFS/SD. After booting, I verified that: * / is btrfs from LABEL=ROOT * /boot is ext4 from LABEL=BOOT * /.snapshots is a btrfs subvolume * the system boots without requiring U-Boot to read btrfs directly I hope this may help other users who want a btrfs root filesystem on UFS while keeping /boot on ext4. flash-nanopi-m5-ufs-btrfs.sh
  2. Hi, I would like to report an issue I encountered while testing the new NanoPi M5 UFS boot support in Armbian 26.5.1. Board: NanoPi M5 Boot media for installation: SD card Target storage: onboard UFS BOOT switch after installation: UFS/SD Tested images: * `Armbian_26.5.1_Nanopi-m5_trixie_vendor_6.1.115_minimal.img.xz` * `Armbian_26.5.1_Nanopi-m5_trixie_current_6.18.33_minimal.img.xz` My current NVMe setup uses a custom layout: * `ext4` `/boot` * `btrfs` `/` I had to use this layout because, in my previous NVMe tests, installing the system directly to NVMe with btrfs using `armbian-install` did not boot when `/boot` was also located on btrfs. With a separate ext4 `/boot` partition and a btrfs root filesystem, the NVMe setup works correctly. When testing the new UFS installation path, I noticed that the UFS option in `armbian-install` seems to only install the whole system to `/dev/sda1` on the UFS General LUN. Unlike the NVMe installation path, I could not find a way to select an existing target partition or use a manually prepared partition layout. I tried the following UFS layout manually: * `/dev/sda1` as `ext4` for `/boot` * `/dev/sda2` as `btrfs` for `/` However, after splitting the UFS General LUN this way, the system did not boot at all. I also tested the default UFS installation path without manually changing the partition layout. I booted from SD card, ran `armbian-install`, selected the UFS install option, and selected btrfs as the filesystem. With both tested images listed above, the installation process completed, but after removing the SD card and booting from UFS with the BOOT switch set to UFS/SD, the system did not boot. So the behavior I observed is: * UFS installation creates and uses only `/dev/sda1` as the system partition. * UFS installation with btrfs selected completes, but the installed system does not boot afterward. * A manual layout with separate `ext4 /boot` and `btrfs /` on UFS also does not boot. * The UFS install path does not seem to provide the same manual partition selection behavior as the NVMe install path. My questions are: 1. Is btrfs on UFS expected to be bootable at this stage? 2. Or should ext4 currently be considered the only supported/recommended filesystem for UFS boot on NanoPi M5?
  3. NanoPi M5 test report for 26.5.1 vendor images Board: NanoPi M5 Boot media: SD card Kernel branch tested: vendor 6.1.115 Test scope: quick first-boot / first-login / desktop smoke test only. I mainly tested the vendor kernel images because my intended use case requires vendor kernel support, especially for NPU-related use later. 1. Image: `Armbian_26.5.1_Nanopi-m5_resolute_vendor_6.1.115_gnome_desktop.img.xz` Result: OK What worked: * Booted from SD card successfully. * Armbian initial configuration completed successfully. * After initial configuration, the GNOME desktop started normally. * I was able to enter the desktop and open a few basic applications. Notes: * I did not do a full hardware validation in this round. * I did not collect serial logs because the image reached the desktop successfully. 2. Image: `Armbian_26.5.1_Nanopi-m5_resolute_vendor_6.1.115_kde-plasma_desktop.img.xz` Result: FAILED What worked: * Booted from SD card successfully. * Armbian initial configuration started normally. What did not work: * The system got stuck at the Armbian first-login / initialization screen when it was supposed to start the desktop. * It did not proceed to a usable KDE Plasma desktop. Notes: * I only did a basic desktop startup test. * I have not collected serial logs yet, but I can retest and provide logs if needed. 3. Image: `Armbian_26.5.1_Nanopi-m5_trixie_vendor_6.1.115_minimal.img.xz` Result: CLI OK, XFCE installation failed What worked: * Booted from SD card successfully. * Armbian initial configuration completed successfully. * Login to the terminal worked normally. * Basic CLI usage appeared normal. What did not work: * I tried installing XFCE through `armbian-config`, using the XFCE mid option. * The desktop package dependencies appeared to download successfully. * After that, the screen switched to a black screen with a blinking terminal cursor in the top-left corner. * I waited for about 10 minutes, but it stayed stuck there and did not continue to a usable desktop. Notes: * The base minimal image itself seemed to work correctly from the terminal. * The issue happened during or after the XFCE installation/startup process via `armbian-config`. * I have not collected detailed logs yet, but I can retest and provide logs if needed. Summary: * `resolute_vendor_6.1.115_gnome_desktop`: boots from SD card and reaches GNOME desktop successfully. * `resolute_vendor_6.1.115_kde-plasma_desktop`: boots from SD card, but gets stuck at the Armbian first-login / initialization screen and does not reach KDE Plasma. * `trixie_vendor_6.1.115_minimal`: boots from SD card and CLI works, but installing XFCE mid through `armbian-config` gets stuck on a black screen with a blinking cursor.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines