Problems with Upgrades to 1.5.0/1.5.1-1.5.3 and Partition Slot

Hello guys,

I got a problem like this one Problems with Upgrades to 1.3.2/1.3.3 and Partition Slot, but with other facts,

I’m installing ZimaOS on a QNAP TS677 with 62GB of RAM and a RAID of 4 drives, including an SSD (with the OS installed on it).

After upgrading using OTA, the device restarts with an error: Slot B is corrupted.

i logged back with slot A and rauc status is :

=== System Info ===
Compatible:  zimaos-zimacube
Variant:     
Booted from: kernel.0 (A)

=== Bootloader ===
Activated: kernel.0 (A)

=== Slot States ===
  [boot.0] (/dev/disk/by-partlabel/casaos-boot, vfat, inactive)

⏺ [kernel.0] (/dev/disk/by-partlabel/casaos-kernel0, raw, booted)
      bootname: A
      boot status: good
    [rootfs.0] (/dev/disk/by-partlabel/casaos-system0, raw, active)

○ [kernel.1] (/dev/disk/by-partlabel/casaos-kernel1, raw, inactive)
      bootname: B
      boot status: bad
    [rootfs.1] (/dev/disk/by-partlabel/casaos-system1, raw, inactive)

fstab

root@ZimaOS:~# cat /etc/fstab
/dev/root / auto ro 0 1
root@ZimaOS:~# cat /mnt/overlay/upper_etc/fstab
cat: /mnt/overlay/upper_etc/fstab: No such file or directory

Then I performed a Terminal upgrade, and it says it is successful, with no luck.

curl -fsSL 'https://ota.zimaos.com/' | sh
root@ZimaOS:~# curl -fsSL 'https://ota.zimaos.com/' | sh
[INFO] ZimaOS upgrade script starting...
[INFO] Current version: 1.5.0
[INFO] Current channel: stable
[INFO] Getting latest version for channel: stable
[INFO] Target version: 1.5.3
[INFO] Starting system upgrade...
[INFO] Attempting download (try 1): zimaos-x86_64-1.5.3.raucb
######################################################################## 100.0%
[SUCCESS] Download successful: zimaos-x86_64-1.5.3.raucb
[INFO] Installing zimaos-x86_64-1.5.3.raucb...
installing
  0% Installing
  0% Determining slot states
 10% Determining slot states done.
 10% Checking bundle
 10% Verifying signature
 20% Verifying signature done.
 20% Checking bundle done.
 20% Checking manifest contents
 30% Checking manifest contents done.
 30% Determining target install group
 40% Determining target install group done.
 40% Updating slots
 40% Checking slot boot.0
 42% Checking slot boot.0 done.
 42% Copying image to boot.0
 60% Copying image to boot.0 done.
 60% Checking slot kernel.1 (B)
 62% Checking slot kernel.1 (B) done.
 62% Copying image to kernel.1
 63% Copying image to kernel.1
 64% Copying image to kernel.1
 65% Copying image to kernel.1
 66% Copying image to kernel.1
 67% Copying image to kernel.1
 68% Copying image to kernel.1
 69% Copying image to kernel.1
 70% Copying image to kernel.1
 71% Copying image to kernel.1
 72% Copying image to kernel.1
 73% Copying image to kernel.1
 74% Copying image to kernel.1
 75% Copying image to kernel.1
 76% Copying image to kernel.1
 77% Copying image to kernel.1
 78% Copying image to kernel.1
 79% Copying image to kernel.1
 80% Copying image to kernel.1 done.
 80% Checking slot rootfs.1
 82% Checking slot rootfs.1 done.
 82% Copying image to rootfs.1
 83% Copying image to rootfs.1
 84% Copying image to rootfs.1
 85% Copying image to rootfs.1
 86% Copying image to rootfs.1
 87% Copying image to rootfs.1
 88% Copying image to rootfs.1
 89% Copying image to rootfs.1
 90% Copying image to rootfs.1
 91% Copying image to rootfs.1
 92% Copying image to rootfs.1
 93% Copying image to rootfs.1
 94% Copying image to rootfs.1
 95% Copying image to rootfs.1
 96% Copying image to rootfs.1
 97% Copying image to rootfs.1
 98% Copying image to rootfs.1
 99% Copying image to rootfs.1
 99% Copying image to rootfs.1 done.
 99% Updating slots done.
100% Installing done.
Installing `/tmp/zimaos_upgrade/zimaos-x86_64-1.5.3.raucb` succeeded
[SUCCESS] Upgrade completed!
[INFO] System will apply new version after reboot
[INFO] Upgrade completed! Please reboot system to apply update
[INFO] Cleaning up temporary files...

before restart :

root@ZimaOS:~# rauc status
=== System Info ===
Compatible:  zimaos-zimacube
Variant:     
Booted from: kernel.0 (A)

=== Bootloader ===
Activated: kernel.1 (B)

=== Slot States ===
  [boot.0] (/dev/disk/by-partlabel/casaos-boot, vfat, inactive)

○ [kernel.0] (/dev/disk/by-partlabel/casaos-kernel0, raw, booted)
      bootname: A
      boot status: good
    [rootfs.0] (/dev/disk/by-partlabel/casaos-system0, raw, active)

⏺ [kernel.1] (/dev/disk/by-partlabel/casaos-kernel1, raw, inactive)
      bootname: B
      boot status: good
    [rootfs.1] (/dev/disk/by-partlabel/casaos-system1, raw, inactive)

after restart same image above Slot B to file system found

i hope this can be fixed without losing the RAID since it have 5 TB of DATA

This should also be useful.

ssh.txt (96.3 KB)

Thanks for sharing this.

Im doing a fresh clean install with v1.5.3 and had similar errors on first boot. I have had to go down to v1.5.1 to be able to get the system to install and boot.

I had used CasaOS in the past and have a new 4 bay NVME NAS, so ZimaOS looked like it would be perfect.

Im going to do some more testing later and will share my findings. What was your previous version and I can try and test the upgrade path on my machine whilst I have no content to worry about.

Update: Root Cause Found - Squashfs Compression Incompatibility

After extensive debugging, I’ve identified the root cause of this upgrade failure.

The Problem: The ZimaOS 1.5.3 kernel image uses LZO compression for its squashfs filesystem, but the 1.5.0 kernel was compiled without LZO squashfs support.

Evidence:

  1. Attempting to mount the Slot B kernel partition fails:
mount -t squashfs /dev/sdc4 /tmp/kernel_b
mount: /tmp/kernel_b: fsconfig system call failed: Filesystem uses "lzo" compression. This is not supported.
  1. The 1.5.0 kernel config confirms LZO is disabled:
zcat /proc/config.gz | grep -i squashfs
CONFIG_SQUASHFS_ZLIB=y
CONFIG_SQUASHFS_LZ4=y
# CONFIG_SQUASHFS_LZO is not set    <-- THIS IS THE PROBLEM
# CONFIG_SQUASHFS_XZ is not set
# CONFIG_SQUASHFS_ZSTD is not set

What happens during boot:

  1. RAUC successfully writes the 1.5.3 update to Slot B ✓
  2. GRUB correctly switches boot order to Slot B ✓
  3. GRUB tries to load the kernel from the squashfs partition ✗
  4. GRUB fails because it can’t read LZO-compressed squashfs
  5. System falls back to Slot A (1.5.0)

Additional complication in my case:

I also had a second drive (sdd - 4.6GB) with an old ZimaOS installation that had conflicting partition labels. RAUC was writing to the wrong drive initially. This was fixed by relabeling the old partitions:

sgdisk -c 1:old-casaos-boot /dev/sdd
sgdisk -c 2:old-casaos-kernel0 /dev/sdd
sgdisk -c 3:old-casaos-kernel1 /dev/sdd
sgdisk -c 4:old-casaos-bootstate /dev/sdd
sgdisk -c 5:old-casaos-overlay /dev/sdd
sgdisk -c 6:old-casaos-data /dev/sdd

And changing UEFI boot order to boot from the correct SSD. However, even after fixing this, the LZO compression issue prevents the upgrade.

Suggested fix for IceWhale:

The OTA update images should use ZLIB or LZ4 compression (which 1.5.0 supports) instead of LZO, or provide a transitional update that first adds LZO support before switching compression algorithms.

System Info:

  • Hardware: QNAP TS-677 (AMD Ryzen 5 PRO 1600)
  • Current version: ZimaOS 1.5.0
  • Target version: ZimaOS 1.5.3
  • Kernel: 6.12.25

ive created a issue in Github : OTA upgrade from 1.5.0 to 1.5.3 fails due to squashfs LZO compression incompatibility · Issue #382 · IceWhaleTech/ZimaOS · GitHub

Amazing!

I will keep an eye on that report, good find!

Thanks for the information, the theory is that the latest 1.53 kernel will be used when booting with the newer slot b. The next version will use LZ4 compression and no longer use LZO.

Thank you, waiting for this update ASAP.

I checked the commands built by the system and made it clear that squashfs only uses LZ4 for compression, not LZO, but anyway, in the next release, LZO support will be added to the kernel, and it is clear that squashfs uses LZ4 for compression.

I’m really looking forward to this patch! If it’s available in beta, I’d love the opportunity to test it and provide valuable feedback.

i will test version “1.5.4-alpha1” today