Author Topic: Compiling your own Kernel  (Read 2161 times)

jedi

  • DEFCON 1
  • Posts: 1540
  • Not all those who wander are lost.
    • View Profile
    • NixNut.com
Compiling your own Kernel
« on: August 25, 2015, 07:27:58 AM »
Got this idea from PackRat.  Thought I'd just post it here so I don't lose it!  If it helps you out, thank PackRat and the other individuals listed in this post.  I copied all of it

It is smooth. I tweak it for my cpu and unload some of the video drivers - like trident - that I'll never use and pick up a bit of performance.

Using VSIDO for an NFS file/media server. Need to get it going as an (internal) ftp server; I carried over my ftp configuration from slackware (or so I thought), but something isn't right now. But all things considered VSIDO as server = happiness.

Great to hear that about a VSIDO server...  How do you go about the tweak and removal with the kernel?  That would be a great How To if you ever felt up to it

This is the method I use for a debian kernel -

http://verahill.blogspot.com/2012/07/compiling-kernel-35-on-debian-testing.html

You need to install kernel-package, fakeroot, and build-essential for this to work.

There is also a site called kernel seeds (kernelseeds.org I think) that has some good commands to determine your hardware - appears to be down at the moment.

The only additional step I do is after the make oldconfig command. Once you have answered all the questions, use the command -

Code: [Select]
make menuconfig
to bring up a graphical menu of your kernel config file. I make these changes -

Change the cpu type to my cpu - the default is generic 64 or 32 bit
Change the maximum number of CPUs to what you have or 2x what you have - the default is 512 CPUs and something like 8k of memory is alloted for each one.

The real changes are in the drivers sections - usually your hardware isn't going yo change, so you can remove plenty of stuff you don't have - like broadcom ethernet devices and trident video cards.

That decreases the size of the compiled kernel, as well as memory needed since those drivers are dropped - and won't get loaded.

Save the new config and finish the steps in that linked guide.

The performance increases are really only slight - it's more about building a more efficient kernel designed for your computer.

The Slackware beginners' guide and Arch Wiki have good HowTo's for building kernels that are generic build instructions.

Doc. attached with start to finish directions.
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous

VastOne

  •      v-ger
  • Posts: 3948
    • View Profile
    • VSIDO Community
Re: Compiling your own Kernel
« Reply #1 on: August 25, 2015, 05:04:10 PM »
Brilliant Jedi...

Thanks for this How To!
VSIDO      VSIDO Twitter     VSIDO FB     VSIDO Google+   

I dev VSIDO

PackRat

  • Posts: 1946
    • View Profile
Re: Compiling your own Kernel
« Reply #2 on: August 27, 2015, 02:45:30 PM »
kernel seeds site referenced above.

It's pretty handy to determine what hardware is on a GNU/Linux system. If you're really diligent, you can really cut down the size of your kernel and boot times. Some people were claiming 10 second boot times on sysVinit systems.

home page kernel seeds

Can also go the extra mile and optimize your system by compiling against your hardware.
I am tired of talk that comes to nothing.
-- Chief Joseph

...the sun, the darkness, the winds are all listening to what we have to say.
-- Geronimo

Snap

  • Posts: 474
    • View Profile
Re: Compiling your own Kernel
« Reply #3 on: August 28, 2015, 12:27:47 AM »
Thanks, guys. I'll get into all this whenever I manage to thin my too many opened fronts.

hakerdefo

  • Posts: 520
    • View Profile
    • Looking at Linux through the Windows of Life
Re: Compiling your own Kernel
« Reply #4 on: August 31, 2015, 08:05:30 PM »
Nice jedi! Many will find this document very handy.
Cheers!!!
You Can't Always Git What You Want

jedi

  • DEFCON 1
  • Posts: 1540
  • Not all those who wander are lost.
    • View Profile
    • NixNut.com
Re: Compiling your own Kernel
« Reply #5 on: August 31, 2015, 08:59:06 PM »
As I said in the OP, all the praise goes to PackRat.   8)  I simply copied all his info into this document basically.  The 'LinuxChix' web-site is great info as well, and I confess to blatantly copying from them as well...  ???
Forum Netiquette

"No matter how smart you are you can never convince someone stupid that they are stupid."  Anonymous