# Install Modified kernel help- the file- -the file!



## UNIXwannabie (Jul 2, 2014)

Dear BSD colleagues,

I have been using FreeBSD as a desktop since version 7, however even until today e.g FreeBSD 10, the software and the desktop itself is so unpredictable, unreliable, there isn't really much to be desired. I had moments that the pain was so hard that you would consider switching over to *W*indows, the most reliable desktop on this planet. 

However, after having learned some things here and there, I finally succeeded to build a desktop with the standard stuff and an up to date ports tree. Worth to mention: it took me two days to build it and I am very glad to have a backup in case the desktop crashes for whatever reason, and most of the time, this can happen without much trouble at all (I would call it sensitive stuff if you wish), and I do not even want speak about other bugs and sudden anomalies. The lucky one is Clonezilla: bare metal without much hassle, however backing up a RAID 0 volume is a pain in the ass, screen corruption and output (ASCII characters all over the screen), things you don't want to see while backup a system which cost me two days to build and three days to tune. 

Basic things like unreliable web page loading and basic printing do not work properly, e.g it does not print, even though you configured it right according to the handbook procedures. Now it does for whatever reason.

Basic DVD players like VLC and Mplayer do not work properly and the acceleration is horrible, too much trouble with non-working or half tested tunable options, I tested a dozen of videocards on FreeBSD and none of them actually accelerate on the system and the list goes on. It even crashes while opening a .doc file when using OpenOffice.Org, the so called alternative to Microsoft Office. 

Imagine some important employee is translating a document which is about a 500 pages long, OpenOffice.org crashes, he will open the file again and notices that the file is corrupt. _Poor lord could it be?_

But that doesn't change my situation as *M*icrosoft forced me to permanently switch to FreeBSD because of *M*icrosofts withdrawal of Windows XP. In terms of safe browsing I don't have a clue if *F*irefox on FreeBSD performs safer?

As I am a stubborn man, I am willing to stay with FreeBSD as a desktop. I have been struggling for almost two weeks, trying to recompile the kernel, following the procedure as instructed in the handbook. Now my goal is to strip down the kernel file to only the hardware that exists. Now the handbook says: svn bla bla bla, cp GENERIC to bla bla bla, make bla bla bla, make install bla bla bla. The handbook also mentions to override kernel modules bla bla bla*.*

I do not understand how to modify the KERNEL file, I have done `dmesg` and have knowledge of the hardware on the Sunmicro Workstation board. Can I remove all the lines of hardware I don't need in the file, or uncomment the lines? Even *G*oogle says to use the noodevice en and nooptions option. However when using it in the file, the kernel won't compile and I get an error. When I start to remove all the stuff from the custom file I don't need, it still compiles the kernel successfully but  I notice kernel modules being built which I removed from the file. The same for install, WLAN bla bla bla, parallel bus bla bla bla, stuff which I removed from the file being installed in /boot/kernel. And finally when I reboot the machine, when doing `uname`  FreeBSD is indeed showing my convention name, but when inputting `kldstat` unfortunately I see that there are kernel modules loaded which I don't want them to be loaded.

Can somebody help me out with this issue, I am getting gray hair from this, sticking with the generic one!

Thank you*.*


----------



## wblock@ (Jul 3, 2014)

*Re: Install Modified kernel help!!! -the file- -the file-!!!*



			
				UNIXwannabie said:
			
		

> the hardware on the Sunmicro Workstation board.



What hardware is this, exactly?


----------



## bsdkeith (Jul 3, 2014)

Do you really need to compile everything yourself? I happily run a FreeBSD desktop, set up from/with packages, & it is definately more stable than Microsoft ever was.
(Perhaps the unreliability is actually failing equipment.)


----------



## SirDice (Jul 5, 2014)

UNIXwannabie said:
			
		

> In terms of safe browsing I don't have a clue if Firefox on FreeBSD performs safer?


It is just as safe (or unsafe depending on your view) as running Firefox on Windows. The only benefit you have is that most exploits are written with Windows in mind, those obviously do not work on FreeBSD. But if there's a bug in Firefox on Windows it's very likely the same bug also exists on FreeBSD. It's the same source code that builds Firefox after all. 



> When I start to remove all the stuff from the custom file I don't need, it still compiles the kernel successfully but  I notice kernel modules being built which I removed from the file.


Everything is always built. The only thing the kernel config does is gather the modules you need and stuff them into the kernel. Everything not in the kernel is loaded as a module (where possible). This is by design and has been working like this since around version 4.0.



> And finally when I reboot the machine, when doing uname FreeBSD is indeed showing my convention name, but when inputting kldstat unfortunately I see that there are kernel modules loaded which I don't want to be loaded.


If they're loaded they're needed. If for example you remove the re(4) device from the kernel any `ifconfig re0` will automatically load the module. Apparently you removed stuff that's actually being used, that's why they're loaded.


----------



## UNIXwannabie (Jul 5, 2014)

The hardware I have tried to compile: SunMicro AMD Opteron s939, HSSLR-10 with DAS single disk 147Gb SCSI Wide on a basic SCSI Adaptor, 3,5Gb DDR 400
The same issue (kernel build/install procedure) occurs on another tested machine, SunMicro X7SBA XEON, 8Gb DDR2, LSI Logic U320 147Gb RAID0.

There are pages written about Printing e.g cups, all of them are obsolete, it's like they are acting that USB is a brand new technology and not yet supported, Duhhh?
 But if you want to modify the kernel, only 3 pages exist. Duuuuhhh? 

If someone can show me or at least tell me shortly, what I should do in order to do what I want to achieve (it is a wish)
I see WLAN kernel modules being installed into /boot/kernel, that doesn't seem logically to me, those systems do not have wireless at all.

Thanks


----------



## SirDice (Jul 5, 2014)

UNIXwannabie said:
			
		

> I see WLAN kernel modules being installed into /boot/kernel, that doesn't seem logically to me, those systems do not have wireless at all.


All devices are built and installed as modules, regardless if the machine actually has the hardware. Create a custom kernel without any WLAN devices and they simply will not be loaded. The modules themselves will still be in /boot/kernel. Just leave them there. 

I would suggest just keep running on GENERIC and fix the other issues you may have. GENERIC should work for most people, if there's anything you need that isn't in GENERIC it can usually be loaded as a module. Unless you have some specific needs there's usually no reason to build a custom kernel.


----------



## wblock@ (Jul 5, 2014)

The kernel config file only controls what is built into the kernel.  It is not a system compile control file.  Building all the modules does no harm, but if you want to disable building some of them, see src.conf(5).


----------



## UNIXwannabie (Jul 5, 2014)

Many thanks for your quick responses and finding, I will leave the GENERIC file as is.

But I think they must consider a full revision of the on line manual. Many things are obsolete, not complete, and there are many other things I found on the web not being mentioned in the handbook. Pretty harsh stuff I say,....

By the way as stated in my topic, my 'USB' printer finally works, but actually today it is not, although it has been correctly configured according to the handbook  

Am I not worthy enough to print a single page with only my NAME on it? :OOO 

-I consider this case closed-

Thanks again, I surely have many other questions and will post them on the forum.


----------

