Announcement

Collapse
No announcement yet.

ok this time i screwed up i think :(

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    ok this time i screwed up i think :(

    hello guys.i really hope that you can help me with my problem since i almost destroyed my kubuntu installation xD.
    well last week i managed to build my first custom linux kernel.I also installed the nvidia drivers from command line and it worked great.Well yesterday i saw that my root partition had only 2.5 gb free from the 20gb of maximum space,so i went to /usr/src and saw that the folders of 2.6.35.22 & 23 image and their headers + my 2.6.31 image folder (now the latest stable is 2.6.32 in kernel.org) were about 7.9 GB.So i decided to delete them.
    Instead of just deleting them,I downloaded synaptic package manager and searched for kernel image or sth.I found the 2.6.35.22 image and its headers and checked mark for complete removal(i left 2.6.35.23 just in case sth goes wrong with 2.6.31.).Now the thing is that synaptic said that was also going to remove nvidia-curennt.I agreed with it saying "ok,i will just reinstall nvidia drivers from command line and everything will be working again".The thing is that i removed all the other folders left in /usr/src so now i don't have any headers or image folders left there.so when i tried to install the nvidia driver again,it said that it couldn't locate the source tree.Hopefully i still had 2.6.31.bz2 and i untar it again to the /usr/src.Tried again and said the kernel wasn't configured or sth.I also had an old .config as backup so i quickly managed to solve this as well.Now tried to install again,the installer says the driver is already installed(although startx doesn't work).I pressed to uninstall it first and reinstall but says that it couldn't locate kernel headers.The thing is that with 2.6.31 i didn't have any kernel headers.I booted in 2.6.35.23 and same thing happens.From failsafe X i also did sth stupid and can't use even nouveau (or how is it called-the alt nvidia driver).So i know i made a BIG thread but you are the only help i have now.Thanks in advance!

    #2
    Re: ok this time i screwed up i think

    Yep, I'd say you're having a real character-building adventure there! :P

    I cannot say with confidence how to fix it, but I know you need both the kernel-headers tree and the build-essential packages to compile a driver module. So, what is the most recent kernel available to boot -- is it 2.6.35-23? If so, boot that, and log in at the CLI. Now

    Code:
    sudo apt-get update && sudo apt-get dist-upgrade
    Code:
    sudo apt-get install linux-headers-'uname -r'
    Code:
    sudo apt-get install build-essential
    Now, try installing your Nvidia driver in the normal manner, and lets see what happens. If it works, you'll have a usable system, with which to try your next adventure.



    Comment


      #3
      Re: ok this time i screwed up i think

      Wow. I don't know where to begin to help you solve this problem. Maybe reinstalling the latest kernel from the repository? That might work, except you would lose all of the changes made when you built your custom kernel. A couple of suggestions to help you keep things running after you get it fixed.

      Use the x-swat repository to install the latest nvidia driver.
      Code:
      sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
      sudo apt-get update
      sudo apt-get install nvidia-common nvidia-settings
      Copy this script and save it as an executable with the .sh extension to remove all except the most current kernel from your system correctly and painlessly. Be sure to run it as sudo.

      #/bin/bash
      ls /boot/ | grep vmlinuz | sed 's@vmlinuz-@linux-image-@g' | grep -v `uname -r` > /tmp/kernelList
      for I in `cat /tmp/kernelList`
      do
      aptitude remove $I
      done
      rm -f /tmp/kernelList
      update-grub


      Hope you get everything working again. I found this script through the Ubuntu Geek web page. Credit where credit is due. I have run it on my machine and it worked perfectly.

      Comment


        #4
        Re: ok this time i screwed up i think

        Hell yeah!!!!!! It worked like a charm!!!!! Thanks a million dibl !!!!!!!!!!!!!!!! Well i maybe can't still startx in 2.6.36.1 but 2.6.35-23 works great!!!
        @Detonate thanks a lot also for trying to help! I will bookmark this thread so i have quick access to the script you provided.
        Hope i won't have such an adventure with 2.6.36.2 kernel that recently came out
        Again thanks a LOT!!!!!!!!!!! You are the BEST!

        Comment


          #5
          Re: ok this time i screwed up i think

          Originally posted by Detonate


          Copy this script and save it as an executable with the .sh extension to remove all except the most current kernel from your system correctly and painlessly. Be sure to run it as sudo.

          Thanks for this. I was looking for exactly that solution.
          Home: Kubuntu 12.04-amd64; Intel i7-860 on Intel DH55PJ; Nvidia 9500GT; 6GB RAM
          Network Slave: Xubuntu 11.10-x86; Intel P4-Prescott on MSI; 2GB RAM; Nvidia FX5200
          Portable: Xubuntu 11.10-amd64; Asus EeePC 1015PEM

          Comment


            #6
            Re: ok this time i screwed up i think

            The first thing I thought of when I saw that script was that it was a "THREE PIPE SOLUTION" -- a perfect match to Snowhog's "Three Pipe Problem"
            $ uname -r
            2.6.32-27-generic
            $ ls /boot/ | grep vmlinuz | sed 's@vmlinuz-@linux-image-@g' | grep -v `uname -r`
            linux-image-2.6.32-25-generic
            linux-image-2.6.32-26-generic
            $ vdir /boot
            total 45056
            -rw-r--r-- 1 root root 646144 2010-10-16 15:37 abi-2.6.32-25-generic
            -rw-r--r-- 1 root root 646144 2010-11-24 04:58 abi-2.6.32-26-generic
            -rw-r--r-- 1 root root 646144 2010-12-01 22:42 abi-2.6.32-27-generic
            -rw-r--r-- 1 root root 110600 2010-10-16 15:37 config-2.6.32-25-generic
            -rw-r--r-- 1 root root 110601 2010-11-24 04:58 config-2.6.32-26-generic
            -rw-r--r-- 1 root root 110601 2010-12-01 22:42 config-2.6.32-27-generic
            drwxr-xr-x 3 root root 4096 2010-12-08 19:15 grub
            -rw-r--r-- 1 root root 8344332 2010-10-30 13:08 initrd.img-2.6.32-25-generic
            -rw-r--r-- 1 root root 8345265 2010-11-30 16:58 initrd.img-2.6.32-26-generic
            -rw-r--r-- 1 root root 8345085 2010-12-08 19:14 initrd.img-2.6.32-27-generic
            -rw-r--r-- 1 root root 160280 2010-03-23 04:40 memtest86+.bin
            -rw-r--r-- 1 root root 2155696 2010-10-16 15:37 System.map-2.6.32-25-generic
            -rw-r--r-- 1 root root 2156100 2010-11-24 04:58 System.map-2.6.32-26-generic
            -rw-r--r-- 1 root root 2156429 2010-12-01 22:42 System.map-2.6.32-27-generic
            -rw-r--r-- 1 root root 1336 2010-10-16 15:38 vmcoreinfo-2.6.32-25-generic
            -rw-r--r-- 1 root root 1336 2010-11-24 05:00 vmcoreinfo-2.6.32-26-generic
            -rw-r--r-- 1 root root 1336 2010-12-01 22:48 vmcoreinfo-2.6.32-27-generic
            -rw-r--r-- 1 root root 4050592 2010-10-16 15:37 vmlinuz-2.6.32-25-generic
            -rw-r--r-- 1 root root 4050080 2010-11-24 04:58 vmlinuz-2.6.32-26-generic
            -rw-r--r-- 1 root root 4049888 2010-12-01 22:42 vmlinuz-2.6.32-27-generic
            In case you are wondering how the script avoids removing the active kernel:
            The first pipe picks out only those file names with "vmlinuz" in them.
            The second pipe replaces "vmlinuz" with "linux-image" in the names
            The third pipe inverts the selection and returns only those modified file names which do NOT match the currently installed kernel.
            The script then loops through the names and and uses aptitude to remove them, then it erases the list, then runs update-grup to clean up the grub menu.

            Clever script.

            One can also open Synaptic, enter "generic" in the search box, click on the top of the left column to put the installed (green boxes) at the top. Scroll through the list and mark for complete removal ALL the kernels with "linux-image-*-generic" in their names EXCEPT for the one with the highest number. (In my case "27"), that's the one that is currently running.. Then click the Apply button.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              Re: ok this time i screwed up i think

              Originally posted by DarkDante
              Hell yeah!!!!!! It worked like a charm!!!!! Thanks a million dibl !!!!!!!!!!!!!!!!
              8)

              You are very welcome. Good luck with it.

              Comment

              Working...
              X