From 3dc5f36dacce85fe9996be5ff8f4a7c93e6dbf16 Mon Sep 17 00:00:00 2001
From: Marius Gavrilescu <marius@ieval.ro>
Date: Mon, 27 Apr 2015 23:06:05 +0300
Subject: [PATCH] Enable binfmt_misc and do not use fstab

---
 ex/makevm | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/ex/makevm b/ex/makevm
index aadc861..b9ceaaa 100755
--- a/ex/makevm
+++ b/ex/makevm
@@ -5,15 +5,12 @@ mount /proc -o bind vm/proc
 multistrap -f ex/vm.conf
 ln -s vm/usr/bin/mawk vm/bin/awk
 echo '/sbin/poweroff -f' > vm/.bash_logout
-cat > vm/etc/fstab <<EOF
-virtfs /mnt  9p     trans=virtio 0 0
-tmpfs  /tmp  tmpfs  defaults     0 0
-procfs /proc proc   defaults     0 0
-EOF
 cat > vm/.profile <<EOF
-mount /mnt
-mount /tmp
-mount /proc
+mount -t 9p -o trans=virtio virtfs /mnt
+mount -t ramfs ramfs /tmp
+mount -t proc proc /proc
+mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
+echo ':jar:M::PK\x03\x04::/usr/bin/jexec:' > /proc/sys/fs/binfmt_misc/register
 [ -e /dev/ttyS1 ] && stty -F /dev/ttyS1 -echo
 cd /mnt
 export PS1="# "
-- 
2.39.5