) | \
bwrap --dev-bind / / --tmpfs /dev/shm \
linux mem=512M rootfstype=hostfs rootflags=/ rw \
- con=fd:2,fd:2 con1=fd:0,fd:1 init=$PWD/psusan-uml-inside | \
+ con=fd:2,fd:2 con1=fd:0,fd:1 init="${0%/*}"/psusan-uml-inside | \
(
read banner
: >$fifo
#!/bin/bash
set -e
-# Set up vital pseudo-filesystems
-mount -t proc none /proc
+
mkdir /dev/pts
+mount -t proc none /proc
mount -t devpts none /dev/pts
-# Redirect I/O to the serial port (leave stderr to the console)
+mount -t tmpfs none /tmp
+mount -t tmpfs none /run
+
exec 0<>/dev/tty1 1>&0
-# Set the serial port into raw mode, to run a binary protocol
stty raw -echo
-# Choose what shell you want to run inside psusan
-export SHELL=/bin/bash
+
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=991959
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
export PATH
-# And now run psusan over the serial port
+export SHELL=/bin/bash
+
exec psusan