LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Need help upgrading my kernel from 2.6.26.1 to 2.6.34.1 (https://www.linuxquestions.org/questions/debian-26/need-help-upgrading-my-kernel-from-2-6-26-1-to-2-6-34-1-a-821936/)

Cultist 07-24-2010 03:38 PM

Need help upgrading my kernel from 2.6.26.1 to 2.6.34.1
 
So after realizing that my current kernel (2.6.26.1) doesn't support my audio card, while the current stable (2.6.34.1) does, I apparently need to build a new kernel. The only guides I can find are from the late 90s, so I'm posting here hoping for a more up-to-date and debian-oriented guide.

I know most of the linux basics, but this is my first time doing anything with the kernel. Closest thing I've done is follow a step-by-step to installing an nvidia driver. So any instructions or guides would be most helpful if they're written with a seminewb in mind.

And one more restriction I have on this, I can't apt-get anything from my debian install. I have it here with me, but I can only connect to the net through my work computer, so any files I need have to be downloadable and transferable on disc.

I have
Quote:

linux-2.6.34.1.tar.bz2
and
Quote:

linux-2.6.34.1.tar.bz2.sign
already.

What do I do from here?

thanks for any help provided

AlucardZero 07-24-2010 03:59 PM

Does 2.6.32 as well? Don't bother compiling it yourself. Download the debs from lenny-backports instead.

64-bit right?

http://packages.debian.org/lenny-bac...32-bpo.5-amd64

http://backports.org/debian/pool/mai...50+1_amd64.deb

As the first page says, you'll want to get firmware-linux-free too... and perhaps firmware-linux-nonfree.

The downside of you not being able to use apt-get is you have to get all the dependencies yourself. But that's probably easier than compiling a vanilla kernel if you haven't before.

j1alu 07-24-2010 04:06 PM

http://forums.debian.net/viewtopic.php?f=16&t=36525
http://www.mepis.org/docs/en/index.p...g_a_new_kernel

I tried a 34-kernel on Lenny which didn't work (but i am not that good, so it might work).

Like AlucardZero says: try the backports-kernel first.

the trooper 07-24-2010 04:11 PM

Here is a method to use if you have not compiled your own kernel before.It's not the only method or perhaps the best but it is probably the easiest.

You'll need some packages to begin with:

Code:

aptitude install kernel-package libncurses5-dev fakeroot wget build-essential
Then make a sub-directory in your /home called 'Kernels':

Code:

ade@Pc1:~$ mkdir Kernels
Then change into the newly created directory and run the following command:

Code:

ade@Pc1:~$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.34.1.tar.bz2
This will download the vanilla kernel source.
Next untar the kernel with:

Code:

ade@Pc1:~$ tar jxvf linux-2.6.34.1.tar.bz2
Next,change into the newly created kernel directory:

Code:

ade@Pc1:~$ cd linux-2.6.34.1
Next run the following command:

Code:

ade@Pc1:~$ make clean && make mrproper
Then copy your current kernel configuration with:

Code:

cp /boot/config-`uname -r` ./.config
Next we need to check the configuration options using 'menuconfig':

Code:

make menuconfig
Which brings up the kernel configuration menu. Go to Load an Alternate Configuration File and choose .config (which contains the configuration of your current working kernel) as the configuration file.

Then browse through the kernel configuration menu and make your choices. When you are finished and select Exit, answer the following question (Do you wish to save your new kernel configuration?) with Yes.

You can now build the kernel with these commands:

Code:

ade@Pc1:~$ export CONCURRENCY_LEVEL=2
Code:

ade@Pc1:~$ make-kpkg clean
Code:

ade@Pc1:~$ fakeroot make-kpkg --append-to-version -amd64custom --initrd kernel_image kernel_headers
Now just wait for the compile to finish and install the .debs with dpkg.

craigevil 07-24-2010 04:13 PM

Try the 2.6.32 kernel from backports first.

If you are running on a newer system I would suggest upgrading to testing and installing the liquorix kernel.

Cultist 07-24-2010 04:53 PM

so I did the backport version, installed it, then restarted. Grub had the new kernel in the list, I tried booting into it, it dropped me to a cli login. I logged in, ran startx, and nothing but an error :|

Made sure to install the dependencies before installing the backport image. Did I do something wrong?

the trooper 07-24-2010 04:59 PM

If you use the Nvidia driver,you'll need to reinstall the driver for the new kernel.

Cultist 07-24-2010 05:01 PM

Quote:

Originally Posted by the trooper (Post 4044276)
If you use the Nvidia driver,you'll need to reinstall the driver for the new kernel.

I think thats exactly what it is, since theres a lot of NVIDIA errors on my laptop screen right now. how exactly do I go about uninstalling that driver?

the trooper 07-24-2010 05:03 PM

Depends how you installed it originally.
Did you download the driver from the Nvidia website or install from Debians' repositories?.

Cultist 07-24-2010 05:04 PM

downloaded the driver from nvidia, then followed this little guide I found online, and it worked.

the trooper 07-24-2010 05:10 PM

You need to kill X,then login as root and run the following:

Code:

nvidia-installer --uninstall
Obviously you then need to re-run the installer for your new kernel.

Cultist 07-24-2010 05:20 PM

k, did that, rebooted, then tried the new kernel again. it dropped me into the CL again, I logged in the CLI, then did startx again, then got this

Failed to load module "type1" (module does not exist, 0)
Failed to load module "nvidia" (module does not exist, 0)
No drivers available

Fatal server error:
no screens up
giving up.
xinit: Connection reset by peer (errno 104): unable to connect to X server
xinit: No such process (errno 3): Server error

Cultist 07-24-2010 05:23 PM

Do I need to reinstall the NVIDIA driver from this CLI before it will let me do anything?

the trooper 07-24-2010 05:25 PM

Yes,you need to navigate to where you have the the installer then run it again.

Cultist 07-24-2010 05:31 PM

k, tried that, and it starts the installer, but gives an error saying Unable to load nvidia.ko. I didn't get this error last time I tried to install. Is there a step I missed?

This is the guide I followed originally before trying to upgrade the kernel.

Quote:

1. Open a terminal and type sudo su

2. Type apt-get install build-essential linux-headers-$(uname -r)

3. Type cd /usr/src

4. Type ln -s linux-headers-$(uname -r) linux

5. Type
wget [file]

6. Type /etc/init.d/gdm stop (to stop gdm and drop to a terminal)

7. Type cd /usr/src && sh NVIDIA-Linux-x86-100.14.23-pkg1.run (to launch the nVidia installer script)
at step 2, it goes through a few lines, says build-essential is already the newest version, then E: Couldn't find package linux-headers-2.6.32-bpo.5-amd64.

edit: Actually, just found the package it says it can't find, about to install it and try again


All times are GMT -5. The time now is 10:06 AM.