aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap25
1 files changed, 21 insertions, 4 deletions
diff --git a/bootstrap b/bootstrap
index a898be4..78dd42e 100755
--- a/bootstrap
+++ b/bootstrap
@@ -26,7 +26,7 @@
#
usage="usage: $0"
-macaddr="de:ad:be:ef:b8:da" # @@ TMP Mmac address for testing.
+macaddr="de:ad:be:ef:b8:da" # @@ TMP mac address for testing.
id="$(id -un)"
btrfs=/btrfs
@@ -45,12 +45,14 @@ root="$btrfs/$id/buildos"
#
release="unstable"
components="main,contrib,non-free"
-mirror="https://deb.debian.org/debian/"
+mirror="http://deb.debian.org/debian/"
+#mirror="https://deb.debian.org/debian/"
base_pkgs="locales,klibc-utils,sudo,systemd-container,udev"
base_pkgs+=",kmod,linux-base,firmware-linux-free,irqbalance,pciutils,usbutils"
base_pkgs+=",intel-microcode,amd64-microcode"
base_pkgs+=",hdparm,btrfs-progs"
+base_pkgs+=",lm-sensors"
base_pkgs+=",net-tools,iproute2,iptables,isc-dhcp-client"
base_pkgs+=",ifupdown,bridge-utils,dnsmasq,ntp,postfix"
@@ -65,7 +67,7 @@ base_pkgs+=",qemu-kvm,qemu-utils,socat"
base_pkgs+=",g++,make,pkg-config"
-extra_pkgs="lm-sensors"
+extra_pkgs="ca-certificates,smartmontools"
owd="$(pwd)"
trap "{ cd '$owd'; exit 1; }" ERR
@@ -242,7 +244,11 @@ mount --move /sys /tmp/sys
# Run second stage of debootstrap.
#
-/debootstrap/debootstrap --second-stage
+if ! /debootstrap/debootstrap --second-stage; then
+ cat /debootstrap/debootstrap.log 1>&2
+ bash
+ exit 1
+fi
rm -f /etc/localtime
cp /usr/share/zoneinfo/UTC /etc/localtime
@@ -364,12 +370,19 @@ set -x
#
apt-get update
apt-get install -y build-essential linux-source
+apt-get install -y bison flex
+apt-get install -y libelf-dev
+apt-get install -y libssl-dev
cd /usr/src
tar xf linux-source-*
mv linux-source-*/ linux
xzcat linux-config-*/config.amd64_none_amd64.xz >linux/.config
cd linux
+# Adjust configuration.
+#
+echo 'CONFIG_SYSTEM_TRUSTED_KEYS=""' >>.config
+
# Adjust kernel command line size limit.
#
sed -i -re 's/^(#define COMMAND_LINE_SIZE ).+\$/\1 4096/' arch/x86/include/asm/setup.h
@@ -437,6 +450,10 @@ for p in \$(sed -e 's/,/ /g' <<<"$extra_pkgs"); do
apt-get install -y --no-install-recommends "\$p"
done
+# We want the utility (smartctl) but not the daemon.
+#
+systemctl disable smartd
+
# Create the build user, /build home directory. Make a password-less sudo'er.
#
# Note that we force UID/GID to specific numbers to make sure they are