Skip to content

Instantly share code, notes, and snippets.

@daryltucker
Last active August 29, 2015 14:05
Show Gist options
  • Save daryltucker/f9a4a46be9fccd158179 to your computer and use it in GitHub Desktop.
Save daryltucker/f9a4a46be9fccd158179 to your computer and use it in GitHub Desktop.
Compiling a new Kernel using old configuration.

Copy current kernel configuration to linux source

cp -vi /boot/config-`uname -r` .config

Decide about new kernel options

Use the following if you wish to only build modules for devices currently in use/connected. For example, if you don't have any usb_storage devices, you won't be able to plug in usb drives.

make localmodconfig

Compile the kernel

make -j6

Compile kernel modules

sudo make modules_install

Install/Place kernel and libs where they should be

sudo make install

Update GRUB (possibly optional)

sudo update-grub2

Update initramfs (possibly optional)

sudo update-initramfs -u
@daryltucker
Copy link
Author

yes "" | make oldconfig will force default values for config.

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