Sorry if this is an extremely stupid question, but I'm brand new to Linux and I'd like to try to figure out how to modify my own system. From what little I know so far about Linux, I would imagine that what I'm actually looking for is the kernel's source code. I know that there are some resources out there that would allow me to download a copy of the kernel (like kernel.org), but presumably that is just a copy, and I would have to switch from my current kernel to that new one after modifying it in order to see the changes that I make take effect. Is there a way to avoid doing that, and just modify the kernel that I already have? And if not, how do I tell Ubuntu to use the new Kernel that I've downloaded rather than the original one? And how do I know whether or not my changes will screw up the system? Thanks in advance for your help!
|
|
Your question can be broken down into two parts, as you can tweak some kernel parameters during runtime and also bytepatching but as a beginner i would strongly not suggest you to try bytepatching. In your case, to getting started would i strongly suggest to do modifications to the source code recompile it, and install and test it. It do also exist ways to test your kernel in emulators eg. without the need to reboot your system eg. QEMU is one... It exist a lot of ways to do kernel development, here is way that should be simple if you have some expirence with using ubuntu. Quick and dirty (you need to complete some arguments\paths):
Just enter the menu tweak around if you wanna or just exit and save.
The level of parallelism when compiling it. (number of processor-cores +1)
Pick the targeted system, google it or leave it out. Two examples
If you want the compiler to optimize eg.
Do your tweaks, eg.
Compile the kernel and make deb packages, and report time used.
Install your compiled kernel and the headers.
Your kernel should be installed and show in your grub-boot-menu. Reboot.
Enable the grub boot menu or tap shift a few times during startup. Select your desired kernel to boot. If you use this guide, feel free to improve it. |
||||
|
|
|
There are a few different ways to do so, but it's good to know as much as you can about your computer (hardware wise). I used the instructions here :http://www.howtogeek.com/howto/ubuntu/how-to-customize-your-ubuntu-kernel/. I had to do some things different because the website had an older kernel version than the one i have. |
|||||
|
|
Ubuntu Wiki has an article on that: Kernel/Compile The article is a bit dated, but the important difference with other methods is that they explain how to get the source from kernel's Git repository, which is important if you ever plan to update your working tree to a new version. |
|||||
|