From 873745f2ff183dcbc303a504683ccaa3a472a635 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Tue, 4 Sep 2018 10:52:01 -0700 Subject: 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. --- tools/create-image.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tools/create-image.sh') 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 -- cgit mrf-deployment