From b0544e2a170948b9cf316acad1d6f00b7fc11388 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Wed, 3 Jun 2026 22:23:59 +1200 Subject: Add kernelconfig and keep working on initramfs --- initramfs_init | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'initramfs_init') diff --git a/initramfs_init b/initramfs_init index 385ccb8..865a91d 100644 --- a/initramfs_init +++ b/initramfs_init @@ -13,10 +13,17 @@ echo "[yerba-initramfs/init] Mounted /dev/sr0 (ISO root)" mkdir -p /mnt/root mount -t squashfs -o loop /mnt/iso/yerba/rootfs.squashfs /mnt/root +echo "[yerba-initramfs/init] Mounted squashfs at /mnt/root" -echo "[yerba-initramfs/init] TODO: Make this actually mount OverlayFS and switch_root." -echo "[yerba-initramfs/init] You will see a message saying something bad has happened. Please ignore this." +mount -t tmpfs tmpfs /mnt/overlay +mkdir -p /mnt/overlay/upper /mnt/overlay/work /mnt/overlay/merged +echo "[yerba-initramfs/init] Mounted tmpfs at /mnt/overlay and created upper, work & merged directories" -echo "[yerba-initramfs/init] Something very very bad has occurred (oh no.)" -echo "[yerba-initramfs/init] Dropping you to a BusyBox shell." +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" + +echo "[yerba-initramfs/init] Switching to overlay root..." +exec switch_root /mnt/overlay/merged /sbin/init + +echo "[yerba-initramfs/init] switch_root failed, dropping to shell" exec /bin/sh -- cgit v1.2.3