initramfs to also use merge-rootfs

This commit is contained in:
2026-03-24 23:58:33 +08:00
parent aad4edd194
commit ec8ceb1690
9 changed files with 167 additions and 26 deletions

24
initramfs/rootfs-extra/init Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/sh
mount -t devtmpfs devtmpfs /dev
mount -t proc proc /proc
mount -t sysfs sysfs /sys
# Spin the fan
echo 100 > /sys/class/hwmon/hwmon0/pwm1
# Optional but nice
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts
echo "Booting kernel took $(cut -d' ' -f1 /proc/uptime) seconds."
echo "Dropping to shell on ttyS0..."
. /etc/build-info
while true; do
setsid cttyhack /bin/sh
echo "Shell exited. Starting another one..."
done
exec poweroff -f