[opensuse] Kernel Building Resources & Recommendations
Hi, At my behest, a friend installed openSUSE 10.2 on his new Core2 Duo-based machine. He's liking it pretty well, but there's one serious problem that needs to be resolved: The current implementation of VMware (he's using the free Server version) is not compatible with the USB changes made in 10.2 (specifically, the exclusion from the kernel of the old USB support). I need to help him (and later on, myself, too) create a kernel or system configuratino that will allow VMware to access USB devices in the host operating system. So I'm looking for two things: 1) Specific recommendations on the most expedient way to endow the kernel in openSUSE 10.2 with this USB support. In particular, is it possible to simply load (or build and load) a kernel module to reenable the USB filesystem (known variously as usbfs, usbdevfs, USB_DEVICEFS, or /proc/bus/usb)? 2) Assuming a full kernel rebuild is required, I'd like to get some recommendations for informational resources of a tutorial nature on how to build a late-model kernel with emphasis on anything openSUSE-specific or -related. I found this How-To Forge article: http://www.howtoforge.com/kernel_compilation_suse. If anyone is familiar with it and can comment on its usefulness, that would be helpful. Please be aware that I have done my homework and searched the Web, read the threads from this list back in Dec. of 2006 as well as the VMware counterpart and have read the Novell Bugzilla log for 210899 (https://bugzilla.novell.com/show_bug.cgi?id=210899). I have found some resources that address this question. On the VMware forums this simple recipe was suggested: 1. Install kernel-sources and kernel-syms 2. copy .config and Modules.symvers from /usr/src/linux-obj/<your kernel> to /usr/src/linux 3. make oldconfig 4. make menuconfig, select the usbfs 5. make modules && make modules_install 6. change noauto to auto for the usbfs in fstab 7. reboot 8. ta-da (To which I might add, "Lather; Rinse; Repeat", but the literal-minded among us would be washing their hair forever.) So I'm asking here because I specifically want the advice of this lists's participants. Thanks. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
[...] 1) Specific recommendations on the most expedient way to endow the kernel in openSUSE 10.2 with this USB support. In particular, is it possible to simply load (or build and load) a kernel module to reenable the USB filesystem (known variously as usbfs, usbdevfs, USB_DEVICEFS, or /proc/bus/usb)?
usbfs is not implemented as a separate kernel module. As far as I know, you need to recompile the usbcore module if you want to re-enable usbfs.
2) Assuming a full kernel rebuild is required, I'd like to get some recommendations for informational resources of a tutorial nature on how to build a late-model kernel with emphasis on anything openSUSE-specific or -related. I found this How-To Forge article: http://www.howtoforge.com/kernel_compilation_suse. If anyone is familiar with it and can comment on its usefulness, that would be helpful.
Well, I would not really recommend this Howto, but that's just my personal opinion :)
[...] 1. Install kernel-sources and kernel-syms 2. copy .config and Modules.symvers from /usr/src/linux-obj/<your kernel> to /usr/src/linux 3. make oldconfig 4. make menuconfig, select the usbfs 5. make modules && make modules_install 6. change noauto to auto for the usbfs in fstab 7. reboot 8. ta-da
I think, the following procedure might work (however, it's untested since I do not have a 10.2 installation): $> cd /usr/src/linux $> make cloneconfig $> vi .config change # USB_DEVICEFS is not set to USB_DEVICEFS=y $> make oldconfig $> make drivers/usb/core/usbcore.ko and then install this new module (i.e. replace the standard usbcore.ko module in /lib/modules/`uname -r`/ with this new one). That should avoid the time-consuming process of compiling all modules (make modules). However, this will only work if all the USB_DEVICEFS functionality is really contained in the usbcore module (I think it is but I am not 100% sure). If not, then you have to re-compile additional modules and a "make modules" might be a safe way to do it. Maybe someone using 10.2 can report which way works best. Please note that this method is not using a build directory, i.e. it will build the module(s) in place (i.e. in the kernel source tree). Also note that you'll have to go through this procedure again after upgrading a SuSE kernel. Cheers, Th. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Thomas, Thanks for replying... For being the _only_ one to reply! As it turns out, this project has already taken place, though not with complete success. More below. On Sunday 11 March 2007 08:34, Thomas Hertweck wrote:
Randall R Schulz wrote:
[...] 1) Specific recommendations on the most expedient way to endow the kernel in openSUSE 10.2 with this USB support. In particular, is it possible to simply load (or build and load) a kernel module to reenable the USB filesystem (known variously as usbfs, usbdevfs, USB_DEVICEFS, or /proc/bus/usb)?
usbfs is not implemented as a separate kernel module. As far as I know, you need to recompile the usbcore module if you want to re-enable usbfs.
That, at least, I discovered / figured out when I ran "make menuconfig" for the first time.
2) Assuming a full kernel rebuild is required, I'd like to get some recommendations for informational resources of a tutorial nature on how to build a late-model kernel with emphasis on anything openSUSE-specific or -related. I found this How-To Forge article: http://www.howtoforge.com/kernel_compilation_suse. If anyone is familiar with it and can comment on its usefulness, that would be helpful.
Well, I would not really recommend this Howto, but that's just my personal opinion :)
It did not seem to lead me totally astray. I went with the suggestion of creating an RPM (because I was using one computer to do the build but the result was intended primarily for my friend's computer). This is where things fell down, probably because I don't know enough about how kernel RPMs work, what happens when they're installed. How the source RPM is fabricated (in particular, why I can have more than one kernel but apparently only one set of kernel sources installed at any one time). If you know of better resources for newbie kernel builders, I'd love to hear about them.
[...] 1. Install kernel-sources and kernel-syms 2. copy .config and Modules.symvers from /usr/src/linux-obj/<your kernel> to /usr/src/linux 3. make oldconfig 4. make menuconfig, select the usbfs 5. make modules && make modules_install 6. change noauto to auto for the usbfs in fstab 7. reboot 8. ta-da
I think, the following procedure might work (however, it's untested since I do not have a 10.2 installation):
I think it's too minimal for practical purposes, especially if you want to transport the new kernel to another system.
$> cd /usr/src/linux $> make cloneconfig $> vi .config change # USB_DEVICEFS is not set to USB_DEVICEFS=y $> make oldconfig $> make drivers/usb/core/usbcore.ko
I was able to alter the configuration using "make menuconfig" and the kernel, once installed, _did_ have usbfs available. Getting VMware to configure has continued to elude us, however.
and then install this new module (i.e. replace the standard usbcore.ko module in /lib/modules/`uname -r`/ with this new one). That should avoid the time-consuming process of compiling all modules (make modules). However, this will only work if all the USB_DEVICEFS functionality is really contained in the usbcore module (I think it is but I am not 100% sure). If not, then you have to re-compile additional modules and a "make modules" might be a safe way to do it. Maybe someone using 10.2 can report which way works best.
Please note that this method is not using a build directory, i.e. it will build the module(s) in place (i.e. in the kernel source tree).
When I ran menuconfig I gave the configuration a variant name, but somehow I still didn't get a new build directory. For reasons I have not yet figured out, the VMware configuration script will not succeed on a system where I installed the resulting kernel RPM and its corresponding source RPM.
Also note that you'll have to go through this procedure again after upgrading a SuSE kernel.
Yeah. That much I knew. I don't know a way around this aspect other than to wait for VMware to catch up with the move away from usbfs. But presumably anything I can do once, I can do again... Presumably. Thankfully, I have a very fast machine, so a kernel recompilation doesn't take all that long.
Cheers, Th.
Again, thanks for taking the time to reply. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Randall R Schulz wrote:
[...]
It did not seem to lead me totally astray. I went with the suggestion of creating an RPM (because I was using one computer to do the build but the result was intended primarily for my friend's computer). This is where things fell down, probably because I don't know enough about how kernel RPMs work, what happens when they're installed. How the source RPM is fabricated (in particular, why I can have more than one kernel but apparently only one set of kernel sources installed at any one time).
A "make rpm" creates (AFAIK) only a very basic RPM package. If you really need to build a proper RPM package for your SuSE system, then I recommend using the SuSE Kernel Source src.rpm and making changes therein.
If you know of better resources for newbie kernel builders, I'd love to hear about them.
I wrote a kernel howto (actually this project started in 2002) which I think is well known among German-speaking Linux users - I get quite a lot of positive feedback. However, since it's written in German it might not be particularly helpful for you...
[...some suggestions...]
I think it's too minimal for practical purposes, especially if you want to transport the new kernel to another system.
True. I thought you only wanted to change your local machine.
[...] When I ran menuconfig I gave the configuration a variant name, but somehow I still didn't get a new build directory.
I think this is something different. A build directory is where you build the actual object files, modules, etc. and the final kernel image. In principle, /usr/src/linux-obj (or a subdirectory, respectively) is such a build directory - when using a build directory, you separate all the files created during a build from the source tree (the kernel source tree is always a clean tree). If I understood you correctly, then you wanted to give your new kernel a unique kernel release (which in general is a good idea when compiling your own kernel). This would translate into a new /lib/modules/ subdirectory. Did you mean such a directory? Or really a build directory?
From the info I've seen so far, it's difficult to say what might be wrong with your approach and why the vmware script fails on the other machine. I think, there are several approaches to tackle the problem: a) build your own complete kernel with USB_DEVICEFS enabled (via "make rpm" etc.) b) build your own complete kernel via src.rpm (default config adjusted) c) only build a new usbcore.ko module for the standard SuSE kernel, copy it or package it as RPM, and install it on the other machine(s) d) ...
From my point of view, c) might be the quickest and easiest solution as it does not require to install a complete new kernel, kernel sources, etc. on the other machine (remember, if you install a completely new kernel, you or the RPM package also need to take care of the initrd, bootloader configuration, etc.). You would only replace a single kernel module in the SuSE standard installation. However, it seems as if you've already managed to install and boot a new kernel and it's now only the vmware part that's going wrong. Correct?
Cheers, Th. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi, I will have to rebuild kernel to be used in VMWare guests for various servers (and rebuild them after each kernel security updates), I'm interesting in understanding and testing the whole procedure.
I wrote a kernel howto (actually this project started in 2002) which I think is well known among German-speaking Linux users - I get quite a lot of positive feedback. However, since it's written in German it might not be particularly helpful for you...
I used to speak german. Would it be possible to have a link to this how-to? Maybe we could write something to be put on the OpenSUSE wiki. Regards, Gaël
On Mon, 2007-03-12 at 09:13 +0100, Gaël Lams wrote:
Hi,
I will have to rebuild kernel to be used in VMWare guests for various servers (and rebuild them after each kernel security updates), I'm interesting in understanding and testing the whole procedure.
If this is for the VMware/usbfs issue, it will now be included in the kernel again. At least in 10.3. Please follow https://bugzilla.novell.com/show_bug.cgi?id=210899 to see if it will be enabled for 10.2 as well. Cheers, Magnus -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
There are two ways to be able to run for example the treo in VMware. As you well known the usbfs is disable in SuSE 10.2 and therefore you can not sync. Other usb devices are not affected like keyboard etc. 1. You can download the beta 6.0 of VMware workstation. The problem is solved there (I have not done it yet) 2. Enable usbfs in the kernel. You can install a new vanilla kernel load the old config, enable the module and recompile. Another approach is just to use the same source and recompile. This is the fastest way. I have done it 4 time and my treo works great. 2.1 Require installation: #yast -i ncurses-devel This is required for make menuconfig command And also be sure you have the kernel-source installed. 2.2 The kernel and kernel-source must be the same version. $ rpm -qa | grep kernel 2. 3 Now change configuration. # cd /usr/src/linux # make mrproper # make menuconfig Change configuration -> Device Drivers//USB support/USB device filesystem and selected it! When you exit and ask for save say yes 2.4 Install # make modules && make modules_install 2.5 Reboot If you have problems to sync after start another thread or e-mail me. Ciao -=terry (Denver)=- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Terry, On Monday 12 March 2007 06:12, Teruel de Campo MD wrote:
There are two ways to be able to run for example the treo in VMware. As you well known the usbfs is disable in SuSE 10.2 and therefore you can not sync. Other usb devices are not affected like keyboard etc.
I think it would be more accurate to say the keyboard and mouse are special exceptions and that no other USB devices work under the current releases of openSUSE 10.2 and VMware.
1. You can download the beta 6.0 of VMware workstation. The problem is solved there (I have not done it yet)
This may be an adequate solution for me (I use VMware Workstation--currently version 5.5), but my friend is using VMware server (the zero-cost version).
2. Enable usbfs in the kernel. You can install a new vanilla kernel load the old config, enable the module and recompile. Another approach is just to use the same source and recompile. This is the fastest way. I have done it 4 time and my treo works great.
...
All this I know and have done successfully. This, however, omits two things I need: The ability to transport the kernel to another system (possibly avoidable if I can coach my friend to build the kernel himself) and the ability to successfully complete the VMware configuration script under the new kernel.
If you have problems to sync after start another thread or e-mail me.
Ciao
-=terry (Denver)=-
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, 2007-03-12 at 08:10 -0700, Randall R Schulz wrote:
Terry,
2. Enable usbfs in the kernel. You can install a new vanilla kernel load the old config, enable the module and recompile. Another approach is just to use the same source and recompile. This is the fastest way. I have done it 4 time and my treo works great.
...
All this I know and have done successfully. This, however, omits two things I need: The ability to transport the kernel to another system (possibly avoidable if I can coach my friend to build the kernel himself) and the ability to successfully complete the VMware configuration script under the new kernel. Randall,
1. You may have other problems with your setup. The procedure I described allows to configure VMware. I have just finished doing it in my laptop (5th machine) and I have just sync my treo. 2. If you want to make your new kernel portable the best is to create an rpm but the procedure is a little more involved. I've done it with the 2.6.20 from the kernel.org and using the configuration from my present kernel except enabling usbfs. The MV configuration also works. 3. If you described step by step of what you did we may be able to find where the problem is. Regards, -=terry(Denver)=- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon 12 Mar 2007 08:13, Gaël Lams wrote:
I will have to rebuild kernel to be used in VMWare guests for various servers (and rebuild them after each kernel security updates)
- this is a matter of moments : one needs kernel source installed, then, run /usr/bin/vmware-config.pl that is all :) best wishes -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 12 March 2007 05:36, riccardo35@gmail.com wrote:
On Mon 12 Mar 2007 08:13, Gaël Lams wrote:
I will have to rebuild kernel to be used in VMWare guests for various servers (and rebuild them after each kernel security updates)
__________
- this is a matter of moments :
one needs kernel source installed, then, run
/usr/bin/vmware-config.pl
that is all :)
Far from it. Please read the original post and perhaps the antecedent messages and documents if you really care about what the issues are.
best wishes
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Gaël Lams wrote:
[...] I will have to rebuild kernel to be used in VMWare guests for various servers (and rebuild them after each kernel security updates), I'm interesting in understanding and testing the whole procedure.
As I wrote in my last email, there are several ways to deal with this problem. If you have to support many systems and not just your local desktop system, then the simplest way might be an RPM package that replaces the default usbcore.ko (from the SuSE kernel installation) with a new (your own) version that has USB_DEVICEFS enabled. This might minimize the possible side-effects as only a single file is changed.
[...] I used to speak german. Would it be possible to have a link to this how-to? Maybe we could write something to be put on the OpenSUSE wiki.
This project started a long time ago when there were many questions on suse-linux (the German mailing list, now opensuse-de) concerning the SuSE kernel, kernel patches, recompiling a kernel, etc. As the "official" German kernel howto was (and still is: Linux Kernel HOWTO v0.80-3, 1. Juli 1998) out of date, I decided to write my own howto... I could have written this howto in English - however, many people on suse-linux mentioned that they have problems understanding technical literature in English, so I decided to write it in German (I think, there is quite a lot of kernel-related information available in English, at least concerning the Vanilla kernel; and there is the nice document "WORKING WITH THE SUSE 2.6.x KERNEL SOURCES" written by Andreas Gruenbacher, http://www.suse.de/~agruen/kernel-doc/, also part of the SuSE kernel sources: README.SUSE). Luigi di Lazzaro translated my little howto into Italian. To cut a long story short, here it is: http://www.thomashertweck.de/kernel26.html Cheers, Th. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Thomas Hertweck
As I wrote in my last email, there are several ways to deal with this problem. If you have to support many systems and not just your local desktop system, then the simplest way might be an RPM package that replaces the default usbcore.ko (from the SuSE kernel installation) with a new (your own) version that has USB_DEVICEFS enabled. This might minimize the possible side-effects as only a single file is changed. [...]
16.55 wahoo:~ > rpm -q --changelog kernel-default | head (none)* Fri Mar 09 2007 gregkh@suse.de - Enable CONFIG_USB_DEVICEFS (#210899 and a zillion others.) Turns out that vmware isn't going to change anything, so making our users (and executives) have to build their own kernels is not something we should be doing. I was wrong, sorry. 16:55 wahoo:~ > rpm -q kernel-default kernel-default-2.6.18.8-146.1 -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2 OpenSUSE Linux http://en.opensuse.org/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Patrick Shanahan wrote:
[...] 16.55 wahoo:~ > rpm -q --changelog kernel-default | head (none)* Fri Mar 09 2007 gregkh@suse.de - Enable CONFIG_USB_DEVICEFS (#210899 and a zillion others.) Turns out that vmware isn't going to change anything, so making our users (and executives) have to build their own kernels is not something we should be doing. I was wrong, sorry.
Sounds good. The next task then is to convince the SuSE guys to ship NVIDIA kernel modules... *duck and run* ;-) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Thomas Hertweck
Sounds good. The next task then is to convince the SuSE guys to ship NVIDIA kernel modules... *duck and run* ;-)
but they are not open-source. Illegal..... -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2 OpenSUSE Linux http://en.opensuse.org/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Patrick Shanahan wrote:
* Thomas Hertweck
[03-12-07 17:12]: Sounds good. The next task then is to convince the SuSE guys to ship NVIDIA kernel modules... *duck and run* ;-)
but they are not open-source. Illegal.....
It was a joke, ok. Did you see the email address in the kernel changelog? That might tell you something. If not, then you won't understand the story... OK, time to end this thread, problem is solved and there is no need to continue this chat. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, Mar 12, 2007 at 09:07:18PM +0000, Thomas Hertweck wrote:
Patrick Shanahan wrote:
[...] 16.55 wahoo:~ > rpm -q --changelog kernel-default | head (none)* Fri Mar 09 2007 gregkh@suse.de - Enable CONFIG_USB_DEVICEFS (#210899 and a zillion others.) Turns out that vmware isn't going to change anything, so making our users (and executives) have to build their own kernels is not something we should be doing. I was wrong, sorry.
Sounds good. The next task then is to convince the SuSE guys to ship NVIDIA kernel modules... *duck and run* ;-)
ftp://download.nvidia.com/opensuse/10.2/ isn't enough for you? Ciao, Marcus -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, 2007-03-12 at 22:15 +0100, Marcus Meissner wrote:
On Mon, Mar 12, 2007 at 09:07:18PM +0000, Thomas Hertweck wrote:
Patrick Shanahan wrote:
[...] 16.55 wahoo:~ > rpm -q --changelog kernel-default | head (none)* Fri Mar 09 2007 gregkh@suse.de - Enable CONFIG_USB_DEVICEFS (#210899 and a zillion others.) Turns out that vmware isn't going to change anything, so making our users (and executives) have to build their own kernels is not something we should be doing. I was wrong, sorry.
Sounds good. The next task then is to convince the SuSE guys to ship NVIDIA kernel modules... *duck and run* ;-)
ftp://download.nvidia.com/opensuse/10.2/ isn't enough for you?
Any chance to convince them to build drivers for Factory as well?
Ciao, Marcus
Cheers, Magnus -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (8)
-
Gaël Lams
-
Magnus Boman
-
Marcus Meissner
-
Patrick Shanahan
-
Randall R Schulz
-
riccardo35@gmail.com
-
Teruel de Campo MD
-
Thomas Hertweck