Enable binfmt_misc and do not use fstab
[gruntmaster-daemon.git] / ex / makevm
CommitLineData
fdb99417 1#!/bin/bash
fdb99417 2rm -rf vm/ vm.squashfs
2a6db364
MG
3mkdir -p vm/proc/
4mount /proc -o bind vm/proc
e6b9e086 5multistrap -f ex/vm.conf
fdb99417 6ln -s vm/usr/bin/mawk vm/bin/awk
fdb99417
MG
7echo '/sbin/poweroff -f' > vm/.bash_logout
8cat > vm/.profile <<EOF
3dc5f36d
MG
9mount -t 9p -o trans=virtio virtfs /mnt
10mount -t ramfs ramfs /tmp
11mount -t proc proc /proc
12mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
13echo ':jar:M::PK\x03\x04::/usr/bin/jexec:' > /proc/sys/fs/binfmt_misc/register
f9ceed37 14[ -e /dev/ttyS1 ] && stty -F /dev/ttyS1 -echo
fdb99417
MG
15cd /mnt
16export PS1="# "
17EOF
6f7e6b07
MG
18cat >> vm/etc/sudoers <<EOF
19Defaults>nobody closefrom=5
20Defaults>nobody !env_check
21Defaults>nobody env_keep="ONLINE_JUDGE PATH HOME"
22EOF
df00c00b 23install gruntmaster-exec gruntmaster-compile vm/usr/bin/
2a6db364 24umount vm/proc
fdb99417 25mksquashfs vm vm.squashfs -comp lzo
This page took 0.011868 seconds and 4 git commands to generate.