MicroVM driver doesn't use system path to look for e2fsprogs
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 8.7k
- Forks
- 1.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 253
Description
When trying to use the MicroVM sandbox driver on a Linux system, I get this error:
✗ Error: ProvisioningFailed: failed to create ext4 rootfs image from /home/username/.local/state/openshell/vm-driver/images/sandbox-bootstrap-rootfs-ext4-v3-openshell-0.0.116-sha256-aeef1c63f00e2913ea002ccb3aaf925f338b5c5d70e63576f0d95c16a138044e.staging-1789573222361-0/rootfs: mke2fs not found
/opt/homebrew/opt/e2fsprogs/sbin/mke2fs not found
/opt/homebrew/opt/e2fsprogs/bin/mke2fs not found
/usr/local/opt/e2fsprogs/sbin/mke2fs not found
/usr/local/opt/e2fsprogs/bin/mke2fs not found
mkfs.ext4 not found
/opt/homebrew/opt/e2fsprogs/sbin/mkfs.ext4 not found
/opt/homebrew/opt/e2fsprogs/bin/mkfs.ext4 not found
/usr/local/opt/e2fsprogs/sbin/mkfs.ext4 not found
/usr/local/opt/e2fsprogs/bin/mkfs.ext4 not found. Install e2fsprogs (mke2fs/mkfs.ext4) and retry
This is caused by the below section of code:
/usr/sbin and/or /sbin should be added to the candidate root directories to resolve this, since most Linux systems will already have mke2fs installed in one of those locations. I recognise that many systems won't add /sbin and /usr/sbin to the $PATH of non-root users by default, so a explicit search path may be required.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in crates/openshell-driver-vm/src/rootfs.rs around line 1058 and inspect how candidate root directories are assembled. Reproduce on a Linux system with mke2fs or mkfs.ext4 installed under /sbin or /usr/sbin; done when the MicroVM driver locates the executable and creates the ext4 rootfs without requiring it in the user's PATH.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100