aboutsummaryrefslogtreecommitdiffstats
path: root/tools/create-image.sh
diff options
context:
space:
mode:
authorKees Cook <keescook@google.com>2018-09-04 10:52:01 -0700
committerDmitry Vyukov <dvyukov@google.com>2018-09-05 19:26:06 +0200
commit873745f2ff183dcbc303a504683ccaa3a472a635 (patch)
treed9958fbc56c0fe2d040f9b00212db656c2fc5f28 /tools/create-image.sh
parent0b937a7eeff7b2840c45515a83458b741f810730 (diff)
tools: update to Debian stretch
This updates the image creation tool to use Debian stretch (current stable) instead of wheezy, which is very out of date. The only change needed here was a hint to systemd to make the root filesystem read-write after booting. Documentation has also been updated.
Diffstat (limited to 'tools/create-image.sh')
-rwxr-xr-xtools/create-image.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/create-image.sh b/tools/create-image.sh
index 91eb0a133..bb1030ce8 100755
--- a/tools/create-image.sh
+++ b/tools/create-image.sh
@@ -2,13 +2,13 @@
# Copyright 2016 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
-# create-image.sh creates a minimal Debian-wheezy Linux image suitable for syzkaller.
+# create-image.sh creates a minimal Debian Linux image suitable for syzkaller.
set -eux
-# Create a minimal Debian-wheezy distributive as a directory.
-RELEASE=wheezy
-DIR=wheezy
+# Create a minimal Debian distribution in a directory.
+RELEASE=stretch
+DIR=stretch
sudo rm -rf $DIR
mkdir -p $DIR
sudo debootstrap --include=openssh-server,curl,tar,gcc,libc6-dev,time,strace,sudo,less,psmisc,selinux-utils,policycoreutils,checkpolicy,selinux-policy-default $RELEASE $DIR
@@ -17,6 +17,7 @@ sudo debootstrap --include=openssh-server,curl,tar,gcc,libc6-dev,time,strace,sud
sudo sed -i '/^root/ { s/:x:/::/ }' $DIR/etc/passwd
echo 'T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100' | sudo tee -a $DIR/etc/inittab
printf '\nauto eth0\niface eth0 inet dhcp\n' | sudo tee -a $DIR/etc/network/interfaces
+echo '/dev/root / ext4 defaults 0 0' | sudo tee -a $DIR/etc/fstab
echo 'debugfs /sys/kernel/debug debugfs defaults 0 0' | sudo tee -a $DIR/etc/fstab
echo 'binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc defaults 0 0' | sudo tee -a $DIR/etc/fstab
echo "kernel.printk = 7 4 1 3" | sudo tee -a $DIR/etc/sysctl.conf