this is my current init script
Code: Select all
#!/bin/busybox sh
rescue_shell() (
echo "$@"
echo "Something went wrong. Dropping you to a shell."
/bin/busybox --install -s
exec /bin/sh
}
busybox mount -t devtmpfs none /dev || rescue_shell "Error"
busybox mount -t proc none /proc || rescue_shell "Error"
busybox mount -t sysfs none /sys || rescue_shell "Error"
cryptsetup luksOpen /dev/nvme0n1p2 cryptroot || rescue_shell "Failed to decrypt"
wait
mount -o rw,noatime,compress-force=zstd:3,ssd,space_cache=v2,subvol=/@ /dev/mapper/cryptroot /mnt/root || rescue_shell "Error root mount failed"
umount /proc
mount -o move /dev /mnt/root/dev
exec switch_root /mnt/root /sbin/init
Help appreciated

