Skip to content

Instantly share code, notes, and snippets.

@vicente-gonzalez-ruiz
Created January 30, 2023 16:25
Show Gist options
  • Save vicente-gonzalez-ruiz/313895e5f47512ab17050673738cc51f to your computer and use it in GitHub Desktop.
Save vicente-gonzalez-ruiz/313895e5f47512ab17050673738cc51f to your computer and use it in GitHub Desktop.
# 1. Download a kernel:
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.tar.xz
tar xvf linux-6.1.tar.xz
# 2. Configure the kernel (supposing a Manjaro kernel):
cd linux-6.1
make localmodconfig
# Optimize:
make nconfig
# Compile:
make -j$(nproc)
# Install modules:
sudo make INSTALL_MOD_PATH=/ modules_install
# Copy the kernel to the /boot directory:
sudo cp -v arch/x86_64/boot/bzImage /boot/vmlinuz-5.5.13-x86_64
# Create the initial RAM disk:
sudo mkinitcpio -r / -k 5.5.13-MANJARO -g /boot/initramfs-5.5.13-x86_64.img
# Show the grub menu:
# As root edit /etc/default/grub and change:
# GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT_STYLE=menu
#GRUB_CMDLINE_LINUX_DEFAULT="quiet apparmor=1 security=apparmor udev.log_priority=3"
GRUB_CMDLINE_LINUX_DEFAULT="apparmor=1 security=apparmor udev.log_priority=3"
# Update grub:
sudo update-grub
@vicente-gonzalez-ruiz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment