xv6 Filesystem Reader
Tool to read and write disk images of the xv6 file system. Mount the image with FUSE on Linux, extract its contents to disk, or edit files inside the image.
Academic context
This project is used in the Operating Systems course at FaMAF – UNC (Facultad de Matemática, Astronomía, Física y Computación, Universidad Nacional de Córdoba).
It lets you inspect and modify xv6 disk images (e.g. fs.img) from Linux without running xv6: mount the file system, list directories, read and edit files, and save changes back to the image.
Features
- Read: list directories, read files and device nodes from the xv6 file system.
- Write: modify existing files; changes are persisted to the image when using the
--writeoption when mounting. - FUSE mount: use the image as a directory on Linux (
ls,cat, editors, etc.). - Extract: dump the entire file system contents to a local directory (
./root/). - Easy install: install via
piporpipx; two commands:xv6fs(mount) andxv6fs-extract(extract).
Requirements
- Python 3.7 or newer.
- libfuse (to mount the file system).
On Debian/Ubuntu:sudo apt install libfuse-dev
Installation
With pipx (recommended)
From the project directory:
pipx install .
The commands xv6fs and xv6fs-extract will be available on your PATH.
With pip (virtualenv or development)
pip install -e .
To include publish dependencies (build, twine) as well:
pip install -e ".[dev]"
Usage
Mount the image (FUSE)
Mount the image as a directory. You can use ls, cat, editors, etc.
# Read-only (default)
xv6fs fs.img /mnt/xv6
# Read and write (changes are saved to the image)
xv6fs fs.img /mnt/xv6 --write
The mount point must exist; create it if needed:
mkdir -p /mnt/xv6
xv6fs fs.img /mnt/xv6 --write
To unmount:
fusermount -u /mnt/xv6
Extract to disk
Extract the full file system contents into the current directory under ./root/:
xv6fs-extract fs.img
This creates the directory tree and files under ./root/ (e.g. ./root/init, ./root/etc/hostname, etc.).
Publishing to PyPI
To publish the package to PyPI (project maintainers):
-
Install publish dependencies:
pip install -e ".[dev]"
-
Configure PyPI credentials (token at pypi.org/manage/account/token/) in
~/.pypircor via environment variables. -
Run the script from the project root (with your venv activated if you use one):
chmod +x scripts/publish_to_pypi.sh ./scripts/publish_to_pypi.sh # publish to PyPI ./scripts/publish_to_pypi.sh --test # publish to Test PyPI ./scripts/publish_to_pypi.sh --build-only # only build dist/, do not upload
License
MIT.
Metadata
Release files for xv6-filesystem-reader 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| xv6_filesystem_reader-0.2.0.tar.gz | 9.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xv6_filesystem_reader-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.3 kB
Release files / xv6_filesystem_reader-0.2.0.tar.gz
| Download URL | xv6_filesystem_reader-0.2.0.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
70c9a031fbc9fd12f30de5da751b0d143df1f56dc443c055f48e2134e3065508
|
|
BLAKE2b-256 checksum How to use checksums |
a96c0b46219df066939db48a5e80d81fa4f5058e5314508f9a1690c264b32145
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / xv6_filesystem_reader-0.2.0-py3-none-any.whl
| Download URL | xv6_filesystem_reader-0.2.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dbd9ffe607f065845f07f8c3d55cbd26281b2c6f26d40f80e3d4ae8c93535f1c
|
|
BLAKE2b-256 checksum How to use checksums |
4aad394e283e3cc5b228c1ac670c1750dda2f85cdb30186965e814968129672b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|