Building Your Own Linux Kernel, part 1
|
|
|
Comments (12)
Wasted comment-- it's Part 1.
Well, if the rest is like the beginning there is great room for improvement at least. Even closing with comments on initrd and tweaking/making/customizing same ... not even mentioning that unless your doing / encryption, LVM, or RAID initrd/initramfs and the like are 100% unnecessary. Sorry TC, the lead in as a pathetic let down, and now you owe me 2 minutes of my life due to rebuttal.
az, you owe me for pointless whining. I apologize on behalf of Akkana that there is not an entire book stuffed into a 1000-word article.
I think everyone should recompile their own kernel, with their own options, modularity, etc.
I with that we had a choice of compilers for the kernel: that last kernel NULL pointer vulnerability seems to have come from how GCC compiles the kernel.
Why do I think this? To fracture the kernel software base. This will add to the difficulty of getting a Linux kernel-mode rootkit to work. I've got exactly the same amount of data backing up this belief as the common "windows gets malware because of market share". In fact, if you think about it, if the "common == malware" is true, then we really really should all recompile our own kernels, and start work on a 2nd and 3rd compiler that can do a kernel compile.
I with that we had a choice of compilers for the kernel: that last kernel NULL pointer vulnerability seems to have come from how GCC compiles the kernel.
Why do I think this? To fracture the kernel software base. This will add to the difficulty of getting a Linux kernel-mode rootkit to work. I've got exactly the same amount of data backing up this belief as the common "windows gets malware because of market share". In fact, if you think about it, if the "common == malware" is true, then we really really should all recompile our own kernels, and start work on a 2nd and 3rd compiler that can do a kernel compile.
I would recommend getting the kernel version that came with your distros stable version and spend an hour or so picking Intel vs. AMD optimization. You can also pick the modules you want and I believe you can turn off loadable kernel modules if you wish for more security (some rootkits try to load a module).
I have the O'Reilley book and one day I may get the time to play with it but for the most part I just run the kernel that comes with the latest stable Slackware (still haven't upgraded to 13.0 yet). If I were building a server that faces the wild wild Internet I would definately build a custom kernel.
I have the O'Reilley book and one day I may get the time to play with it but for the most part I just run the kernel that comes with the latest stable Slackware (still haven't upgraded to 13.0 yet). If I were building a server that faces the wild wild Internet I would definately build a custom kernel.
A blast from the past! I fondly remember compiling my own kernels - which was BTW sine qua non back in the day, if one wanted sound and music whilst playing doom. One also needed to have the IRQ, DMA channel and I/O address parameters for the soundblaster handy, as these were compiled-in kernel parameters.
The advent of kernel modules, and modular sound drivers in particular, has obsoleted that rite of passage.
I also used to run the low latency and the preemptive patch sets, for optimum 3D FPS gaming - but the 2.6 kernel has pretty low latency out of the box, so I've gotten out of the habit - the contemporary distro kernels are good enough that I've not felt the need for some time.
However, this is all good information and a wonderful educational experience - good times!
The advent of kernel modules, and modular sound drivers in particular, has obsoleted that rite of passage.
I also used to run the low latency and the preemptive patch sets, for optimum 3D FPS gaming - but the 2.6 kernel has pretty low latency out of the box, so I've gotten out of the habit - the contemporary distro kernels are good enough that I've not felt the need for some time.
However, this is all good information and a wonderful educational experience - good times!
Quoting:start work on a 2nd and 3rd compiler that can do a kernel compile.
Already done. IIRC the Intel compiler is able to compile the Linux kernel for x86 and x86-64.
Quoting:A blast from the past! I fondly remember compiling my own kernels - which was BTW sine qua non back in the day...and for other die-hard DIY'ers, there is always the infamous distro Linux From Scratch (LFS), see http://www.linuxfromscratch.org/
LFS variants include: - the original Linux From Scratch - Beyond Linux From Scratch (BLFS) - Automated Linux From Scratch (ALFS) - Cross Linux From Scratch (CLFS) - Hardened Linux From Scratch (HLFS)
Hey, there's an LFS-fork, "DIY Linux": http://www.diy-linux.org/
Haven't tried it yet, but it looks even harder than LFS.
Haven't tried it yet, but it looks even harder than LFS.
Yes, LFS - that's one I mean to try someday when I have some time - it would be a therapeutic activity for an old geek.
Quoting:start work on a 2nd and 3rd compiler that can do a kernel compile.
Already done. IIRC the Intel compiler is able to compile the Linux kernel for x86 and x86-64.
And it's highly probable that LLVM can compile Linux too.
Post a comment
A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.
Your message:Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help
Sign up and post (it is free) or Log in and post

If you just blindly move along with this, without any warnings, you will end up either with a brick or enough knowledge of kernels and modules that you probably should have taken the time at the start to optimize your kernel in the first place.