Jump to content
Steve Scrimpshire

My Thoughts About Converting People

Recommended Posts

You can load a new module into the kernel w/out rebooting.

 

This is a good explanation for Kernel Modules:

 

https://www.redhat.com/docs/manuals/linux/R...el-modules.html

 

Basically, if you configure your kernel and add a module to it, a simple

 

make modules

make modules_install

insmod <whatever>

 

and your done. No reboot required.

 

You do have to add it for future reboots, but right off the bat you can get going with a module w/out a problem.

Share this post


Link to post
Share on other sites

Ah young padawan....

You are asking the right questions....

 

Now, next lesson and hold that light sabre tightly!

 

A module doesn't have to be compiled into the kernel UNLESS its needed to boot.

As just said they can be loaded/unloaded after at will. (and ahem without rebooting)

 

Lets see, you can't change the kernel without a reboot becuase the kerenl is the system.

 

Bit its can be added to and whats added can be taken away.

I dun't wanna guess your age but remember an old workaround in Win 98 or 95.

When certain (and I forget which but like a graphics prob) problems occured you could do something really trivial like change the keyboard and restart windows and the problem which had nothing to do with the keyb dissapeared.

 

This is becuase win.com was rebuilt each time (hmm maybee this was 3.11)

in effect rebuilt a kernel over a kernel.

 

When you reloaded not only did the keyboard change but also the graphics...

then you change the keyb back, restart win et viola.

 

Then came 95 and the end of protected mode.

So now you must REBOOT to rebuild....

 

 

OK in linux the drivers (modules) are just loaded dynamically since 2.2.0

If you have a SCSI drive you boot from then the SCSI modules need top be part of the kernel BUT if you boot from an IDE drive you can jsut load the SCSI module and access it later. The same is true of course in reverse.

 

The kernel is that which runs in memory space all the time BUT can be added to by modules.

So if you boot from an ext3 partition you need ext3 in the kernel.

etc etc.

 

Performance wise comiling into the kernel is good, stabilty wise BAD ... VERY BAD. In that direction is the dark side :D (sorry just back from the pub don't know why i came over all Star Wars)

Windows compiles graphics support into the kernel.

If the graphics develops an error you get BSOD.

 

In linux the worse that can happen is you restart the X server!!!

 

Windows compiles it in because frankly it would be so slow without it would be a joke, they did try actually!!!

 

When you compile a kernel you choose whether a certain 'driver' is compiled in or as a module.

 

Your next question for 20 points is :

What are patches and why ?

40 points for anyone answering before me!!!!

Heck I can't educate the world and we have PLENTY of knowledgable people here!

Share this post


Link to post
Share on other sites
Your next question for 20 points is :

What are patches and why ?

You should have known better than to ask that with a bunch of wise guy's.

 

Patches, we don't need no stinking patches.

 

The patch helps you stop smoking by giving you high doses of nicotine.

 

If were talking kernel patches, in it's basic sense, a patch includes fixes and new features.

Share this post


Link to post
Share on other sites
Patches, we don't need no stinking patches.

 

The patch helps you stop smoking by giving you high doses of nicotine.

Hmm, Patch? I think I've seen him around this forum a couple of times. You really should be nicer to him!

 

Haven't seen him offer anyone a cigarette though... :unsure:

 

wait a minute, are we talking the same Patch?

Share this post


Link to post
Share on other sites
Your next question for 20 points is :

What are patches and why ?

You should have known better than to ask that with a bunch of wise guy's.

 

Patches, we don't need no stinking patches.

 

The patch helps you stop smoking by giving you high doses of nicotine.

 

If were talking kernel patches, in it's basic sense, a patch includes fixes and new features.

AGGGHHHH : Is this a monologue..... ?

cybrjackle: YOU, YES YOU are one of those knowlegable people... :D

 

The question is in the context of the orginal question, why would you want to patch a kernel....

 

Suggested topics would include... preemptive multitasking... stabilty vs speed, different kernel trees. Adding features needed by a driver or taking things out (like say PCMCIA is compiled in but you want to load it as a module)

Share this post


Link to post
Share on other sites

Sorry to be slow responding, things have been hectic here. And also apologise for taking this thread OT, but oh well, it happens.

 

cybrjackle, thanks for the link, interesting read.

 

Yoda, I mean Gowator :) you write clearer explanations when you haven't been to the pub, but I expect you know that already. The anecdote about Win3.1 is good - I do remember 3.1, but I was even more ignorant then than I am now (extraordinary, but true). As regards my age, let's just say that Steve and I have a lot in common ;)

 

I am amused that the answer to my question as to why things needed to be compiled into the kernel was that they generally don't. Though this statement

 

>When you compile a kernel you choose whether a certain 'driver' is compiled in or as a module.

 

is helpful. And I get the general sense that it's usually for reasons of performance. I think. Some confusion however arises in that there seems to be two senses of the word "kernel" - one is composed largely of modules, the other seems to be an atomic entity, in the sense that you can't divide it further, only add to it. Is that right? I would then hazard a guess that it's this "atomic" kernel that needs the patches, the recompiles, and the reboots. Because any other problem could be fixed by removing a module and replacing it with another. Unless you need the performance gains from compiling it in. Would that be anything vaguely approaching right?

 

btw, I'm very grateful for all the info, and don't feel obliged to respond. Only do it if you're having fun (good motto, don't you think?)

Share this post


Link to post
Share on other sites

Essentially you got it!!!!

 

Trying to determine what needs loading and what is compiled in is a bit blurry.

 

(Like the difference say between memory and disk is when you start talking about swap files or virtual memory)

 

Basically don't beat yourself up over it yet!!!

 

The golden rule, if you need it to boot then it goes IN the kernel (atomic)

 

Your nuclear analogy is very good.

 

Think of the kernel as the nucleus and the modules as electrons.

They also have 'orbits', that is loading a module into a high orbit can only be done with the supporting modules...

 

Take say USB mass storage.... this is a module.... unless you want to boot from a flash disk it doesn't need to be in the kernel.

 

But it needs the usb module loading first (there are actually 3, one each for the two usb 1 standards and one for usb2)

 

I then it also needs a filesystem supported, lets say vfat, another module

but before it knows that it must identify the partition...

linux, for historical reasons does this as a SCSI device.

but its really an IDE device and it loads a module ide_scsi

 

For this to be working it needs to have ide and scsi loaded, normally one was loaded at boot becuase you have to load from something and therefore one will be in the kernel.

the other can be loaded as a module.

 

so your usb mass storage device loads all these modules.

It knows about them becuase of a file called /etc/modules.dep

this is know as module dependancies.

 

Now, not everything is perfect, not even in opensource and bad modules can exist.

 

If they are loaded as modules then they will not crash the system if something goes wrong but if they are compiled into the kernel they will.

 

If I said the kernel can't be changed once its loaded I'd be lying but in the same way as telling you the nucleus is composed of protons and neutrons which are fundamental particles.

 

Under normal conditions its no, not really.

 

 

 

kernel patches are for various reasons. Im not into giving a symbols and semaphores tutorial right now....

 

I'd ermm need to refresh my memory!!!

 

In short, when you compile it leaves hooks that can be attached to. These are often kernel specific and therefore a driver (module) needs to be patched with a very similar set of velcro to attach properly.

 

Many kernel patches are just modifying these old hooks to fit the velcro.

 

Others are for instance performance like pre-emptive mutlitasking and things.

these are things that are still considered too unstable to be part of the official stable kernel.

 

Thse are maintained along with the official kernel at www.kernel.org

http://www.kernel.org/pub/linux/kernel/people/

 

there are lots of these, some enable or change features like the standard nfs or ip stack to enable a certain applicaiton to bypass inherent limits

Others allow you to use say bad memory or memory with bad blocks....

 

others use more mutlimedia functions, etc. etc.

i used to have alink to the most common and widely used ones...

perhaps someone else has one!!

Share this post


Link to post
Share on other sites

Hmm, the Force is strong in this one... interesting...

 

Thanks Gowater, that's most informative. You'll be relieved to hear that I am reaching information overload at this point. I will go and lie down in a darkened room and let all this sink in for a bit. Or maybe just lie down in a dark room... whether anything will sink in is another question.

 

Have you thought about writing a Beginner's Guide to the Kernel? You seem to have done most of the hard work in this thread already.

Share this post


Link to post
Share on other sites

Well, I could get some input from others....

Most of what I know or learned is from experience, not actually learning... (I wish someone had explained it to me) so I might not always be 100% correct. So I need a bit of QC from others.

 

I bet cybrjackle would help but I also know he's got a bad harddrive right now!!!

 

I can't help feeling it must have been done....

Perhaps all the kernel hackers have there heads so far in the clouds they never thought tio write it down!!!

 

Someone really aughta write it and have it on kernel.org

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...