LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices



Reply
 
Search this Thread
Old 01-26-2005, 05:08 PM   #1
me3
LQ Newbie
 
Registered: Jan 2005
Posts: 28

Rep: Reputation: 15
Crashing ? ndiswrapper needs 8K stacks...


I just spent the better part of a day troubleshooting why my ZD7280 was crashing when I connected a VOIP phone to its ethernet port.

To make a long story short, ndiswrapper needs kernels with 8K stacks. The default kernels now shipping for fc3 (2.6.9-1.727+) come with the 4K stack option enabled. This means that users must now build a custom kernel to use ndiswrapper. A warning message is generated when one builds ndiswrapper if there is a stack size issue with the kernel you are building for. The warning message occurs early in the build, so watch for it.

Here is how I built custom kernel 2.6.10-1.753 for fc3:

a) download and install the redhat RPM for the kernel just like you usuallly would. This can be done manually or via up2date or yum.

b) obtain the source rpm for the kernel. The file ends with xxxxx.src.rpm.

rpm -i kernel*.src.rpm

The kernel source rpm is in the srpms directory on the fedora mirrors. btw: these kernels are in the updates directory. I think you can also get the kernel source via yum with yum install kernel-source or something like that. I'm not a big yum user...

c) in a console as root, move to /usr/src/redhat

d) cd in the SPECS directory. You should be in /usr/src/redhat/SPECS or something similar.

Run the following command to generate the source for the kernel:

rpmbuild -bp --target=i686 kernel-2.6.spec

The source rpm that redhat supplies has the code tarballed and ships with patch files. Running the above line untars the code and applies all the patches. NEAT !

e) navigate to the BUILD directory and then into the directory that has the source code.

cd kernel-2.6.10/linux-2.6.10

You should be in /usr/src/redhat/BUILD/kernel-2.6.10/linux-2.6.10 or something similar.

f) configure the kernel. This is a bit differently than it was for the 2.4 series kernels as the default kernel configuration is now automatically loaded. You've got two choices of tools for this:

make menuconfig (generates a textual configuration tool) or

make xconfig (generates a nice GUI configuration tool)

I use xconfig because it is cleaner and easier to navigate.

FInd the "Kernel Hacking" -> "4k" kernel" and unselect it.

Select or unselect any other kernel options you may want. The Nvidia driver complains about the frame buffer in these kernels but I have never had a problem so I leave it as is.

Save your configuration when you are done. There is no need to do a "Save As", just a Save.

btw: if you ever need a stock configuration, the config file for the "vanilla" kernel is in /boot/ and these configuration tools can load it.

g) Now we can actually build the kernel.

Step 1: type "make"
and be prepared to wait 20 or more minutes while all the kernel code is compiled.

Step 2: type "make modules_install"

Step 3: type "make install"

If you want to have all three run automatically, you can use:

make & make modules_install & make install <return>

At this point the kernel has been built and the required boot setup has been done. Ie files have been placed in /boot and an entry has been placed in /boot/grub/grub.conf

btw: the default name for the kernel will be 2.6.10-prep.

However, the kernel you have just built has NOT been made the default kernel. To make it the default kernel, edit /boot/grub/grub.conf and change default to "0" (zero) As it is installed by "make install", the prep kernel will be installed as kernel 0, but it will leave default pointing to the previously default kernel. Changing default to 0 automatically boots the prep kernel.

h) At this point I usually reboot.

/sbin/shutdown -r now

You can do it graphically too, ie logout and then reboot.

i) When Linux reboots, it will reboot with the new kernel and then give you an error about X not being able to configure the video driver. (Remember that we have not yet built the NVidia driver for the new kernel).

I answer "No" to all the questions and get to a plain text login. If I answer Yes to any of those questions, X will attempt to configure itself and in the process install an incorrect NVidia driver, messing up my <absolutely beautiful !> xorg.conf file.

I login as root.

I cd to the ndiswrapper directory. I build ndiswrapper with "make install"

Be sure to watch that the 4K stack warning doesn't appear. If it does you probably didn't get the kernel configuration correct.

Aside: if you messed it up, I would reboot selecting a kernel that works properly and run through the build process again from there. You could run through the build process in the text console you currently have too. BTW: you will start with kernel configuration and you'll probably want to do a "make clean" before you do so. BTW: "make menuconfig" will run fine in a text console if you don't reboot.

Once ndiswrapper is built, I start networking so that I can build the new Nvidia driver. It requires network access to download kernel headers for the build. I start networking with:

/etc/init.d/network restart

j) Now that I have networking functional, I cd to the Nvidia driver directory. I then build the Nvidia driver for the kernel by running:

sh ./NVIDIA*.run

I answer Yes to all questions, btw.

When it is complete, I reboot by running

/sbin/shutdown -r now

When linux reboots, I am ready to login as I usually do using my new kernel.

I hope this helps someone.
 
Old 01-26-2005, 06:06 PM   #2
snecklifter
Member
 
Registered: Mar 2004
Location: UK/West Yorkshire/Huddersfield
Distribution: Fedora 7
Posts: 982

Rep: Reputation: 30
You want the really, really bad news? Its already been done. A company called linuxant make driverloader - a commercial version of ndiswrapper. They provide 16k kernels for freely available download here
Regards
CHris
 
Old 01-26-2005, 06:17 PM   #3
me3
LQ Newbie
 
Registered: Jan 2005
Posts: 28

Original Poster
Rep: Reputation: 15
I hate linuxant ! HP is supposed to be an open source Linux company. I say it is time for all the HP laptop owners to send them a form letter demanding that we get the specs for the hardware in our laptops.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
$k stacks for everyone in FC4? amobius Linux - Software 3 10-03-2005 08:00 AM
ndiswrapper - disabling 4k stacks bbioman85 Mandriva 1 07-25-2005 11:53 PM
ndiswrapper keeps crashing in Mandrake 10.1 dychen Mandriva 2 01-03-2005 10:42 PM
Fedora2 4k stacks mickeyboa Fedora 2 07-04-2004 03:50 PM
8 kb stacks Jose Muņiz Linux - General 1 05-10-2004 05:36 PM


All times are GMT -5. The time now is 09:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration