Read and write xv6 file system disk images; mount them with FUSE on Linux.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xv6_filesystem_reader-0.2.0.tar.gz.
File metadata
- Download URL: xv6_filesystem_reader-0.2.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70c9a031fbc9fd12f30de5da751b0d143df1f56dc443c055f48e2134e3065508
|
|
| MD5 |
c122a3fe6f6d12ef50e23e1a214be40e
|
|
| BLAKE2b-256 |
a96c0b46219df066939db48a5e80d81fa4f5058e5314508f9a1690c264b32145
|
File details
Details for the file xv6_filesystem_reader-0.2.0-py3-none-any.whl.
File metadata
- Download URL: xv6_filesystem_reader-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbd9ffe607f065845f07f8c3d55cbd26281b2c6f26d40f80e3d4ae8c93535f1c
|
|
| MD5 |
6312ba98456073ff1ac78ca8326739c5
|
|
| BLAKE2b-256 |
4aad394e283e3cc5b228c1ac670c1750dda2f85cdb30186965e814968129672b
|