Users who want their OpenBSD machine to perform specific functions or need additional device drivers might want to customize their kernel. In other OS’s, like some types of Linux, it is very popular to rebuild the kernel because the default is so bloated. For most users, the default OpenBSD kernel is sufficient; however, you can still apply kernel patches, which will require rebuilding and installing a fresh kernel.
I prefer not to compile the kernel inside the source tree and IIRC the OpenBSD project also recommends that you build it in a separate directory. For convenience I do it this way:
mkdir /root/kernels && cd /root/kernels
cp /usr/src/sys/arch/i386/conf/GENERIC CUSTOM
vi CUSTOM
To make things faster (for future builds) I add the next step as an alias to .bashrc:
alias genkernel=’config -s /usr/src/sys -b . $1′
All I need to do now is issue the command “genkernel CUSTOM” in the /root/kernels directory and do “make depend && make” and I’m done. Move the kernel into / and reboot.
To clean out some left-over cruft I use this:
alias cleankernel=’rm -rf /root/kernels/{*.o,*.h,*.c,i386,options,machine,lib,version,Makefile,. depend}’
Laziness knows no limits; and it can be simplified even further by making it into a script
This article is so old.
I don’t know why this article has take a jab at Linux, by saying the default is bloated. Linux does not really have a set of default options for the kernel.
Distributions decide what is in or out of the kernel, and most stuff built as modules so the widest variety of hardware and features are supported.
Instead of pointing out phantom deficiencies in Linux; perhaps the article’s author can question why the OpenBSD project does not support recompiled kernels, and the Linux developers do.
It’s not that OpenBSD does not support rebuilding the kernel, it’s that the kernel was designed to be full featured and secure. In fact, there is a whole seciton in the OpenBSD faq’s about how to recompile your kernel, but I guess that Mr. Adam just assumes that he knows everything…
Adam, please feel free to read http://www.openbsd.org/faq/faq5.html#Options and actually attempt to learn about something before making a comment.
Looks like in FreeBSD. In FreeBSD it is fast and simple too.
it doesn’t mean that OpenBSD does not support rebuilding the kernel. it supports the rebuilding and therefore faq describes the process to rebuild the kernel. the faq just says that ‘OpenBSD TEAM supports the GENERIC kernel configuration only’ to simplify the SUPPORT process when users are having problems. have you ever rebuilt the kernel on OpenBSD machine? rebuilding the kernel in OpenBSD can be done with few simple commands like in FreeBSD (i don’t mean that the commands are the same). do you want to say FreeBSD doesn’t support rebuilding the kernel either?
“In other OS’s, like some types of Linux…”
Some types of Linux? AFAIK there is only one Linux.
It would appear that the various “distros” of Linux are clearly warping people’s perception of the reality that Linux is ultimately one operating system as released @ kernel.org.
Perhaps this could have been worded better? IE. “Some releases/revision/editions of Linux”, etc.
– j
Instead of pointing out phantom deficiencies in Linux; perhaps the article’s author can question why the OpenBSD project does not support recompiled kernels, and the Linux developers do.
Really? Recompile your kernel in Redhat, Mandrake or even Debian and ask for support. Not on IRC: official support. Chances they will tell you to use one of their kernels. Like some people said, it’s to simplify the support, not because it doesn’t work.
I’m saying it is not officially supported, as pointed out by someone previously, not that it isn’t possible.
Though recompiling your Linux kernel with vanilla sources is supported.
”
It would appear that the various “distros” of Linux are clearly warping people’s perception of the reality that Linux is ultimately one operating system as released @ kernel.org.
”
Ummmm, only the kernel is released at kernel.org, hence the name KERNEL.org. The Linux kernel is a very small part of the system, the rest of it is made up of GNU (released @ gnu.org btw). Never mind the fact that most distribution’s kernels vary from the ones released at kernel.org.
Although I suppose Windows is really just one operating system, not seperate ones when we refer to 3.1, 95, 98, 2000, xp, etc.
An operating system is just a kernel, so therefore the entire operating system is released at kernel.org. The GNU system is just a bunch of programs running in userspace which can run on top of any operating system with the appropriate system calls built in.
The Linux kernel is a very small part of the system
Yes, and that small part of the system is what we call an “operating system.”
An operating system is just a kernel, so therefore the entire operating system is released at kernel.org.
That is a joke right? I honestly can’t tell..
Anyways, this is not about the misnaming of another OS, but rather OpenBSD.
One thing I *really* like about OpenBSD is that (disregarding security patches) I never have to compile anything. So I dont. It all just seems to work for me, no need to modprobe anything either (default kernel is monolithic) – great timesaving device .
(No, I honestly dont mind the extra memory taken up)
No, it isn’t a joke.
An operating system (sometimes abbreviated as “OS”) is the program that, after being initially loaded into the computer by a boot program, manages all the other programs in a computer. The other programs are called applications or application programs. The application programs make use of the operating system by making requests for services through a defined application program interface (API). In addition, users can interact directly with the operating system through a user interface such as a command language or a graphical user interface (GUI).
An operating system performs these services for applications:
* In a multitasking operating system where multiple programs can be running at the same time, the operating system determines which applications should run in what order and how much time should be allowed for each application before giving another application a turn.
* It manages the sharing of internal memory among multiple applications.
* It handles input and output to and from attached hardware devices, such as hard disks, printers, and dial-up ports.
* It sends messages to each application or interactive user (or to a system operator) about the status of operation and any errors that may have occurred.
* It can offload the management of what are called batch jobs (for example, printing) so that the initiating application is freed from this work.
* On computers that can provide parallel processing, an operating system can manage how to divide the program so that it runs on more than one processor at a time.
All of that is done by the kernel.
What is it with all these HOWTO articles about things that are so well-documented already? There really is nothing new in there.
http://www.openbsd.org/faq/faq5.html#Options
I think Matt is right on this one. I never understood this “Linux is just the kernel” argument. The Linux kernel is the operating system on which the various GNU and other programs run.
Look at it this way: all those GNU tools that you think of as part of the OS, what operating system do they run on? Themsleves? No, Linux. The Linux kernel is the OS on which programs like bash, Xorg, and inetd run.
The disros may pile different tools on top of it, and even configure and build it in different ways, but its still all just variations of the same OS, because its an OS that is designed to vary.
It’s not worth trying to save a couple of megs. If anything goes wrong you won’t get any help unless you’re running GENERIC. I don’t know why people bring up Linux. The fact that the Linux people consider theirs as THE KERNEL is a bit arrogant, btw.
The statement that OpenBSD doesn’t support non-GENERIC kernels basically means this: don’t report problems to the mailing lists unless you can reproduce them with GENERIC. This makes it (much!) easier for people to reproduce/investigate/debug your problem.
Matt is only partly right, and I’ll tell you why. The term “operating system” only describes a system that operates a computer or device, nothing more.
If a kernel can operate a computer (or device) all by itself, it’s an operating system. An example would be on embedded devices where the kernel actually can do everything. That’s the whole system.
An example where the kernel IS NOT the operating system is on UNIX, and that’s because the kernel by itself is useless. It doesn’t “operate” anything without userland. In this case the kernel+userland makes out the whole system.
To explain where all this confusion comes from, type “define:kernel” into Google and read the responses in detail. Then after that, do it again with “define:operating system”.
You’ll notice that some claim that the kernel is just a “part of” an operating system while another claims that an operating system is “the kernel“. Confused yet? You should be, because not even dictionaries can get it right, and yes, they do in fact contradict one another. So it doesn’t really matter what sources you guys cite describing the kernel as “the entire operating system”, because, for each source claiming that, there is another claiming the exact opposite.
My point is, the term is vague and you first have to concider the context where the term is used otherwise it’s meaningless.
“The fact that the Linux people consider theirs as THE KERNEL is a bit arrogant, btw.”
well linux is the most common operating system that uses the term kernel, and it uses it alot. also when someone else makes an assumption that you know they are talking about linux, its best that you don’t assume they are being arrogant.
Well, I’d agree that the line is blurry and sometimes unclear. But I stand by what I said, and still think the kernel is everything (even in Unix). It certainly would be useless without userland, but I don’t think that matters. JMO
it basically depends on what direction you are looking from.
as an application developer, glibc and the kernel would be what make up the os, as just the kernel wouldnt do much. from an end users point of view, pretty much all of gnu + linux would be the os, as just linux wouldnt do much. from an os designers point of view, the kernel is the os, because thats what operates the computer.
its totally a matter of context, calling gnu+linux+xorg+dm the os is more shorthand then anything else.