Results 1 to 2 of 2

Thread: "prepare-kernel-sources" won't work

Hybrid View

  1. #1
    Just burned his ISO
    Join Date
    Mar 2011
    Posts
    7

    Default "prepare-kernel-sources" won't work

    Hi. I am trying to install a NVIDIA driver for my graphics card (GeForce 8600M GT) and to do so I have to execute the command "prepare-kernel-sources". Here is the output:

    Code:
    |root@bt:~# prepare-kernel-sources
    |[*] apt-getting linux-source...
    |Reading package lists... Done
    |Building dependency tree       
    |Reading state information... Done
    |linux-source is already the newest version.
    |The following packages were automatically installed and are no longer required:
    |  libdmraid1.0.0.rc16 python-pyicu libdebian-installer4 cryptsetup libecryptfs0
    |  reiserfsprogs rdate bogl-bterm ecryptfs-utils libdebconfclient0 dmraid
    |Use 'apt-get autoremove' to remove them.
    |0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    |[*] extracting sources, please wait
    |tar: linux-source-2.6.38.tar.bz2: Cannot open: No such file or directory
    |tar: Error is not recoverable: exiting now
    |tar: Child returned status 2
    |tar: Exiting with failure status due to previous errors
    |[*] doing stuff...
    |/usr/bin/prepare-kernel-sources: line 11: cd: linux: No such file or directory
    |cp: missing destination file operand after `/boot/'
    |Try `cp --help' for more information.
    |make: *** No rule to make target `scripts'.  Stop.
    |make: *** No rule to make target `prepare'.  Stop.
    |ln: creating symbolic link `/lib/modules/2.6.38/build': File exists
    |[*] tada!
    As you can see, it doesn't work.

    When I "cd" to and "ls" in the directory where the "linux-source-2.6.38.tar.bz2" should be I get this:

    Code:
    root@bt:~# cd /usr/src/
    root@bt:/usr/src# ls
    linux  linux-headers-2.6.38  linux-source-2.6.32.tar.bz2  truecrypt-7.0a-setup-x86
    This is how the "prepare-kernel-sources"-script, which is in the directory "/usr/bin":

    Code:
    #!/bin/bash
    VER=`uname -r`
    echo "[*] apt-getting linux-source..."
    apt-get install linux-source
    cd /usr/src/
    echo "[*] extracting sources, please wait"
    tar jxpf linux-source-$VER.tar.bz2
    echo "[*] doing stuff..."
    rm -rf linux
    ln -s linux-source-$VER linux
    cd linux
    zcat /proc/config.gz > .config
    cp /boot/
    make scripts
    make prepare
    ln -s /usr/src/linux /lib/modules/$VER/build
    echo "[*] tada!"
    I have the KDE version of Backtrack 5 and when I type "uname -r" I get this output: "2.6.38".

    Could someone please help me solve this error? Please tell me if there is something more you need to know!

  2. #2
    Just burned his ISO
    Join Date
    Jul 2011
    Location
    Jakarta
    Posts
    5

    Lightbulb Re: "prepare-kernel-sources" won't work

    try this:

    Code:
    apt-get install linux-source-2.6.38
    then

    Code:
    prepare-kernel-source

Similar Threads

  1. prepare-kernel-sources
    By SWFu64 in forum BackTrack 5 Bugs
    Replies: 8
    Last Post: 10-23-2011, 08:54 PM
  2. typo in prepare-kernel-sources
    By aifooru in forum BackTrack 5 Bugs
    Replies: 0
    Last Post: 05-15-2011, 03:15 PM
  3. Replies: 0
    Last Post: 05-11-2011, 04:57 AM
  4. Replies: 10
    Last Post: 12-12-2010, 02:58 PM
  5. Backtrack refuses to boot while "sources" folder exsists.
    By Coniferous in forum BackTrack Bugs
    Replies: 0
    Last Post: 06-12-2010, 05:20 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •