aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--flake.nix2
-rw-r--r--initramfs_init13
-rwxr-xr-xrunit/11
-rwxr-xr-xrunit/21
4 files changed, 11 insertions, 6 deletions
diff --git a/flake.nix b/flake.nix
index ddfe10b..3c3f16f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -18,7 +18,7 @@
busybox = pkgs.callPackage ./nix/busybox.nix {
inherit (pkgs) pkgsStatic;
};
- runit = pkgsMusl.runit;
+ runit = pkgsStatic.runit;
limine = pkgs.callPackage ./nix/limine.nix {};
initramfs = pkgs.callPackage ./nix/initramfs.nix {
inherit (self.packages.${system}) kernel busybox;
diff --git a/initramfs_init b/initramfs_init
index 0363b46..b242838 100644
--- a/initramfs_init
+++ b/initramfs_init
@@ -1,7 +1,7 @@
#!/bin/sh
echo "[yerba-initramfs/init] DEBUG: running ls -la on /"
-ls -la /
+ls -la / || true
mkdir -p /proc /sys /dev
@@ -15,17 +15,17 @@ echo "[yerba-initramfs/init] Mounted /dev, /proc, /sys respectively"
sleep 1
mkdir -p /mnt/iso
-ls -la /mnt/iso
mount /dev/sr0 /mnt/iso
echo "[yerba-initramfs/init] Mounted /dev/sr0 (ISO root)"
echo "[yerba-initramfs/init] DEBUG: running ls -la on /mnt/iso"
+ls -la /mnt/iso || true
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] DEBUG: running ls -la on /mnt/root"
-ls -la /mnt/root
+ls -la /mnt/root || true
mkdir -p /mnt/overlay
mount -t tmpfs tmpfs /mnt/overlay
@@ -47,10 +47,13 @@ if [ ! -c /dev/tty0 ]; then
fi
echo "[yerba-initramfs/init] DEBUG: running ls -la on /mnt/overlay/merged"
-ls -la /mnt/overlay/merged
+ls -la /mnt/overlay/merged || true
+
+mount -t devtmpfs devtmpfs /mnt/overlay/merged/dev
echo "[yerba-initramfs/init] Switching to overlay root..."
-exec switch_root /mnt/overlay/merged /usr/bin/runit-init
+echo "debug don't switch root"
+# exec switch_root /mnt/overlay/merged /usr/bin/runit-init
echo "[yerba-initramfs/init] switch_root failed, dropping to shell"
exec /bin/sh
diff --git a/runit/1 b/runit/1
index 370b525..cb50ea9 100755
--- a/runit/1
+++ b/runit/1
@@ -1,3 +1,4 @@
#!/bin/sh
+export PATH=/usr/bin:/bin:/sbin
mount -a
hostname -F /etc/hostname 2>/dev/null || hostname yerba-live
diff --git a/runit/2 b/runit/2
index 91158e9..b5e850c 100755
--- a/runit/2
+++ b/runit/2
@@ -1,2 +1,3 @@
#!/bin/bash
+export PATH=/usr/bin:/bin:/sbin
exec runsvdir /etc/service