1212
Views

I searched everywhere for this one and really found little in the way of a definitive answer. After some testing, I was able to determine that copying the config.txt from a Raspbian image did work for Kali Linux.

Adding or editing your config.txt on PC

Insert the flashed micro SD card into your PC and you can access the boot directory as the root directory of the sd card.

Adding or editing your config.txt on Kali Linux

The /boot partition isn’t mounted by default (you will be able to navigate to it but there will be no content) so you will need to mount it before you can access it. The system defaults the this partition to /boot when mounted.

mount /dev/mmcblk0p1

You can navigate to /boot to confirm that mmcblk0p1 has been mounted. You will see files if this was successful. Then you will make your config.txt here. File permissions are set automatically if the file is created in /boot.

cd /boot
nano config.txt

Insert the following stock config.txt content into your config.txt file. This was pulled from most recent, at the time of writing this, Raspbian image.

# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

Save the file and reboot. Kali Linux will automatically load the config.txt on startup.

Conclusion

I spent a few hours looking for this information and found example after example that had me installing things to read the config.txt, locations of the config.txt that didn’t exist and complex directions that didn’t work.

One consistent thing I saw was the suggestion to just make it, add your changes and give it a try to see if it works. I did this to install an lcd hat and I can confirm that adding my settings to the config.txt and completing the steps above worked for me.

Let me know if you have any questions or share your success in the comments below.

Article Tags:
· ·
Article Categories:
Featured · Tech
SDATIC

Web developer and former photographer by trade...gamer and all around tech enthusiast in his free time. Christoph started sdatic.com as a way to organize his ideas, research, notes and interests. He also found it enjoyable to connect and share with others who parallel his interests. Everything you see here is a resource that he found useful or interesting and he hopes that you will too.

All Comments

  • Thanks.. this helped me a lot. I was initially confused as it seemed /boot/ was mounted (but blank). Turns out I did need to mount /dev/mmcblk0p1 and then this worked.

    Many thanks!

    Zxubit January 29, 2017 3:05 am Reply
    • So glad to hear that it helped you out. I ran into the same issue the first time I tried this too. I noticed that it varies from disto to distro.

      Thanks for stopping by!

      sdatic January 31, 2017 8:48 am Reply
  • how did you “access the boot directory as the root directory of the sd card.” I can’t seem to change the config text after I change the sd card after I install kali linux

    j July 23, 2017 11:56 pm Reply
    • On my Windows 10 PC when I insert the micro sd I see two drives mount, F and G. One shows up as a drive that needs formatted (it’s the Linux partition) and one shows the contents of the boot partition.

      When you insert your Micro SD into the PC are you able to see two drive letters mount?

      sdatic July 24, 2017 12:42 am Reply
      • Actually J, I just tried this again on a recent install of Kali and am not seeing the config.txt file any longer on the mounted drive. This may have changed in a more recent release. You will have to update it with the Linux steps outlaid above.

        I will see if it’s still possible in any way to access it via Windows 10.

        Thanks J!

        sdatic July 24, 2017 12:55 am Reply
        • J, one more update. I can confirm that the drive letter that mounts when you insert your sd card via Windows (10 at least) is the boot directory. You can create the config.txt file in this root directory which does translate to the boot directory when the SD card is put back in the PI.

          Hope this helps!

          sdatic August 10, 2017 2:30 am Reply
  • This absolutely worked for me!

    I had a hunch the config.txt wasn’t being loaded, but I didn’t think /boot wasn’t accessible to the OS, so as soon as I read your content I knew immediately it was my problem.

    This will solve this problem for so many people!

    Thanks so much!

    P.S. Another topic there is a bluetooth issue as well, have you figured that issue out?

    Cyb3rP1 August 10, 2017 2:06 am Reply
    • Hi Cyb3rP1, I’m so glad to hear that this worked for you. I’ll look into the bluetooth issue next!

      sdatic August 10, 2017 2:15 am Reply
  • This was awesome, 2-3 questions… would this possibly fix mate sound issues on pi/Armbian sound issues on tinkerboard and may I share this article via my site and credit you for the solution?

    AlwaysInTao October 5, 2017 3:17 am Reply
    • Hi AlwaysInTao. Thanks for the comment! I’m glad you found it useful. I would have to recommend giving it a try on Mate and Armbian as I’ve not tested. Feel free to share and I appreciate the credit.

      sdatic October 5, 2017 1:50 pm Reply
  • Pingback: Raspberry Pi Fixing Sound On Kali Linux – AlwaysInTao

  • Thank you!!!

    Bartek December 2, 2017 12:03 am Reply
  • Thank you!
    Worked great.
    /dev/mmcblk0p1 was already mounted.

    capcaun March 9, 2018 7:34 am Reply
  • Owl March 25, 2018 6:08 pm Reply
  • It ain’t workin for me.I am on Raspberry pi 3 model b.

    Briyan Paul April 5, 2018 10:46 am Reply
    • Sorry for the delay in comment. Your message was lost in a pile of spam. If you want to elaborate, I’d be happy to look into it for you. What did you try? Can you send any screenshots?

      Thanks!

      Christoph October 14, 2018 7:40 am Reply
    • Sorry this reply took so long, it was buried in spam. Thanks for sharing this guide, I’ll have to make one in a future post!

      Christoph October 14, 2018 7:42 am Reply
  • Hi! Thanks for the help, but it didn’t works.
    I edited config.txt, add those lines and reboot but kali keeps without sound. Can you help me? please!!!!

    isma November 11, 2018 8:21 pm Reply
  • Worked flawlessly! Excellent patch.

    Alex January 6, 2019 3:11 pm Reply
  • Hi

    I tried your tutorial but ran into touble:

    ~# mount /dev/mmcblk0p1
    mount: /dev/mmcblk0p1: can’t find in /etc/fstab.

    Any thoughts? Using Latest Kali Linux on Raspberry pi 4

    Chris October 29, 2019 7:58 pm Reply
  • Hi! Thanks for the guide. It didn’t work for me. Raspberry Pi 3 b+. Is this up to date?

    okuri71 May 9, 2020 4:53 pm Reply
  • Hi! Clear guide, good job. It doesn’t work for me.

    okuri71 May 10, 2020 12:13 pm Reply

Leave a Reply

Your email address will not be published. Required fields are marked *