-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-vmlinux.sh
executable file
·20 lines (20 loc) · 1.03 KB
/
install-vmlinux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/env bash
#
# Works with Ubuntu 16.04
#
if [[ ! -f /usr/lib/debug/boot/vmlinux-$(uname -r) ]]; then
DDEBS_LIST=/etc/apt/sources.list.d/ddebs.list
if [[ ! -f ${DDEBS_LIST} ]]; then
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse" | sudo tee -a ${DDEBS_LIST}
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs)-updates main restricted universe multiverse" | sudo tee -a ${DDEBS_LIST}
# echo "deb http://ddebs.ubuntu.com $(lsb_release -cs)-proposed main restricted universe multiverse" | sudo tee -a ${DDEBS_LIST}
wget -O - http://ddebs.ubuntu.com/dbgsym-release-key.asc | sudo apt-key add -
fi
echo "Downloading kernel symbol could take long time (e.g. 30 mins)."
read -p "Are you ready to start (y/N)? " ANSWER
if [[ ( $? -eq 0 ) && ( ( "${ANSWER}" = "y" ) || ( "${ANSWER}" = "Y" ) ) ]]; then
sudo apt update -y
sudo apt install -y linux-image-$(uname -r)-dbgsym
echo "Kernel symbol is successfully installed."
fi
fi