From 470995d6bf75022e9a29780542567d9afdc4abc6 Mon Sep 17 00:00:00 2001 From: wokron Date: Tue, 1 Sep 2026 14:47:12 +0800 Subject: [PATCH 1/3] light-initrd mount devtmpfs --- scripts/light-initrd.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/light-initrd.sh b/scripts/light-initrd.sh index 63dec6cb..3b1f8e16 100644 --- a/scripts/light-initrd.sh +++ b/scripts/light-initrd.sh @@ -68,13 +68,14 @@ cat << 'EOF' > "$WORK_DIR/init" set -euo pipefail # Initialize minimal directories -busybox mkdir -p /etc /proc /root /sbin /sys /usr/bin /usr/sbin /dev/pts +busybox mkdir -p /etc /proc /root /sbin /sys /usr/bin /usr/sbin /dev # Mount necessary filesystems busybox mount -t proc proc /proc busybox mount -t sysfs sys /sys +busybox mount -t devtmpfs devtmpfs /dev +busybox mkdir -p /dev/pts busybox mount -t devpts devpts /dev/pts -busybox mdev -s # Install busybox applets busybox --install -s From a1f221273af1365da1884c39e9fed9b30b0539bb Mon Sep 17 00:00:00 2001 From: wokron Date: Tue, 1 Sep 2026 16:25:31 +0800 Subject: [PATCH 2/3] packed as 755 --- scripts/light-initrd.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/light-initrd.sh b/scripts/light-initrd.sh index 3b1f8e16..a47fd251 100644 --- a/scripts/light-initrd.sh +++ b/scripts/light-initrd.sh @@ -109,6 +109,7 @@ done # Create the initrd image OUTPUT_FILE_REAL=$(realpath "$OUTPUT_FILE") +chmod 755 "$WORK_DIR" cd "$WORK_DIR" find . | cpio -o -H newc -R 0:0 | gzip -9 > "$OUTPUT_FILE_REAL" echo "Created initrd image: $OUTPUT_FILE" From 4ef75dc18fa2e6203d1a1cc5cd385c74d6451420 Mon Sep 17 00:00:00 2001 From: wokron Date: Wed, 2 Sep 2026 12:45:15 +0800 Subject: [PATCH 3/3] mount tmpfs --- scripts/light-initrd.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/light-initrd.sh b/scripts/light-initrd.sh index a47fd251..a4e0c104 100644 --- a/scripts/light-initrd.sh +++ b/scripts/light-initrd.sh @@ -68,14 +68,17 @@ cat << 'EOF' > "$WORK_DIR/init" set -euo pipefail # Initialize minimal directories -busybox mkdir -p /etc /proc /root /sbin /sys /usr/bin /usr/sbin /dev +busybox mkdir -p /etc /proc /root /sbin /sys /usr/bin /usr/sbin /dev /tmp /run # Mount necessary filesystems busybox mount -t proc proc /proc busybox mount -t sysfs sys /sys busybox mount -t devtmpfs devtmpfs /dev -busybox mkdir -p /dev/pts +busybox mkdir -p /dev/pts /dev/shm busybox mount -t devpts devpts /dev/pts +busybox mount -t tmpfs -o mode=1777,nodev,nosuid tmpfs /dev/shm +busybox mount -t tmpfs -o mode=1777,nodev,nosuid tmpfs /tmp +busybox mount -t tmpfs -o mode=0755,nodev,nosuid tmpfs /run # Install busybox applets busybox --install -s