Results 1 to 5 of 5

Thread: Fixed prepare-kernel-sources script

  1. #1
    Member
    Join Date
    Jan 2006
    Posts
    66

    Default Fixed prepare-kernel-sources script

    This is a touched up version of the prepare-kernel-sources script included in BT5. The version included in the R0 release doesn't use the proper kernel version and is effectively broken; most users end up doing it manually. Here is my humble contribution to a fix:

    Code:
    #!/bin/bash
    # Modified by Hobz/Hobbes 16/08/11
    
    function get-version {
    for f in /usr/src/linux-source-"$(uname -r)"*.tar.bz2
    do if [[ -f $f ]]
    then
            f="${f#*/usr/src/linux-source-}"
            VER="${f%*.tar.bz2}"
    fi
    done
    }
    
    echo "[*] apt-getting linux-source..."
    apt-get install linux-source
    cd /usr/src/
    get-version
    echo "[*] extracting sources (version "$VER"), 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
    echo "[*] making stuff..."
    make scripts
    make prepare
    ln -s /usr/src/linux /lib/modules/$VER/build
    echo "[*] tada!"
    
    
    #  Uncomment next two lines to automatically complete the process
    #cd /usr/src/linux
    #cp -rf include/generated/* include/linux/
    Last edited by hobbes; 08-27-2011 at 11:53 PM. Reason: R1 pre-release to R0 for clarity

  2. #2
    Good friend of the forums zimmaro's Avatar
    Join Date
    Mar 2010
    Location
    milano
    Posts
    407

    Default Re: Fixed prepare-kernel-sources script

    many thanks

  3. #3
    Good friend of the forums Eatme's Avatar
    Join Date
    Aug 2009
    Location
    Socks5
    Posts
    308

    Default Re: Fixed prepare-kernel-sources script

    doesn't work..
    Wiffy-Auto-Cracker - was the best thing that ever happen to me. :) Wo0oT :)
    AWUSO36H_500mW_5dBi Antenna

  4. #4
    Member
    Join Date
    Jan 2006
    Posts
    66

    Default Re: Fixed prepare-kernel-sources script

    Are you on R1 or R0?
    ---
    Useful HowTo Threads <-- Why do people think I'm joking when I link this?

  5. #5
    Good friend of the forums Eatme's Avatar
    Join Date
    Aug 2009
    Location
    Socks5
    Posts
    308

    Default Re: Fixed prepare-kernel-sources script

    Quote Originally Posted by hobbes View Post
    Are you on R1 or R0?
    R1 but nvm...
    Last edited by Eatme; 08-28-2011 at 02:50 AM. Reason: OP made a mistake and corrected it
    Wiffy-Auto-Cracker - was the best thing that ever happen to me. :) Wo0oT :)
    AWUSO36H_500mW_5dBi Antenna

Similar Threads

  1. prepare-kernel-sources
    By SWFu64 in forum BackTrack 5 Bugs
    Replies: 8
    Last Post: 10-23-2011, 08:54 PM
  2. "prepare-kernel-sources" won't work
    By adrianpip2000 in forum BackTrack 5 General Topics
    Replies: 1
    Last Post: 07-17-2011, 05:04 AM
  3. typo in prepare-kernel-sources
    By aifooru in forum BackTrack 5 Bugs
    Replies: 0
    Last Post: 05-15-2011, 03:15 PM
  4. Replies: 0
    Last Post: 05-11-2011, 04:57 AM

Posting Permissions

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