Skip to content

Instantly share code, notes, and snippets.

@khenidak
Last active March 9, 2022 00:38
Show Gist options
  • Save khenidak/22ae8d6005a0906a8923554d3bc6917b to your computer and use it in GitHub Desktop.
Save khenidak/22ae8d6005a0906a8923554d3bc6917b to your computer and use it in GitHub Desktop.
Run kernel v 5.0.0 on Azure VM

don't do this at home!. This runs kernel 5.0.0 on Azure VM. The version itself is not certified yet to run on Azure.

Prep

Create VM on Azure follow https://docs.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-cli

ssh to your new machine

Install prep req

apt install -y build-essential flex bison libssl-dev libelf-dev

Download and Extract

wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.0.tar.xz
xz -v -d linux-5.0.tar.xz
tar xvf linux-5.0.tar

No signture verification, You should be checking it.

Build

cd linux-5.0
cp -v /boot/config-$(uname -r) .config

# prep using existing kernel config
make olddefconfig
make prepare
make #-j $(nproc) if you decided to go with multicore VM

Install

make modules_install
sudo make install

Configure initramfs

update-initramfs -ck 5.0.0
sudo update-grub

Reboot and Check Kernel Version

shutdown -r now
# after boot 
uname -r
@khenidak
Copy link
Author

TIL :-) thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment