From 93f35914637f53007f4fddb4d64069612c7b2b2f Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Mon, 8 Jun 2026 19:59:29 +1200 Subject: Fix init issue and work on making graphical tty show --- initramfs_init | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'initramfs_init') diff --git a/initramfs_init b/initramfs_init index ef327ce..b1aface 100644 --- a/initramfs_init +++ b/initramfs_init @@ -35,8 +35,19 @@ echo "[yerba-initramfs/init] Mounted tmpfs at /mnt/overlay and created upper, wo mount -t overlay overlay -o lowerdir=/mnt/root,upperdir=/mnt/overlay/upper,workdir=/mnt/overlay/work /mnt/overlay/merged echo "[yerba-initramfs/init] Mounted OverlayFS at /mnt/overlay/merged" +if [ ! -c /dev/console ]; then + echo "[yerba-initramfs/init] console device not found, creating" + mknod -m 600 /dev/console c 5 1 +fi + + +if [ ! -c /dev/tty0 ]; then + echo "[yerba-initramfs/init] tty0 device not found, creating" + mknod -m 620 /dev/tty0 c 4 0 +fi + echo "[yerba-initramfs/init] Switching to overlay root..." -exec switch_root /mnt/overlay/merged /sbin/init +exec switch_root /mnt/overlay/merged /init echo "[yerba-initramfs/init] switch_root failed, dropping to shell" exec /bin/sh -- cgit v1.2.3