From 236f24aeac18c0f7b86eca9e20e296e9b68e60c3 Mon Sep 17 00:00:00 2001 From: fithwum <34775371+fithwum@users.noreply.github.com> Date: Mon, 31 Dec 2018 13:03:19 -0800 Subject: [PATCH] Create debian-stretch.sh --- debian-stretch.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 debian-stretch.sh diff --git a/debian-stretch.sh b/debian-stretch.sh new file mode 100644 index 0000000..05f43ab --- /dev/null +++ b/debian-stretch.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Copyright (c) 2018 fithwum +# All rights reserved + +debootstrap --keyring /etc/apt/trusted.gpg.d/debian-archive-stretch-stable.gpg --force-check-gpg +--variant=minbase --components=main,contrib,non-free --include=dirmngr,apt-transport-https,wget,bzip2 --arch=amd64 +stable debian-stretch http://deb.debian.org/debian/ +sleep 5 +du --human-readable --summarize debian-stretch +sleep 10 +mount --bind /dev debian-stretch/dev +mount --bind /dev/pts debian-stretch/dev +mount --bind /proc debian-stretch/proc +mount --bind /sys debian-stretch/sys +sleep 2 +sudo chroot debian-stretch + +echo "APT::Get::Assume-Yes \"true\";" | tee /etc/apt/apt.conf.d/10-assume_yes + +apt-get install --no-install-recommends git + +apt-get remove --allow-remove-essential e2fsprogs e2fslibs nano +pinentry-curses whiptail kmod iptables iproute2 dmidecode + +apt-get clean + +find /var/lib/apt/lists/ -maxdepth 2 -type f -delete + +exit + +umount debian-stretch/dev/pts +umount debian-stretch/dev +umount debian-stretch/proc +umount debian-stretch/sys + +du --human-readable --summarize debian-stretch + +tar --verbose --create --file debian-stretch.tar --directory debian-stretch . + +ftp-upload -v -h 192.168.1.92:8001 -u {} --password {} -d /files debian-stretch.tar + + +