aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArslaan Pathan <[email protected]>2026-06-10 20:12:25 +1200
committerArslaan Pathan <[email protected]>2026-06-10 20:12:25 +1200
commit9e4ff9ee6a13bcd7530ba033c54dc0ceb17b54d8 (patch)
tree25524abc3d1412e7c6559a50dc624071a00138d0
parent3609dc6087944e642233d15ee158504f57a266f3 (diff)
downloadyerbalinux-9e4ff9ee6a13bcd7530ba033c54dc0ceb17b54d8.tar.xz
yerbalinux-9e4ff9ee6a13bcd7530ba033c54dc0ceb17b54d8.zip
Use relative symlink to fix initramfs failing due to absolute
-rw-r--r--initramfs_init5
-rw-r--r--nix/rootfs.nix4
2 files changed, 6 insertions, 3 deletions
diff --git a/initramfs_init b/initramfs_init
index b1aface..ad27ff7 100644
--- a/initramfs_init
+++ b/initramfs_init
@@ -46,8 +46,11 @@ if [ ! -c /dev/tty0 ]; then
mknod -m 620 /dev/tty0 c 4 0
fi
+echo "[yerba-initramfs/init] DEBUG: running ls on /mnt/overlay/merged"
+ls /mnt/overlay/merged
+
echo "[yerba-initramfs/init] Switching to overlay root..."
-exec switch_root /mnt/overlay/merged /init
+switch_root /mnt/overlay/merged /init
echo "[yerba-initramfs/init] switch_root failed, dropping to shell"
exec /bin/sh
diff --git a/nix/rootfs.nix b/nix/rootfs.nix
index f9d29a7..de3876a 100644
--- a/nix/rootfs.nix
+++ b/nix/rootfs.nix
@@ -32,11 +32,11 @@ stdenv.mkDerivation {
# runit start
cp -a ${runit}/bin/* rootfs/usr/bin
chmod -R u+w rootfs
- ln -sf /usr/bin/runit-init rootfs/init
+ ln -sf usr/bin/runit-init rootfs/init
chmod -R u+w rootfs
rm -f rootfs/sbin/init
chmod -R u+w rootfs
- ln -sf /usr/bin/runit-init rootfs/sbin/init
+ ln -sf usr/bin/runit-init rootfs/sbin/init
cp -a ${../runit}/* rootfs/etc/runit/
chmod -R u+w rootfs
ln -sf /etc/runit/sv/getty-tty0 rootfs/etc/service/