PDA

View Full Version : Preempt kernel, anyone?



12-28-2002, 06:38 PM
Hey all:

Just started playing with Knoppix. After installing on my HD, I started checking out the kernel. Looks like a 'vanilla' kernel with XFS patch, and a small Knoppix patch.

Has anyone recompiled it with the preempt patch? I've compile kernels before, but I'm a little stumped....my /usr/src/linux doesn't actually contain the sources, I'm guessing to save space. I looked at the included .config file, and it seems that it's building almost every module available!

So can I just download the latest from kernels.org, apply my patches, and compile? I wasn't really sure how to handle initrd.gz, either.

-Charlie

eadz
12-29-2002, 12:29 AM
See my post here for an already compiled kernel with low-latency ( like preeemt) and LPP and crypto.

http://www.knoppix.net/forum/viewtopic.php?t=66

drfreak
01-15-2003, 02:00 AM
I had a fun time hacking away with Klaus' miniroot and compiling my own custom kernel. I'll write up a little knoppix-custom-kernel-howto if enough people are interested.

I have dist-upgraded knoppix 3.1 (12/12/2002) to debian unstable for the snappy gcc 3.2.2, and hacked up my own kernel based on the -ck patch compilation for 2.4.20. I also have modified the Knoppix CD to boot with isolinux, removing the need for floppy or hard drive emulation, and the need for mounting a floppy image with the loop device, then a second floppy image under a second loop device to get to the initrd environment for hacking :)

eadz
01-15-2003, 02:07 AM
I had a fun time hacking away with Klaus' miniroot and compiling my own custom kernel. I'll write up a little knoppix-custom-kernel-howto if enough people are interested.


Yes that would be very helpful, there are people who need custom kernels, and a howto would be great! I have done it but it was a bit of hit and miss. See my post about knet kernel ( with preempt/lpp/crypto )

drfreak
01-15-2003, 03:37 AM
Yes that would be very helpful, there are people who need custom kernels, and a howto would be great! I have done it but it was a bit of hit and miss. See my post about knet kernel ( with preempt/lpp/crypto )

Damn, just finished the preface and intro when I stupidly closed my browser window. Now to go type this up in an editor as I should have done to begin with! :)

I'll post my draft shortly..

eadz
01-15-2003, 10:49 AM
Yes that would be very helpful, there are people who need custom kernels, and a howto would be great! I have done it but it was a bit of hit and miss. See my post about knet kernel ( with preempt/lpp/crypto )

Damn, just finished the preface and intro when I stupidly closed my browser window. Now to go type this up in an editor as I should have done to begin with! :)

I'll post my draft shortly..

Wow done already :
http://www.knoppix.net/docs/index.php/KnoppixCustomKernelHowto

You are a good writer!! Thanks a lot! When I have a bit more time i'll look at it more closely to see if I can add anything useful.

drfreak
01-15-2003, 05:52 PM
You are a good writer!! Thanks a lot! When I have a bit more time i'll look at it more closely to see if I can add anything useful.

Thank you. I'm glad I could give something back to this site. I use it a lot when I am poking around in Knoppix. Everyone here seems very motivated and friendly, so I'm glad if this helps them.

seskanda
10-12-2007, 07:51 AM
Does the Knoppix 5.1.0-5.1.1 kernel have realtime-preemption? I typed 'uname -a' in Terminal and get the following output:

'Linux BARDOT 2.6.19 #7 SMP PREEMPT Sun Dec 17 22:01:07 CET 2006 i686 GNU/Linux'

Does the PREEMPT portion mean it has it? This thread is pretty old, so i hope Knoppix does have realtime-preemption by now.....

tr
10-12-2007, 08:25 PM
Hey all:

Just started playing with Knoppix. After installing on my HD, I started checking out the kernel. Looks like a 'vanilla' kernel with XFS patch, and a small Knoppix patch.

Has anyone recompiled it with the preempt patch? I've compile kernels before, but I'm a little stumped....my /usr/src/linux doesn't actually contain the sources, I'm guessing to save space. I looked at the included .config file, and it seems that it's building almost every module available!

So can I just download the latest from kernels.org, apply my patches, and compile? I wasn't really sure how to handle initrd.gz, either.

-Charlie

I haver compiled 2.6.21 kernel with -rt and aufs patch http://linux.ilmainen.net/suomiknoppix/linux-2.6.21.5-rt18/. There's also a working cloop module in that site, so you can remaster Knoppix with realtime preemption patch by using my kernel. There has been some troubles to compile cloop with 2.6.22 and 2.6.23 kernels and that's why my latest kernel is 2.6.21. Also compiling aufs don't work at this time with 2.6.23 kernel (no problem with 2.6.22).

But if installing kernel to hard disk, you don't need cloop and aufs. So you can download kernel source from kernel.org, patch it with -rt patch http://www.kernel.org/pub/linux/kernel/projects/rt/, compile it and install it to your Debian based system.

-tapsa-

seskanda
10-13-2007, 08:47 PM
But if installing kernel to hard disk, you don't need cloop and aufs. So you can download kernel source from kernel.org, patch it with -rt patch http://www.kernel.org/pub/linux/kernel/projects/rt/, compile it and install it to your Debian based system.

Yes, i want to install realtime preemption to my Knoppix Debian-based HD installation. How would i install the preempt patched kernel and have the option of choosing BOTH the original kernel and preemptive one at the grub boot loader? Although, as i posted above, i might already have a realtime preempt kernel, since 'uname -a' says PREEMPT. How can i confirm if the kernel has realtime preemption applied to it?

tr
10-14-2007, 07:53 AM
Yes, i want to install realtime preemption to my Knoppix Debian-based HD installation. How would i install the preempt patched kernel and have the option of choosing BOTH the original kernel and preemptive one at the grub boot loader? Although, as i posted above, i might already have a realtime preempt kernel, since 'uname -a' says PREEMPT. How can i confirm if the kernel has realtime preemption applied to it?

Your GRUB should add new kernels automatically to /boot/grub/menu.lst file. If not, you can add new kernel by editing file yourself.

Realtime preemption is not included in the vanilla kernel. If you have CONFIG_PREEMPT=y in your .config file (what you see with 'uname -a'), that don't mean you have realtime preempt kernel. There's many changes in configuration if using -rt patch e.g. CONFIG_PREEMPT_RT=y which option you don't even have in vanilla kernel. But anyhow, CONFIG_PREEMPT=y is better than CONFIG_PREEMPT_VOLUNTARY=y in kernel configuration.


-tapsa-

tr
10-14-2007, 04:39 PM
Perhaps you like my new kernel http://linux.ilmainen.net/suomiknoppix/linux-2.6.23-rt1/.

-tapsa-

seskanda
10-16-2007, 08:00 AM
Your GRUB should add new kernels automatically to /boot/grub/menu.lst file. If not, you can add new kernel by editing file yourself.

That's good to know.



Realtime preemption is not included in the vanilla kernel. If you have CONFIG_PREEMPT=y in your .config file (what you see with 'uname -a'), that don't mean you have realtime preempt kernel. There's many changes in configuration if using -rt patch e.g. CONFIG_PREEMPT_RT=y which option you don't even have in vanilla kernel. But anyhow, CONFIG_PREEMPT=y is better than CONFIG_PREEMPT_VOLUNTARY=y in kernel configuration.

Where is .config file? I can only find a .config folder. I think your right, though. I ran Rosegarden and get "System resolution is too low." So, that must mean my kernel is NOT real-time preemptive. Now, all i need to know is HOW to re-compile it....I found a couple of guides, but they differ a bit. Here (http://pkg-freebob.alioth.debian.org/lowlat.html) is the first one, and this (http://www.rdegraaf.nl/index.asp?sND_ID=848152) is the second one. Which is easier to follow? Or do you know of a better link? Does yours or another realtime preempt kernel solve the 'System Timer' problem in Rosegarden, too?

seskanda
10-17-2007, 01:58 AM
I decided to use a pre-compiled kernel, and installed 2.6.19-1-multimedia from this (ftp://musix.ourproject.org/pub/musix/deb/kernel/) FTP site of Musix, a multimedia Linux distro based on Knoppix. Now, i have two serious problems when i boot from the new kernel. First, i can NOT open a shell as root or a user, Konsole gives me this error:

"Konsole is unable to open a PTY (pseudo teletype). This is likely due to an incorrect configuration of the PTY devices. Konsole needs to have read/write access to the PTY devices."

What does this mean and how do i fix it? Second, i can NOT get root access as a user, after i enter the root password, i get this error:

"The program 'su' is not found; make sure your PATH is set correctly."

What's wrong? I even installed two other kernels, one from the FTP site of Musix and one from your site, BOTH were version 2.6.21.5-rt18, but i STILL had the above two problems. I noticed whenever any of three kernels installed, i received this error:

"Hmm. There is a symbolic link /lib/modules/(version of kernel)
However, i can't read it: No such file or directory
Therefore, i am deleting /lib.modules/(version of kernel)"

Could this be the cause? Also, during bootup, instead of '...done' appearing when 'Waiting for /dev to be fully populated' comes up i get 'iTCO_wdt: Failed to reset NO_REBOOT flag, reboot disabled by hardware' followed by 'intel_rng: FWH not detected.' Is there anything i can do?

tr
10-19-2007, 04:23 PM
I decided to use a pre-compiled kernel, and installed 2.6.19-1-multimedia from this (ftp://musix.ourproject.org/pub/musix/deb/kernel/) FTP site of Musix, a multimedia Linux distro based on Knoppix. Now, i have two serious problems when i boot from the new kernel. First, i can NOT open a shell as root or a user, Konsole gives me this error:

"Konsole is unable to open a PTY (pseudo teletype). This is likely due to an incorrect configuration of the PTY devices. Konsole needs to have read/write access to the PTY devices."


I think something has gone wrong with your kernel installation. Did you install it by 'dpkg -i linux-image*'? To correct your pty problem. add following line to /etc/fstab (it exists on Knoppix live CD but sometimes not after hd installation):

/dev/pts /dev/pts devpts mode=0622 0 0

I know Musix because they use my kernels on live CD, see http://www.musix.org.ar/wordpress/?p=70
They are just testing http://linux.ilmainen.net/suomiknoppix/linux-2.6.23-rt1/ kernel. I think you can use it safely.

-tapsa-

seskanda
10-20-2007, 12:36 AM
I did use dpkg -i to install the kernel, but, NO, i didn't use linux-image in the name, because i simply renamed the long filename to 'linux.deb.' Next time i install it again, i'll just type the whole, long title itself. Thanks a lot. I just copied what you wrote to the end of the etc/fstab file, rebooted, and that was all; it fixed everything. Oddly, though, i still receive the same error messages during bootup. And I still have a minor problem. Boot time with the new 2.6.19-1-multimedia is slightly slower than the default. This is due to the fact of some additional errors (they were here before, too) which pop up. They actually come up twice. First, after the previous errors, and then again, toward the end, followed by "System is setting clock again." Strangely, i seem to have NO problems with clock settings, at all. Here, are the error messages:

locale: cannot set LC_CTYPE to default locale: No such file or directory
locale: cannot set LC_MESSAGES to default locale: No such file or directory
locale: cannot set LC_ALL to default locale: No such file or directory

Any idea what these mean? Do you think i'm better off installing the kernel, again? (of course, with 'linux-image' in the title).

tr
10-20-2007, 08:12 PM
locale: cannot set LC_CTYPE to default locale: No such file or directory
locale: cannot set LC_MESSAGES to default locale: No such file or directory
locale: cannot set LC_ALL to default locale: No such file or directory

Any idea what these mean? Do you think i'm better off installing the kernel, again? (of course, with 'linux-image' in the title).

Try to configure locales by

dpkg-reconfigure locales

Try this

dpkg -l | grep linux-image
if it shows 'ii' (not 'hi' = half installed) and you see your kernel there in the list, kernel is installed ok. Of course you can install it safely again if you want. It works after rebooting system.

But take a look at your /boot/grub/menu.lst file. Sometimes Grub makes an error if using hd installed Knoppix by using 'rw' instead of 'ro'. Change that if it is the case.

Btw, that multimedia kernel is not my kernel. But kernel that boots Musix is what I have compiled. I think new Musix-DVD is going to boot with 2.6.23.1 kernel and have also that 2.6.23.1-rt1 realtime preempt kernel

Cheers

-tapsa-

seskanda
10-23-2007, 03:53 AM
Try to configure locales by

dpkg-reconfigure locales

I don't understand the first screen that comes up. Am i supposed to select ONLY English/US languages? Those would start with "en" and/or "us", right?


Try this

dpkg -l | grep linux-image
if it shows 'ii' (not 'hi' = half installed) and you see your kernel there in the list, kernel is installed ok. Of course you can install it safely again if you want. It works after rebooting system.

Everything looks fine. Here's the output (for the 2.6.19-1 multimedia kernel only):

ii linux-image-2.6.19-multimedia-486 2.6.19-1 experimental.1 Linux 2.6.19 image on486 class


But take a look at your /boot/grub/menu.lst file. Sometimes Grub makes an error if using hd installed Knoppix by using 'rw' instead of 'ro'. Change that if it is the case.

Where inside that file should i look?