Skip to content
Snippets Groups Projects
Commit 12ab7595 authored by Jeffrey Tolar's avatar Jeffrey Tolar
Browse files

Use systemd-networkd; work around VirtualBox issues

parent e57f2639
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,6 @@ PACKAGES=(# Core packages
base-devel
linux-lts{,-headers} # use lts because current VirtualBox (~5.1.2) doesn't play nicely with the new (4.7) kernel
grub
ifplugd
# X things
virtualbox-guest-dkms
virtualbox-guest-utils
......@@ -52,6 +51,10 @@ PACKAGES=(# Core packages
valgrind
iverilog # cs233
)
IGNORE_PACKAGES=(
linux # using linux-lts
netctl dhcpcd # using systemd-networkd
)
set -e -x
......@@ -108,8 +111,7 @@ else
fi
sudo arch-chroot root/ <<chrootEOF
# Remove the non-lts kernel
pacman -R --noconfirm linux
pacman -Rs --noconfirm ${IGNORE_PACKAGES[@]}
# random setup - hostname, timezone, locales
echo cs2xx-vm > /etc/hostname
......@@ -122,10 +124,16 @@ echo LANG=en_US.UTF-8 > /etc/locale.conf
# networking
ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
cp /etc/netctl/examples/ethernet-dhcp /etc/netctl/wired
netctl enable wired
systemctl enable netctl-sleep.service
systemctl enable netctl-ifplugd@eth0.service
ln -sf /usr/lib/systemd/resolv.conf /etc/resolv.conf
sed -i '/^hosts:/ s/\<dns\>/resolve/' /etc/nsswitch.conf
systemctl enable systemd-networkd systemd-resolved.service
cat > /etc/systemd/network/wired.network <<"networkEOF"
[Match]
Name=eth0
[Network]
DHCP=ipv4
networkEOF
# setup pacman keyring
......@@ -307,6 +315,7 @@ VBoxManage modifyvm "$uuid" \
--biosbootmenu disabled \
--rtcuseutc on \
--nic1 nat \
--cableconnected1 on \
--clipboard bidirectional \
--draganddrop bidirectional
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment