max-boehm / qnap-utils

Utilities to unpack QNAP firmware images and QPKG files
60 stars 23 forks source link

Fix for extracting x51 rootfs.bz #4

Closed ChinaNuke closed 1 year ago

ChinaNuke commented 1 year ago

In x51 firmware, rootfs has the extension bz but it's actually a lzma compressed tar ball, not bzip2.

$ file rootfs2.bz
rootfs2.bz: LZMA compressed data, streamed

$ tar -xjf rootfs2.bz
bzip2: (stdin) is not a bzip2 file.
tar: Child returned status 2
tar: Error is not recoverable: exiting now

$ tar --lzma -xf rootfs2.bz
$ ls
home  lib  rootfs2.bz  usr
max-boehm commented 1 year ago

Thank you for this PR. Its interesting that the compression method has been changed to LZMA but the bz extension was not changed at the same time.