How to compile Linux Kernel on Debian VirtualBox Guest
C. BinKadal --- Sendirian, Berhad

Debian Packages

See for more details.

Download Latest STABLE Kernel

Fetch the latest STABLE kernel from

# START =============================================================
STABLE=$(wget -O - -o /dev/null | awk '/stable/ {print $NF; exit}')
MAJOR=$(echo $STABLE | cut -d. -f1)

# ===================================================================
# Wget the latest kernel stable version
wget -c $KURL
# ===================================================================
# Wget the signature
wget -c $PURL
# ===================================================================
# Locate Keys
gpg --locate-keys

Sign Key (optional)

gpg --sign-key

Uncompress the file and verify

# ===================================================================
# Uncompress
unxz $KERNEL
# Verify
gpg --verify $PGP $TARBALL

Extract TAR file

# ===================================================================
tar xvf $TARBALL
# ===================================================================
cd linux-$STABLE

Overkilled/Bad Cleaning Habit

make distclean
make mrproper
make clean

Creating a SIMPLE SMALL “.config” file

make x86_64_defconfig


make menuconfig

Menuconfig (e.g., for cbkadal)

General setup  --->
  (-cbkadal-10) Local version - append to kernel release
  Kernel compression mode (XZ)  --->
  (cbkadal) Default hostname
  <*> Kernel .config support
  [*] Enable access to .config through /proc/config.gz
  <*> Enable kernel headers through /sys/kernel/kheaders.tar.xz
Processor type and features  --->
  [ ] EFI runtime service support 
File systems  --->
  <*> FUSE (Filesystem in Userspace) support
  <*>   Character device in Userspace support
  <*>   Virtio Filesystem 
Security options  --->
  [ ] NSA SELinux Support
  [*] AppArmor support
  [*]   Enable introspection of sha1 hashes for loaded profiles
  [*]     Enable policy hash introspection by default
  First legacy 'major LSM' to be initialized
    (X) AppArmor
Kernel hacking  --->  
  Compile-time checks and compiler options  --->
    [*] Install uapi headers to usr/include

Compile (make)

time make

Install (root)

# USER: ROOT ============
make modules_install

make install

make headers_install INSTALL_HDR_PATH=/usr

Known Boot Errors

ata1.00: Read log 0x00 page 0x00 failed, Emask 0x1

© 2021-2022 --- C. BinKadal --- About --- Revision: 0033b--19-Apr-2022.