aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-24 13:54:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-24 13:54:49 +0200
commitea81317d3757f625c6728ef8b1bd512aa3393332 (patch)
treebdfd93cc16a41a2c7e3c37b72203392f936f3b8e /bootstrap
parent519557ffe8d6c88d1cb6fdb9120b06185042cd99 (diff)
Implement second stage (systemd) network configuration
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap16
1 files changed, 13 insertions, 3 deletions
diff --git a/bootstrap b/bootstrap
index 18343be..c97d30b 100755
--- a/bootstrap
+++ b/bootstrap
@@ -30,7 +30,7 @@ btrfs=/btrfs
release="unstable"
mirror="https://deb.debian.org/debian/"
passwd="123" #@@ TMP root passwd.
-macaddr="DE:AD:BE:EF:B8:DA" # Mac address for testing.
+macaddr="de:ad:be:ef:b8:da" # Mac address for testing.
root="$btrfs/$id/buildos"
@@ -141,9 +141,15 @@ if [ "$stage" -eq "1" ]; then
# - systemd-container seems to be required by host systemd-nspawn.
#
pkgs="locales,systemd-container"
- pkgs+=",net-tools,iproute2,iptables,isc-dhcp-client,ifupdown,ntp"
- pkgs+=",iputils-ping,wget,curl"
+
pkgs+=",linux-image-amd64,irqbalance,pciutils"
+
+ pkgs+=",hdparm,btrfs-progs"
+
+ pkgs+=",net-tools,iproute2,iptables,isc-dhcp-client"
+ pkgs+=",ifupdown,bridge-utils,dnsmasq,ntp"
+ pkgs+=",iputils-ping,wget,curl"
+
pkgs+=",less"
sudo debootstrap \
@@ -208,6 +214,10 @@ chattr +i /etc/localtime
#
chpasswd <<<'root:$passwd'
+# Enable IPv4 forwarding (used for private bridge NAT).
+#
+sed -i 's/^# *\(net.ipv4.ip_forward\).*/\1=1/' /etc/sysctl.conf
+
# Setup locale. We only support en_US.UTF-8.
#
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen