diff options
| author | Arslaan Pathan <[email protected]> | 2026-06-03 22:23:59 +1200 |
|---|---|---|
| committer | Arslaan Pathan <[email protected]> | 2026-06-03 22:23:59 +1200 |
| commit | b0544e2a170948b9cf316acad1d6f00b7fc11388 (patch) | |
| tree | d7d536cd06f1831200cdacf74e75d393acdbe219 /initramfs_init | |
| parent | e636ea46c56ca11dd111e59405d92aa3ee81ad9f (diff) | |
| download | yerbalinux-b0544e2a170948b9cf316acad1d6f00b7fc11388.tar.xz yerbalinux-b0544e2a170948b9cf316acad1d6f00b7fc11388.zip | |
Add kernelconfig and keep working on initramfs
Diffstat (limited to 'initramfs_init')
| -rw-r--r-- | initramfs_init | 15 |
1 files changed, 11 insertions, 4 deletions
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 |
