The easiest(and non-hacky) way to obtain vmlinux under Ubuntu is to add ddebs repository:
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs)-updates main restricted universe multiverse deb http://ddebs.ubuntu.com $(lsb_release -cs)-security main restricted universe multiverse deb http://ddebs.ubuntu.com $(lsb_release -cs)-proposed main restricted universe multiverse" | \ sudo tee -a /etc/apt/sources.list.d/ddebs.list sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 428D7C01
and install kernel debug symbols:
sudo apt-get update sudo apt-get install linux-image-$(uname -r)-dbgsym
vmlinux then can be found here:
/usr/lib/debug/boot/vmlinux-$(uname -r)