• v4.1 00317e32bb

    UFS2Tool v4.1 Stable

    archiver-bot released this 2026-05-08 07:01:52 -05:00 | 4 commits to main since this release

    🗄️ UFS2Tool v4.1

    Upgraded to DokanNet 2.3.0.3 & Avalonia 12.0.2

    • Switched to the new DokanNet fluent builder and instance-based mount/unmount lifecycle
    • Replaced deprecated TextBox.Watermark with PlaceholderText across all views
    • Removed the no-longer-needed DisableAvaloniaDataAnnotationValidation workaround
    • Added a TryGetInode() helper so file operations reuse the cached inode from when a handle is opened, instead of walking the directory tree on every call
    • DeleteDirectory now returns a proper "directory not empty" error
    • ReadFile now validates the read offset is non-negative
    • Buffer copies switched to Buffer.BlockCopy for better performance
    • Test project migrated from xUnit v2 to xUnit v3

    Fixed fsck_ufs -b <altsuperblock> being silently ignored

    • The -b flag now correctly reads the superblock from the specified alternate sector
    • A confirmation message is printed when an alternate superblock is used
    • Out-of-range sector values are now rejected with a clear error

    Fixed newfs -S 4096 producing unreadable images

    • Sector size is now normalized to 512 bytes for filesystem layout, mirroring FreeBSD's own newfs behavior
    • The -s N size parameter is now correctly interpreted in real-sector units
    • Images created with any -S value now produce identical, valid filesystem layouts
    Downloads
  • v4.0 f9c4911fe5

    UFS2Tool v4.0 Stable

    archiver-bot released this 2026-02-15 10:45:15 -06:00 | 7 commits to main since this release

    🗄️ UFS2Tool v4.0

    🖥️ New GUI Features

    • UFS Image Content Browser
      • Tree-view content browser for inspecting and manipulating UFS image contents, with drag & drop for adding files.
      • Refresh, Extract, Add File, Add Folder & Delete options
    • Write Filesystem
      • Write UFS images to USB/HDD/SSD drives on Windows, Linux, and macOS
    • PS5
      • Batch Processing to convert multiple folders to UFS images in one operation.
    • Language auto-detection
      • Auto-applies language from OS locale on startup

    📟 New UFS Image Commands

    • du
      • Display disk usage for files and directories in a UFS1/UFS2 filesystem image, similar to FreeBSD's du(1).
    • find
      • Searches recursively for files and directories matching a name pattern within a UFS1/UFS2 filesystem image. Similar to the Unix find(1) command with -name matching.
    • stat
      • Displays detailed inode information for a file, directory, or symbolic link inside a UFS1/UFS2 filesystem image. Similar to the Unix stat(1) command.

    🌍 New Languages

    • Bahasa Indonesia
    • Magyar
    • Nederlands
    • Português (Brasil)
    • 中文 (繁體) (Traditional Chinese)

    🔧 Fixes

    • Core Fixes
      • Nullable _writer field (Ufs2Image.cs): _writer is only initialized when readOnly=false but was declared non-nullable, producing CS8618 warnings.
      • Constructor resource leak (Ufs2Image.cs): If ReadSuperblock() throws (invalid image), the already-opened FileStream/BinaryReader/BinaryWriter were never disposed.
      • GetDiskFreeSpace reports wrong free space — was computing FreeBlocks * FSize but FreeBlocks is free blocks (not fragments), underreporting by BSize/FSize (typically 8x).
      • ls command ignores [path] argument — always called ListRoot() regardless of user-specified path; now resolves and lists the given directory.
      • Buffer overread in Ufs2DirectoryEntry.ReadFrom — corrupt entries with NameLength > nameAreaSize would index out of bounds.
      • ReadInode() / WriteInode() — totalInodes bounds check used int multiplication; changed to long to prevent overflow bypassing the validation.
      • FsckUfs() — Same overflow in totalInodes used to size per-inode tracking arrays; added explicit overflow guard since arrays require int length.
      • AllocateInode() / FsckUfs() Phase 5 — globalIno = cgIndex * inodesPerGroup + i overflows.
    • GUI
      • False success message on invalid input: Mode parsing (octal conversion) was inside the Task.Run lambda. On FormatException/OverflowException, the lambda returned early but the outer async method still logged "Successfully changed permissions".
      • Directories inaccessible after recursive chmod: image.ChmodAll(mode, mode) applied the same mode to files and directories. Setting 644 recursively stripped execute bits from directories, making them untraversable. Added AddExecuteBits helper (matching CLI behavior) to derive directory mode.
    • Reliability
      • Stream.Read partial read handling — added ReadFully helper that loops until all bytes are read and throws EndOfStreamException on truncated data.
      • Bounds validation in ReadInode/WriteInode — validates inode number against total count and computed offset against stream length before I/O.
      • Removed redundant new BinaryReader(_stream) in ReadIndirectBlock/ReadDoubleIndirectBlock/ReadTripleIndirectBlock — reuses existing _reader field.
    • Dokan mount error handling
      • SetEndOfFile: reject negative or > int.MaxValue lengths with InvalidParameter.
      • WriteFile: reject negative offsets; return InvalidParameter on newSize > int.MaxValue overflow.
      • Explicit (int) casts on validated long values for type safety.
    Downloads
  • v3.0 c123639cdd

    UFS2Tool v3.0 Stable

    archiver-bot released this 2026-02-13 11:08:31 -06:00 | 8 commits to main since this release

    🗄️ UFS2Tool v3.0

    📟 New UFS Image Commands

    • rename
      • Rename a file or directory inside an UFS image

    🌍 New Languages

    • Svenska
    • Suomi
    • Polski
    • Tiếng Việt
    • Română
    • Українська
    • Čeština
    • ไทย

    🔧 Fixes

    • Critical Core Fixes:
      • UFS1: di_gen offset was wrong
      • UFS1: inode layout mismatch at offset 4
      • Superblock Sector Size not recovered on read
    • Other Core Fixes:
      • Ufs2Image.ReadFile: new byte[inode.Size] silently overflows for files >2GB (inode.Size is long, array index is int)
      • Ufs2Image.ReadBlockPointerAt: Only traversed direct + single-indirect blocks; returned 0 for double/triple indirect, breaking operations on large directories
      • Ufs2Image.AddDirectoryEntry: (dirSize - 1) / blockSize computes -1 when dirSize == 0, causing IndexOutOfRangeException
      • AlignedStream.Dispose: Flushed _deviceStream but never disposed it — file handle leak
      • Ufs2ImageCreator.MakeFsImage: Inode count used totalEntries + RootInode (+2) instead of +3 for reserved inodes 0, 1, root
      • Program.ParseGrowFsSize: Missing x product notation (e.g., 512x1024) that TryParseMakeFsSize already supported
    • CLI:
      • TryParseIntArg/TryParseLongArg/TryParseStringArg called PrintNewFsUsage() even when invoked from tunefs/makefs/growfs
    • GUI:
      • chmod Validation
      • Output Log: Missing log updates & possible crash
    • Windows Dokan Mounting:
      • MoveFile now delegates to Rename instead of returning NotImplemented
      • FindFiles function left timestamps uninitialized for special file types
    Downloads
  • v2.5 bc22aa26a5

    UFS2Tool v2.5 Stable

    archiver-bot released this 2026-02-12 11:01:36 -06:00 | 10 commits to main since this release

    🗄️ UFS2Tool v2.5

    🖥️ New GUI Application

    The GUI provides a graphical interface for all major UFS2Tool operations:

    • Create Filesystem — Create UFS1/UFS2 images with configurable parameters
    • Filesystem Operations — List, extract, add, delete, replace files, and change permissions
    • Maintenance — TuneFS, GrowFS, and FsckUFS operations
    • Device Mount — Mount/unmount UFS images as Windows drives (Windows only, requires Dokan)
    • PS5 Quick Create — Preset templates for PS5-compatible filesystem creation
    • Settings — Language selection (supports 13 languages total)

    To start the GUI:

    • Windows
      • Simply double-click on UFS2Tool.GUI.exe
    • Linux/macOS
      • Execute ./UFS2Tool.GUI after chmod

    📝 New UFS Image Operations

    • chmod command for modifying Unix permissions inside UFS images

    🖸 Windows Dokan Mounting Operations Updates

    Implemented in read-write mode where applicable:

    • DeleteFile / DeleteDirectory — delegates to Ufs2Image.Delete()
    • SetFileTime — updates creation/access/modification timestamps on inodes
    • SetFileAttributes — accepts silently (UFS uses Unix perms, not Windows attrs)
    • FindFilesWithPattern — filters via DokanHelper.DokanIsNameInExpression
    • GetFileSecurity / SetFileSecurity — returns NotImplemented (Unix perms ≠ Windows ACLs)
    • MoveFile — returns NotImplemented (no rename support in UFS API)

    🔨 New Release Builds

    • Release for Windows arm64
    • Release for macOS & Linux x64 and arm64
    • Self-contained builds already containing the .NET 8.0 runtime or default builds requiring the .NET 8.0 runtime installed

    Linux & macOS Usage

    Downloads
  • v2 1e0d1ebd41

    UFS2Tool v2 Stable

    archiver-bot released this 2026-02-11 16:50:54 -06:00 | 11 commits to main since this release

    🗄️ UFS2Tool v2.0

    🛠 New integrated FreeBSD UFS utilities :

    • growfs
      • The growfs utility makes it possible to expand an UFS file system.
    • tunefs
      • The tunefs utility is designed to change the dynamic parameters of a UFS file system which affect the layout policies.
    • fsck_ufs
      • The fsck_ufs utility is used to check and repair UFS structure.
    • mount_udf / unmount_udf
      • Allows mounting UFS1/UFS2 filesystem images as Windows drive letters using the Dokan user-mode filesystem driver, modeled after FreeBSD's mount_udf(8) / mount(8).
      • Requires Dokan driver pre-installed on the Windows host.

    📝 New UFS image operations :

    • extract
      • Extract content from UFS1/UFS2 filesystem images — entire filesystem, single file, or single directory (recursively).
    • replace
      • Replace files/directories in UFS1/UFS2 filesystem images.
    • add / delete
      • Add single file or recursive directory and delete single file or recursive directory.
    Downloads
  • v1.1 ab41cbdac4

    UFS2Tool v1.1 Stable

    archiver-bot released this 2026-02-11 11:27:09 -06:00 | 15 commits to main since this release

    📝 Fixes

    Merged pull request #2 from @drakmor which fixes :

    • Wrong file/directory permissions. Files were not allowed to be executed.

    and adds :

    • Auto metadata size calulcation when using makefs
    • UFS image creation progress
    Downloads
  • v1 1c8c300cf8

    UFS2Tool v1 Stable

    archiver-bot released this 2026-02-11 01:57:08 -06:00 | 17 commits to main since this release

    🗄️ UFS2Tool

    ✨ Features

    • Create UFS1 and UFS2 filesystems on image files or raw Windows devices
    • Full newfs(8) compatibility — supports all standard FreeBSD newfs flags (except -T, -k, -r)
    • Populate from directory — create images from directory contents with auto-sizing (-D)
    • makefs command — FreeBSD makefs(8) compatible interface for creating filesystem images from directory trees
    • Read and inspect existing UFS1/UFS2 filesystem images
    • List directory contents from UFS1/UFS2 images
    • Device I/O — direct writing to physical drives and volumes on Windows

    📖 Implementation Details

    For a detailed breakdown of the core library components, filesystem structures, and all implemented features, see IMPLEMENTATIONS.md.

    📝 Notes

    • Device operations (newfs on physical drives, devinfo) require Administrator privileges on Windows.
    • Filesystem images created by this tool are compatible with FreeBSD's mount and fsck_ffs.
    • When creating images with makefs, soft updates are disabled by default (softupdates=0), matching FreeBSD makefs(8) behavior. Use -o softupdates=1 to enable them explicitly.

    📄 License

    This project is licensed under the BSD 2-Clause License. See the LICENSE file for details.

    Downloads