Created
November 8, 2019 20:22
-
-
Save rohithreddy/56c6e65255ea86006a21f669c00b7560 to your computer and use it in GitHub Desktop.
Gentoo Kernel upgrade / build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eselect kernel list | |
eselect kernel set # | |
# Use current kernel config and store copy | |
gunzip /proc/config.gz -c > /root/config; cp /root/config /root/config-$(uname -r) | |
# Optionally change module settings in the config file, or use --menuconfig | |
# with genkernel. | |
genkernel --makeopts=-j9 --splash --kernel-config=/root/config all | |
# Update packages with kernel modules | |
emerge -1 @module-rebuild | |
# Cleanup old files | |
for name in $(ls /lib/modules/ | sort -V | head -n -3); do | |
rm -rf /boot/{initramfs,kernel,System.map}-genkernel-x86_64-${name:?} | |
rm -rf /lib/modules/${name:?} | |
done | |
# Update boot config file | |
grub-mkconfig -o /boot/grub/grub.cfg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment