Use run-init instead of chroot, it will free initramfs to save memory.

This commit is contained in:
Windsome Zeng
2022-08-11 14:04:43 +08:00
parent d481977e4a
commit 5132f39138
+2 -1
View File
@@ -57,4 +57,5 @@ mount -n -o move /dev /rootfs/dev
mount -n -o move /dev/shm /rootfs/dev/shm
mount -n -o move /dev/pts /rootfs/dev/pts
exec chroot /rootfs $init 3
exec run-init /rootfs "${init}" "$@" <"/rootfs/dev/console" >"/rootfs/dev/console" 2>&1
echo "Something went badly wrong in the initramfs."