install-base.sh 895 Bytes
Newer Older
1
2
3
4
#!/bin/bash -eux

set -eux

5
6
7
apt-get update
apt-get -y install \
    iperf \
Antoine Kaufmann's avatar
Antoine Kaufmann committed
8
    iputils-ping \
9
    lbzip2 \
10
11
12
    netperf \
    netcat \
    ethtool \
13
    tcpdump \
14
15
16
    pciutils \
    busybox \
    numactl \
17
18
    sysbench \
    time
19
20
21
22
23
24

pushd /tmp/input
mv guestinit.sh /home/ubuntu/guestinit.sh
mv bzImage /boot/vmlinuz-5.15.93
mv config-5.15.93 /boot/
mv m5 /sbin/m5
Jonas Kaufmann's avatar
Jonas Kaufmann committed
25
26
27
28
29

GRUB_CFG_FILE=/etc/default/grub.d/50-cloudimg-settings.cfg
echo 'GRUB_DISABLE_OS_PROBER=true' >> $GRUB_CFG_FILE
echo 'GRUB_HIDDEN_TIMEOUT=0' >> $GRUB_CFG_FILE
echo 'GRUB_TIMEOUT=0' >> $GRUB_CFG_FILE
30
31
32
33
34
35
36
37
38
39
40
41
42
43
update-grub

# with stupid ubuntu22 /lib is a symlink at which point just untaring to / will
# replace that symlink with a directory, so first extract and then carefully
# copy... -.-
mkdir kheaders
cd kheaders
tar xf /tmp/input/kheaders.tar.bz2
cp -a lib/modules/* /lib/modules/
cp -a usr/* /usr/

# cleanup
popd
rm -rf /tmp/input