Let me start with – yes, I know, “you’re not supposed to install Kali on bare metal!” This is a machine I got with the primary intention of studying cybersecurity and with the full expectation that I’m going to mess stuff up repeatedly. There’s a reason I installed onto a BTRFS filesystem and am constantly taking snapshots
I’m going to leave detailed installation posts for others who are more knowledgeable about Linux to handle (this already seems like a pretty good guide for the basics, though written for the FW13: [RESPONDED] Kali Linux Install Stuck at Grub> Cmd Line ). I’m here to add a few words on my efforts to get the dGPU working with hashcat – these steps do not appear to hinder graphical applications using the GPU or cause any other issues with the system (though I’ll do my best to update if I find any hiccups!).
Since Kali is Debian-based, I assumed many instructions would be similar to Ubuntu, and that I could use many of the same tools to achieve my goals. After a lot of effort trying that approach… I wouldn’t bother. My recommendation is to not follow the “completion instructions” in the Ubuntu installation guide. After fully upgrading Kali, DRI_PRIME=1 will already work out of the box.
But if you install hashcat, it won’t see your dGPU. Nor will some other tools. Guides online will likely recommend that you uninstall anything related to PoCL – don’t bother, you won’t need to. Hashcat’s website specifies that you’ll need “AMDGPU” and “ROCm”, and documentation on ROCm seems to indicate that our kernel, OS, and GPU are all unsupported… but it turns out you can get it working anyway!
First, uninstall and purge amdgpu-dkms if it’s already installed, and ensure xserver-xorg-video-radeon is installed. Then, begin following the instructions here for Ubuntu 22.04, but stop after apt update!
Installing the .deb will give you some new tools, including amdgpu-install. This script will do much of what we want, but doesn’t want to work on Kali – so we need to trick it into thinking we’re running Ubuntu. Use which amdgpu-install
to find it, then open with sudoedit. In the function os_release
, after the line case "$ID" in
, add ‘kali’, and save the script.
Remember, we don’t want to install the dkms driver, and we’re only searching for OpenCL support here. So we can use this script with sudo amdgpu-install --usecase=opencl --no-dkms
, which will invoke apt with the packages we need.
And… that should do it! Hashcat should now recognize another OpenCL platform that lists the discrete GPU (as well as an apparent phantom entry for the iGPU?), and it runs successfully! Note that hashcat run in this way will not show up in the Framework team’s fantastic dGPU-detect tool, but you can verify that it is indeed using the GPU using radeontop
.
Let me be clear – though I’m knowledgeable about computing and programming in general, there is a LOT I still have to learn when it comes to Linux. Your milage will likely vary if you try these instructions, and I can’t guarantee I’ll be able to help if they bork your system. But for those interested and willing to try, I figured I might as well put a resource out there that I wish I’d come across while working on all this, haha. Please do let me know if you have thoughts or advice on this, or further tips for using Kali on bare metal FW16!