Files
patronageos/config/init.sh
2025-12-04 09:48:10 -07:00

21 lines
637 B
Bash
Executable File

#!/bin/busybox sh
/bin/busybox echo 'mounting filesystems and devices..'
/bin/busybox mount -t devtmpfs devtmpfs /dev
/bin/busybox mount -t proc proc /proc
/bin/busybox mount -t sysfs none /sys
/bin/busybox mount -t sysfs none /run
/bin/busybox mkdir -p /newroot
/bin/busybox mount /dev/sda2 /newroot
#/bin/busybox mount --move /sys /newroot
#/bin/busybox mount --move /dev /newroot
#/bin/busybox mount --move /proc /newroot
#exec /bin/busybox sh
#/bin/busybox ln -s "/lib/modules/" "/lib/modules/$(uname -r)"
#depmod -a
#/bin/busybox modprobe nbd max_part=2
/bin/busybox echo 'switching root.'
exec switch_root /newroot /bin/systemd