wmirescue/stretch-amd64/bin/basefs_init

28 lines
631 B
Plaintext
Raw Normal View History

2017-07-05 23:51:31 +02:00
#!/bin/sh
TARGET=$1
LANG=C
mkdir ${TARGET}
debootstrap --arch=amd64 --variant=minbase stretch ${TARGET} http://httpredir.debian.org/debian
cat << EOF > ${TARGET}/etc/apt/sources.list
deb http://httpredir.debian.org/debian stretch main contrib non-free
deb http://security.debian.org/ stretch/updates main contrib non-free
EOF
cat << EOF > ${TARGET}/etc/apt/apt.conf.d/80small
APT::Install-Recommends '0';
APT::Install-Suggests '0';
EOF
echo wmirescue > ${TARGET}/etc/hostname
echo 'root:wmi' | chroot ${TARGET} chpasswd
chroot ${TARGET} apt-get update
chroot ${TARGET} apt-get upgrade --yes
chroot ${TARGET} apt-get clean