Skip to content

Commit cf25799

Browse files
ryanbreenclaude
andcommitted
fix(ext2): add init_shell and telnetd to filesystem
The telnetd server was trying to exec /bin/init_shell but it wasn't in the ext2 filesystem, causing the shell to fail to start over telnet. Now ext2 contains: - /bin/init_shell (32KB) - interactive shell - /bin/telnetd (9KB) - telnet server Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b111fe6 commit cf25799

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

scripts/create_ext2_disk.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,24 @@ if [[ "$(uname)" == "Darwin" ]]; then
107107
echo " WARNING: hello_world.elf not found"
108108
fi
109109
110+
# Copy init_shell for interactive use and telnet
111+
if [ -f /binaries/init_shell.elf ]; then
112+
cp /binaries/init_shell.elf /mnt/ext2/bin/init_shell
113+
chmod 755 /mnt/ext2/bin/init_shell
114+
echo " /bin/init_shell installed"
115+
else
116+
echo " WARNING: init_shell.elf not found"
117+
fi
118+
119+
# Copy telnetd for remote access
120+
if [ -f /binaries/telnetd.elf ]; then
121+
cp /binaries/telnetd.elf /mnt/ext2/bin/telnetd
122+
chmod 755 /mnt/ext2/bin/telnetd
123+
echo " /bin/telnetd installed"
124+
else
125+
echo " WARNING: telnetd.elf not found"
126+
fi
127+
110128
# Create test files for filesystem testing
111129
echo "Hello from ext2!" > /mnt/ext2/hello.txt
112130
echo "Truncate test file" > /mnt/ext2/trunctest.txt
@@ -209,6 +227,20 @@ else
209227
echo " /bin/hello_world installed"
210228
fi
211229

230+
# Copy init_shell for interactive use and telnet
231+
if [ -f "$USERSPACE_DIR/init_shell.elf" ]; then
232+
cp "$USERSPACE_DIR/init_shell.elf" "$MOUNT_DIR/bin/init_shell"
233+
chmod 755 "$MOUNT_DIR/bin/init_shell"
234+
echo " /bin/init_shell installed"
235+
fi
236+
237+
# Copy telnetd for remote access
238+
if [ -f "$USERSPACE_DIR/telnetd.elf" ]; then
239+
cp "$USERSPACE_DIR/telnetd.elf" "$MOUNT_DIR/bin/telnetd"
240+
chmod 755 "$MOUNT_DIR/bin/telnetd"
241+
echo " /bin/telnetd installed"
242+
fi
243+
212244
# Create test files
213245
echo "Hello from ext2!" > "$MOUNT_DIR/hello.txt"
214246
echo "Truncate test file" > "$MOUNT_DIR/trunctest.txt"

testdata/ext2.img

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)