View Full Version : Reconfiguring
I have managed (through ineptitude, probably) in trying to install the Nvidia drivers in kernel 2.6.18-6 to damage two kernels. I had nvidia running in 2,6,18-4 and I should have quit when I was ahead. I managed to "ruin" both kernels to the point that 2.6.18-6 at least tries to start x, but the -4 doesn't do anything but leave me with a blank screen. At least they boot.
I thought that I might rescue the -6 kernel by reconfiguring, but going to /usr/src/linux and entering make menuconfig as root gives me this error;
debiannote:/usr/src/linux# make menconfig
scripts/Makefile.build:17: /usr/src/linux-headers-2.6.18-5-686/scripts/basic/Makefile: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-headers-2.6.18-5-686/scripts/basic/Makefile'. Stop.
make: *** [scripts_basic] Error 2
Do I have to download a "new" kernel in order to get make menuconfig to work? Why can't I reconfigure the kernel I have? I have Googled this query, but have not found an answer there.
George
bluesdog
03-11-2008, 11:17 PM
afaik, it's not possible to reconfigure a kernel. One creates a whole new one by compiling from the raw kernel source, usually using an existing kernel's configuration as a template.
Here's a brief rundown on how I do a kernel compile:
First I set up /etc/kernel-img.conf
Make a backup # cp /etc/kernel-img.conf /etc/kernel-img.backupThen use your favourite text editor to modify the file so it looks something like:
# Kernel Image management overrides
# See kernel-img.conf(5) for details
do_symlinks = Yes
warn_initrd = no
ramdisk = /usr/sbin/mkinitramfs /usr/sbin/mkinitrd.yaird /usr/sbin/mkinitrd
do_bootloader = no
do_bootfloppy = no
link_in_boot = no
postinst_hook = /usr/sbin/update-grub
postrm_hook = /usr/sbin/update-grubGet the kernel source # apt-get install linux-source-2.6.18This downloads the linux-source-2.6.18.tar.bz2 to /usr/src
I like to use the gui xconfigurator, as user, and also like to build the kernel package in a user folder, ~/kernel , so I do # mv /usr/src/linux-source-2.6.18.tar.bz ~/kernel
Note the ~/kernel folder is simply a folder I created in my /home folder, with the command $ mkdir ~/kernel Make whatever folder and call it whatever you like. You can do the build in /usr/src if you wish, but I just like to keep that area fairly lean and clean
Then, as user, $ cd ~/kernelUnpack the source $ tar xvfj linux-source-2.6.18.tar.bz2cd to the source folder thus created $ cd linux-source-2.6.18/Clear the decks $ make cleanStart the configuration tool $ make xconfigThen I load the current .config file to use as a template. The gui xconfigurator has a browser, with which I navigate to /boot/config-<currentkernel>
Once I'm happy with the configuration, I save the new .config, and exit the xconfigurator
Become root with su
Clear the decks!
# make-kpkg cleanBuild the kernel package... If I want to build the whole schmeer, including the docs, I issue the 'binary' switch:
# make-kpkg binary --initrd --revision=something.0.xIf I just want the kernel, compiled source and headers, I issue something like:
#make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers kernel_sourceThen I go have a beer.
:)
When the build completes, I have whatever packages I requested waiting in the build folder,
To do the compile, you'll probably need the following tools: kernel-package libncurses5-dev bzip wget build-essential debhelper initramfs-tool g++ libqt3-mt-dev
If you want to use fakeroot to issue the package building commands, you'll also need to install fakeroot.
Install the kernel package, and the complied source package in the usual manner
uteck
03-13-2008, 09:22 AM
You don't need to recompile the Linux kernel, but the Nvidia kernel module.
If that does not work, then try a different version of the Nvidia driver. Sometimes you may need an older version to get it to install.
And if worse comes to worst, then edit xorg.conf and use the nv driver.
bluesdog
03-13-2008, 12:27 PM
Black screen after an nvidia install usually means a mismatch between the nvidia module and nvidia-glx driver.
Examine /var/log/Xorg.0.log to view any errors:
$ cat /var/log/Xorg.0.log | grep EEI don't use the nvidia script method, preferring the 'Debian way' of building and installing the nvidia kernel module.
So if you're using the nvidia script, I'm not sure the information here is relevant.
For stock Etch kernels, the matching pre-built Etch nvidia module should simply work. I have not tried that method either, simply because I have not used stable since Libranet/Sarge.
Building a successful working module from nvidia kernel source depends not only on the availability of kernel headers or compiled kernel source, but on the flavor of gcc being the same version used to compile the kernel.
This appears to be the case for most 'out of kernel' modules built from source. An attempt to build a kernel module after a gcc update will likely result in failure. Usually the build process itself will fail.
Unless you're willing to mess about with symlinks for gcc, or otherwise specify the compiler version to use, the simplest strategy is to just do a fresh kernel compile, which automagically uses the latest gcc on your system to build the kernel image and compiled kernel source.
A module build immediately following will use the same compiler version, which should result in a functional module.
I had 2.6.18-4-486 working well for many months after using the Nvidia installation.
My troubles began when I let the package manager download the image, header, and flavor for 2.6.18-6-486. I tried to use the latest download of the Nvidia driver, but I keep getting errors mainly due to "can't find nvidia module". -4-486 no longer works either.
My subsequent attempts to reconfigure a kernel have failed miserably for two reasons. When I try to load an alternate config I get the error "file not found" even when I type in the complete path and name. Then I have to use menuconfig as I don't have a viable x display.
Guess I will get rid of all the spurious vmlinuz and associated files and then try to reload an image, headers, and flavor and start over with the Debian method one described in Debian Wiki.
I'm starting to feel like a Windows user as I have been rebooting and even resetting trying to get this thing to work.
Thank you "uteck" and "bluesdog" for your help. I'll let you know if I am ever succesful. I just hope it doesn't come to reinstalling!!
George
uteck
03-14-2008, 02:48 PM
If you are manully installing the Nvidia drivers, then make sure you don't have any Debian versions installed. Try "apt-get remove nvidia*" to ensure there are no other versions. Then try running the nvidia installer again, or if you are using the debain packaged driver, try reinstalling it.
bluesdog
03-15-2008, 02:47 AM
... I just hope it doesn't come to reinstalling!!This is Linux. We never reinstall!:)
Well, I know you have been waiting in breathless anticipation or masterly indifference (more likely the later) to find out if I ever got Nvidia installed and/or the kernel recofigured. In spite of this being Linux - we never reinstall, I was forced too. I committed an operator error and managed to damage my partition table making my hard drive unbootable. I then learned more about gddrescue, testfile, and photorec than I really wanted to know. Managed to recover a good deal of my files, but lost a lot of unimportant trivia.
I did a Debian 4.0 reinstall using the AMD64 version.
.
Lots of google searching and a contribution by "rickh" in the Debian Forum on 2008-06-20 allowed me to get nvidia installed the "debian way". I'll quote him completely as maybe his method will help someone else:
"Well, I have no idea what kind of mess the Nvidia scripts make when you try unsuccessfully to install them. I would have to assume that you first need to get rid of every trace of that decision. Without any conflicting packages, and assuming you have all the header files, etc., that m-a needs, boot into single user mode, then ...
# mv /etc/X11/xorg.conf /etc/X11/xorg.conf_bak
# aptitude install nvidia-kernel-source nvidia-glx nvidia-xconfig
# m-a a-i nvidia
# modprobe -v nvidia
# nvidia-xconfig
... then reboot."
So that issue is out of the way for me until Debian 5.0 is promulgated. But that's another thread.
I wish to thank all of you who took some interest in my problem. You contributed greatly to my understanding of 'what was going on'. So thanks again.
73
jorj/NJ6I
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.