Results 1 to 10 of 10

Thread: Kali will not boot from SD card on Pi B+

  1. #1
    Join Date
    2018-Jan
    Posts
    3

    Kali will not boot from SD card on Pi B+

    Howdy friends,
    I'm trying to flash an SD card with Kali Linux to run on my Pi. I've followed the instructions found here: https://docs.kali.org/downloading/ka...ve-usb-install and the image I downloaded came from here: https://www.offensive-security.com/k...ux-arm-images/
    I initially selected the option "RaspberryPi Foundation: Raspberry Pi w/TFT", since I'm not using a 2 or 3, I have a model B+. However, I was able to get some response from the system after I tried using the version for Pi 2/3.
    Everything appears to run fine while flashing the SD card; however, when I power on the unit, I get no response on my monitor. The red and green indicators are active on the Pi itself, but my keyboard never gets power, and my monitor does nothing. If I put my SD card running Raspbian back into the Pi, everything works fine.
    When I tried running the Pi 2/3 version, I was able to get to an initial boot screen, but it would stop after about 5 or 6 seconds and then never proceed from that point. I have an image of that boot screen, but I can't shrink it small enough to upload here. Also, I did verify the SHA256 checksum of my download.
    I'll admit, I'm still fairly new to this sort of thing, but the process seemed awfully straightforward; I just cannot figure out what I'm doing wrong.
    I'm using Windows to perform the SD card flashing with Win32 Disk Imager. This is a brand new SD card that's never had any data on it before.
    I've been searching around and performing what troubleshooting I can, but I am plum out of ideas. Any and all suggestions are greatly appreciated.
    Thanks!

  2. #2
    Join Date
    2015-Nov
    Location
    Australia
    Posts
    445
    Hi Cymricc,

    You can use this image for now:

    https://whitedome.com.au/re4son/down...-armel-re4son/

    Hope that helps

  3. #3
    Join Date
    2018-Jan
    Posts
    3
    Quote Originally Posted by re4son View Post
    Hi Cymricc,

    You can use this image for now:

    https://whitedome.com.au/re4son/down...-armel-re4son/

    Hope that helps
    I would really prefer to use the file straight from the Kali website, I just can't figure out why it isn't working. I'm asking a friend of mine to try it with my SD card on his Pi just to see if maybe there's some defect with my own Pi.

  4. #4
    Join Date
    2015-Nov
    Location
    Australia
    Posts
    445
    You are absolutely right. You should only use official images from the kali website

    In this case, however, you have to do some minor work yourself to get it running because there is currently no official image for the Pi 1 available.

    The first image on the site is for a different processor architecture and the second probably works perfectly well on your Pi, except that you can't see what's going on because it displays everything on the non-existing adafruit tft screen that it is configured for

    That's not a problem though; you can either:

    a) create your own image using the official Kali Linux build scripts, available under:
    https://github.com/offensive-securit...-build-scripts, or

    b) download the "Raspberry Pi w/TFT" image and manually remove the bits and pieces responsible for directing the output to the tft screen


    I'd go with option a)

    It's an extremely straightforward process and it'll make you feel awesome when you have it up and running

    Let me know if you need any help.

  5. #5
    Join Date
    2018-Jan
    Posts
    3
    Quote Originally Posted by re4son View Post
    You are absolutely right. You should only use official images from the kali website

    In this case, however, you have to do some minor work yourself to get it running because there is currently no official image for the Pi 1 available.

    The first image on the site is for a different processor architecture and the second probably works perfectly well on your Pi, except that you can't see what's going on because it displays everything on the non-existing adafruit tft screen that it is configured for

    That's not a problem though; you can either:

    a) create your own image using the official Kali Linux build scripts, available under:
    https://github.com/offensive-securit...-build-scripts, or

    b) download the "Raspberry Pi w/TFT" image and manually remove the bits and pieces responsible for directing the output to the tft screen


    I'd go with option a)

    It's an extremely straightforward process and it'll make you feel awesome when you have it up and running

    Let me know if you need any help.
    Okay sounds good, I do enjoy doing things that make me feel awesome. Although, I'm starting off at a point of having no idea *** I'm doing, so I'm almost certain I'll be needing some assistance, so thank you for you offer, I'll be sure to take you up on that. Also, thanks for you assistance so far. Reading through the readme on the repo page, it seem like I'm wanting to get armel images from this link: https://github.com/offensive-securit...i-linaro-4.6.2
    Does that sound correct?

  6. #6
    Join Date
    2015-Nov
    Location
    Australia
    Posts
    445
    That's right.

    Why don't you head over to the Kali Training site and do exercise 4.4?
    https://kali.training/topic/exercise...x-arm-install/

    That exercise walks you through the whole process and explains everything you need to know. Awesome site.
    Just substitute the armhf toolchain with the armel one as you pointed out and run "rpi.sh" instead of "rpi3-nexmon.sh".

    You can join the training forum on that site if you need any help with that. The guys there are a great bunch and very helpful.

    Happy hacking

  7. #7
    Join Date
    2018-Apr
    Posts
    1
    I built the armel image for my Raspberry Pi 1 B, and it is not working. It stalls at:

    Code:
    devtmpfs: error mounting -2
    What follows is a kernel panic.

  8. #8
    Join Date
    2018-Apr
    Posts
    4
    Quote Originally Posted by re4son View Post
    b) download the "Raspberry Pi w/TFT" image and manually remove the bits and pieces responsible for directing the output to the tft screen
    Why isn't there a simple command or script that can disable TFT? Pi doesn't have a TFT out of the box, so it is the less common configuration. It just seems necessarily obvious.

  9. #9
    Join Date
    2018-Apr
    Posts
    4
    Using the TFT image without TFT will be a problem because booting will appear stuck or frozen on the HDMI screen, according to a post from a different thread:
    Quote Originally Posted by re4son View Post
    Hi nm111,


    Use this image instead:
    https://images.offensive-security.co...-nexmon.img.xz


    The one you used does work, but it is configured for a tft display, i.e. when the screen freezes it has switched the output from hdmi to tft, which makes it tricky to use if you don't have a tft ;-)


    Hope that helps.

    However, by comparing the "rpi-tft.sh" and "rpi.sh" build scripts, I have figured it out -- how to disable the TFT.


    The first change that you need to reverse starts on line 236:


    Code:
    cat << EOF > ${basedir}/bootp/cmdline.txt
    https://github.com/offensive-securit...pi-tft.sh#L236


    In "cmdline.txt" on the FAT partition, you want to replace the same line from the "rpi.sh" build script, which does not include the "fbcon=map:10 fbcon=font:VGA8x8".


    Next, on the Linux partition, replace the "/etc/modules" file with the default "modules" file or just remove the lines added. It is just a header with comments:


    Code:
    # /etc/modules: kernel modules to load at boot time.
    #
    # This file contains the names of kernel modules that should be loaded
    # at boot time, one per line. Lines beginning with "#" are ignored.
    Next, delete the "/etc/modprobe.d/pitft.conf" file.


    Next, replace the "/root/.profile" with the default ".profile" file:


    Code:
    # ~/.profile: executed by Bourne-compatible login shells.
    
    
    if [ "$BASH" ]; then
      if [ -f ~/.bashrc ]; then
        . ~/.bashrc
      fi
    fi
    
    
    mesg n || true
    Finally, delete the entire "/etc/X11/xorg.conf.d/" directory. It should only contain the two files "10-fbdev.conf" and "99-calibration.conf".


    Someone could make a script to automate this.

  10. #10
    Join Date
    2015-Nov
    Location
    Australia
    Posts
    445

    Smile

    Hi XP1,

    You mean a script like this?

    Code:
    Usage: ./re4son-pi-tft-setup -t [pitfttype]
        -h            Print this help
        -v            Print version information
        -a [user]     Enable autologon for [user], use [user] 'disable' to disable autologon
        -b [bootpref] Set boot preference:
                        'cli' for boot to command line
                        'gui' for boot to desktop
        -u            Update Re4son Pi-TFT Setup
        -r            Remove TFT configuration (undo setup)
        -d [dir]      Specify path of user's home directory to back up and restore some files (defaults to /home/pi)
        -t [type]     Specify the type of TFT:
                                                 '28r'      (Adafruit 2.8" PID 1601)
                                                 '28c'      (Adafruit 2.8" PID 1983)
                                                 '35r'      (Adafruit 3.5")
                                                 '22'       (Adafruit 2.2")
                                                 '4dpi'     (4D Systems 2.4",3.2" and 3.5")
                                                 'elec22'   (Elecfreak 2.2")
                                                 'hy28b'    (Hotmcu HY28B 2.8")
                                                 'jb35'     (JBTek 3.5")
                                                 'kum35'    (Kuman 3.5")
                                                 'pi70'     (Raspberry Pi 7")
                                                 'sain32'   (Sainsmart 3.2")
                                                 'sain35'   (Sainsmart 3.5")
                                                 'wave32'   (Waveshare 3.2")
                                                 'wave35'   (Waveshare 3.5")
                                                 'wave35o'  (Waveshare 3.5" Overclocked)
                                                 'wave35h'  (Waveshare 3.5" HDMI)
                                                 'wave35c'  (Waveshare 3.5" Clones, such as:
                                                                             Elecrow 3.5"
                                                                             KeDei 3.5"
                                                                             Osoyoo 3.5")
                                                 'wave40'   (Waveshare 4")
                                                 'wave50'   (Waveshare 5" HDMI)

    There is an easier way though: choose the armel image without TFT config.
    Offsec provides three Raspberry Pi images on their download page:

    1. armhf - for RasPi 2&3 without TFT
    2. armel w/TFT - for RasPi 0&1 with adafruit 3.5" TFT display
    3. armel - for RasPi 0&1 without TFT

    The above thread came about when there was temporarily no image available for armel w/o TFT - so I provided a workaround until the image was made available again.
    Usually there is an image for everyone and for more exotic needs there is always the re4son-kernel

    Hope that helps,
    Re4son
    Last edited by re4son; 2018-04-20 at 04:59.

Similar Threads

  1. Replies: 0
    Last Post: 2020-10-21, 13:18
  2. Kali Linux SD Card Boot on PC
    By Icosagon in forum Installing Archive
    Replies: 1
    Last Post: 2018-04-28, 02:20
  3. Install and boot kali from SD card
    By vmos in forum Installing Archive
    Replies: 0
    Last Post: 2016-01-20, 20:28
  4. Replies: 1
    Last Post: 2014-03-07, 02:11

Posting Permissions

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