GitHub - ostrich/nextufs: NEXTSTEP/OPENSTEP UFS tools for Linux: inspect, browse, mount, check, repair, create, resize, and modify raw images and VirtualBox VDI chains. · GitHub
/" data-turbo-transient="true" />
Skip to content
Type / to search
Sign in<br>Sign upAppearance settings
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
ostrich
nextufs
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
master
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>91 Commits<br>91 Commits
include
include
man
man
src
src
tests
tests
tools
tools
.gitignore
.gitignore
LICENSE
LICENSE
Makefile
Makefile
README.md
README.md
View all files
Repository files navigation
nextufs
nextufs is a Linux userspace tool for working with NEXTSTEP and OPENSTEP UFS<br>filesystems. It provides one command, nextufs, with subcommands for inspecting,<br>browsing, mounting, checking, repairing, creating, resizing, and modifying disk<br>images.
Capabilities
Inspect source layout and filesystem metadata.
Browse files and directories without mounting.
Mount images through FUSE.
Check and repair UFS metadata.
Create raw UFS filesystems or labeled NeXT disk images.
Grow supported raw and labeled images offline.
Apply offline file and directory mutations for testing or recovery work.
Read and write raw images, standalone VirtualBox VDIs, and VDI chains through<br>the shared source backend.
Supported Sources
Raw UFS filesystem images. The filesystem starts at byte zero.
Labeled NeXT disk images. These contain a NeXT disk label and a UFS slice.
Standalone VirtualBox VDI images.
VirtualBox VDI chains. Point commands at the current chain head, not the<br>base image.
For VDI chains, use tools/vdi_chain.py to identify base, intermediate, and<br>head images:
tools/vdi_chain.py scan "/path/to/VirtualBox/VMs/OPENSTEP 4.2"<br>tools/vdi_chain.py trace "/path/to/VM/Snapshots/{uuid}.vdi"
Build And Install
Build the command:
make
Run the main test suite:
make test
Install the unified nextufs command:
make install
Override the install prefix or stage into a package root:
make prefix="$HOME/.local" install<br>DESTDIR=/tmp/pkgroot make install
Usage
The full command reference is in man/nextufs.1.
Show source and filesystem information:
nextufs info /path/to/source<br>nextufs info --json /path/to/source
Browse the filesystem without mounting:
nextufs browse /path/to/source<br>nextufs browse /path/to/source /etc/passwd
Mount through FUSE. Mounts are read-only by default:
mkdir -p /tmp/nextufs-mnt<br>nextufs mount /path/to/source /tmp/nextufs-mnt
Request a writable mount explicitly:
nextufs mount /path/to/source /tmp/nextufs-mnt -o rw,mode=su
Check or repair a filesystem:
nextufs fsck -n /path/to/source<br>nextufs fsck -y /path/to/source
Create a labeled NeXT disk image:
nextufs mkimg /tmp/nextufs.img 256M
Create a raw UFS filesystem image:
nextufs mkimg --raw /tmp/nextufs.raw 256M
For mkimg, bare numeric sizes are interpreted as 1 KiB sectors in both<br>labeled and raw modes. Suffixes such as K, M, and G specify byte-based<br>KiB, MiB, and GiB quantities.
Refuse-to-overwrite is the default. Use --force-overwrite only when replacing<br>an existing target is intentional:
nextufs mkimg --force-overwrite /tmp/nextufs.img 256M
Grow a supported image offline. Bare numbers are interpreted as 1 KiB sectors:
nextufs resize grow /path/to/source 2097152
By default, mkimg and resize grow enforce the NEXTSTEP/OPENSTEP<br>compatibility ceiling of 4294836224 bytes, or 4194176 1 KiB sectors.<br>Use --force-size only when intentionally creating or growing beyond that<br>limit.
Apply an offline mutation:
nextufs mkfile /path/to/source /private/tmp/example "hello from Linux"<br>nextufs mkfile --policy user --uid 1000 --gid 100 \<br>--chmod /path/to/source /private/tmp/example 0600
Safety Notes
info, browse, and fsck -n are intended to be non-mutating.
fsck -y, writable FUSE mounts, mkfile, and resize grow modify the<br>target source.
Work on a copy when repairing, resizing, or mutating an image that matters.
For VDI chains, writes go through the chain head. Passing an older snapshot or<br>base image is not equivalent to modifying the current VM state.
mkimg refuses to overwrite existing files unless --force-overwrite is<br>supplied.
mkimg and resize grow enforce the NEXTSTEP/OPENSTEP compatibility ceiling<br>of 4294836224 bytes, or 4194176 1 KiB sectors, unless --force-size is<br>supplied.
Testing
The test suite covers the unified CLI, image creation, resize command contracts,<br>FUSE reads, offline mutations, VDI-aware source handling, and a reproducible<br>fsck corruption corpus. The fsck repair corpus exercises many detected metadata<br>corruption families...