Created
December 4, 2017 15:12
-
-
Save vStone/1a3a3a80bc7570e58f8f1fa0d8133637 to your computer and use it in GitHub Desktop.
Gentoo kernel upgrade (must enable config support in kernel cfr /proc/config.gz)
This file contains hidden or 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
#!/bin/bash -e | |
errr() { | |
echo "$@" 1>&2 | |
exit 1; | |
} | |
( | |
cd linux/ | |
gunzip -c /proc/config.gz > .config | |
make oldconfig || errr "Could not configure" | |
make -j13 || errr "Could not build" | |
if ! grep ' /boot ' /proc/mounts; then | |
mount /boot || errr "Could not mount /boot" | |
else | |
echo "/boot is already mounted" | |
fi; | |
make install || errr "Unable to install new kernel" | |
make modules_install || errr "Unable to install modules" | |
) | |
emerge @module-rebuild || errr "ERROR while compiling extra kernel modules" | |
genkernel initramfs || errr "Could not generate initramfs" | |
grub-mkconfig -o /boot/grub/grub.cfg || errr "Could not update grub config" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment