mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #268] [MERGED] fix(tools-image): fall back to BusyBox sh for images without /bin/sh #303
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#303
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/268
Author: @zlzGithub-0801
Created: 9/9/2026
Status: ✅ Merged
Merged: 9/10/2026
Merged by: @yingdi-shan
Base:
main← Head:fix/guest-binsh-fallback📝 Commits (1)
f8c2a23fix(tools-image): improve compatibility with minimal and Ubuntu images📊 Changes
4 files changed (+9 additions, -4 deletions)
View changed files
📝
tools-image/Dockerfile(+1 -1)📝
tools-image/Makefile(+1 -1)📝
tools-image/init(+0 -1)📝
tools-image/pivot-init(+7 -1)📄 Description
What
Improve tools-image compatibility with minimal and Ubuntu-based guest images:
/bin/shwhen the guest image does not include one;/etc/hostswhen it is missing or empty;/var/runhandling until afterpivot_root.Why
Some OCI images do not provide
/bin/shor rely on the container runtime to populate an empty/etc/hosts. Ubuntu-based images also define/var/runas an absolute symlink to/run, which is resolved against the tools drive beforepivot_root.These cases can prevent command execution, break
localhostresolution, or produce a pre-pivot directory creation error.Related issue
Closes #202.
Scope and non-goals
This PR only updates guest bootstrap behavior in the tools image. It does not change public APIs, snapshot formats, or the tools-image upgrade mechanism.
Design and behavior changes
After pivoting into the guest rootfs:
/bin/shto the bundled BusyBox when/bin/shis unavailable;/etc/hostswith IPv4 and IPv6 localhost mappings when the file is missing or empty;/bin/shand non-empty/etc/hosts.Before
pivot_root, avoid accessing/mnt/user/var/run. The existing post-pivot initialization handles/var/runafter absolute symlinks resolve within the guest rootfs.Compatibility and operations
Validation
make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketargetSkipped checks and reasons: Rust, services, generation, and benchmark checks were not run because this change only adds a shell bootstrap fallback.
Risks and reviewer notes
N/A
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.