Raspberry Pi: Hands-on with Kali

There has been considerable progress made since the last time I tried a variety of Linux distributions other than Raspbian on the Raspberry Pi, so Iā€™ve given four of them another try.

It has been nearly two years since I triedĀ Fedora, Manjaro and Ubuntu MATE on the Raspberry Pi 2 & 3, and there have been a lot of changes since then. Most for the better, such as the introduction of the Pi 3B+, but a few for the worse, such as the end of the Manjaro Pi development. So I think itā€™s time to take a fresh look at this.

But, first, why would anyone even want to do this, when Raspbian Linux is available, free, and supports all the special features, quirks and capabilities of the Raspberry Pi hardware?

Well; the most common reasons seem to be that users want to work with a ā€œfamiliarā€ distribution, meaning one that they are already using on a PC, such as Ubuntu. Another common reason is that companies have ā€œstandardizedā€ on a specific version of Linux for servers, desktops and laptops; this is frequently the case with SUSE and Fedora, for example. Yet another reason might be a specific use of the Raspberry Pi; for example, Kali Linux for penetration testing. Finally you might just be curious (or masochistic) like me, and want to see how (or if) all of this works together.

So, I have taken what I consider to be the four best-known or most popular Linux distributions which have Raspberry Pi ports available, and tried them out on a few of my Raspberry Pi systems. One thing that I am doing differently this time is that I have limited my testing to the Raspberry Pi 2 and 3 (including the 3B+). I learned the last time that even if you could get something running on a Pi Zero or 1, the performance was just too bad to be worthwhile.

UBUNTU MATE

Letā€™s get the bad news out of the way first. Ubuntu MATE seems to be stuck at version 16.04 LTS. Thatā€™s well over two years old now. When it first came out, I assumed (well, hoped) that it would be updated along with the regular Ubuntu releases every six months. That didnā€™t happen when 16.10 came out, so IĀ thenĀ hoped that it would at least be updated to the next LTS release. Alas, that also didnā€™t happen when Ubuntu 18.04 LTS came out.

It has, at least, gotten the point-updates for 16.04, but even those have not been incorporated into new distribution images. So if you get the image from theĀ Ubuntu MATE DownloadsĀ page now, what you actually install is 16.04.2, and you then have to try to update from there

Oh, and before I forget to mention it, the Ubuntu MATE distribution images will not boot on a Pi 3B+. This is a ā€œknown problemā€, because the boot code is different, and since the distribution images havenā€™t been updated, thatā€™s not a big surprise.

Ubuntu MATE on Raspberry Pi 3B
Ubuntu MATE on Raspberry Pi 3B
Anyway, after booting the distribution image on a Pi 2 or 3B, you need to update it to at least get to the latest 16.04 version. Unfortunately even that is difficult, because the update process complains about not having enough space in the /boot partition, and there is no room to increase the size of that partition. Sigh. The simplest work-around that I could find was to move the start_*.efi files from /boot to /root, which frees up enough space; then run the update, which takes an hour or so, then move those files back to /boot. Yeah, I know, itā€™s pretty ugly.

By this time my patience was wearing pretty thin ā€” Iā€™m not a big Ubuntu fan anyway, and this was just turning into one problem after another, with a very limited payoff even if everything works. Which it didnā€™t. The Welcome screen crashes, for example. It finally came up, and I could confirm that it was running 16.04.5 LTS, which is at least the latest version of 16.04. Then I tried to run Firefox, and even that crashed. Grrrr. Ok, Iā€™m ready to give up on this now.

One last bit of bad newsā€¦ itĀ stillĀ doesnā€™t boot in a Pi 3B+. Yes, I know that it might be possible to fix this but honestly, thereā€™s just no point. If you absolutely, positively have to run Ubuntu on your Raspberry Pi 2 or 3B, it is still possible. Sort of.

Moving on to the good newsā€¦

KALI LINUX

My original impetus in doing this was seeing an article aboutĀ Secure Kali Pi 2018. Iā€™m a huge fan of Kali Linux, so this really interested me. I wrote aboutĀ Kali on the Raspberry Pipreviously, and was quite pleased with it then, so I wanted to see how much they have improved it since that time. I was not disappointed.

The only thing that is a bit confusing about the Kali Pi distribution is figuring out exactly which version you want to download. You have to go through theĀ Kali Linux Downloadspage, then from there to theĀ Kali Arm ImagesĀ page, then expand the Raspberry Pi Foundation section. There are eight images there, and itā€™s not always easy to figure out which one is for what Pi model, what display, what other tools or configurations might be includedā€¦ in my honest opinion, itā€™s a bit of a mess, and at least some explanation of what each download is for would be a tremendous help.

Anyway, after some significant head-scratching and tracking down various terms and references, I settled on the one calledĀ Kali Linux Raspberry Pi 2 and 3. That looks very obvious when I just write it here like that, but then you look around and see that there is also one calledĀ Kali Linux RaspberryPi 2 and 3 Hyperpixel, and another calledĀ Kali Linux RaspberryPi 2 or 3 without nexmonā€¦ well, hyperpixel is a specific touch-screen display for the Pi, and I donā€™t want to use that in this case, and nexmon has to do with monitoring and manipulating the Broadcom WiFi chip. I donā€™t really care about that either, but the ā€œwithoutā€ version looks like it might be a Pi 2 version, and I donā€™t want to have trouble booting on the 3B+, so thatā€™s why I settled on the one I did. I hope.

The download is in xz compressed format, so to uncompress and dump it to an SD card you can use this (on a Linux system):

xzcat kali-linux-2018.3-rpi3-nexmon.img.xz | \

dd bs=4M of=/dev/sdX iflag=fullblock oflag=direct status=progress

Kali Linux 2018.3 on Raspberry Pi 3B Plus

Then I just popped the microSD card into my Pi 3B+, and it booted right up! Nice!

This is an Xfce desktop, which is a very good choice because it is lightweight so it doesnā€™t load the Pi CPU or memory too much, but it still looks good, and it is very flexible and easily configurable.

Performance is amazingly good, this is the first time I have tried a distribution that I thought performed at least as well as Raspbian.

I have booted the same microSD card in Pi 3B+, 3B and 2B systems and all three worked without problem, including wired and wireless networking and Bluetooth using the built-in adapters in the 3B and 3B+, and USB dongles on the 2B.

In fact, Bluetooth works even better than it does on Raspbian! I mentioned in a recent post that my Logitech m720 Triathlon mouse wouldnā€™t pair with Raspbian; it works perfectly with Kali Linux, on all three Pi models (that means with two different built-in bluetooth adapters and one USB adapter). I would suggest installing the Blueman package to get a GUI interface for Bluetooth management, but it can certainly be done from the CLI in the basic Kali installation.

What an excellent result this was, especially after the initial disappointment with Ubuntu MATE on the Raspberry Pi. In fact, I was so inspired by this that I decided to have another look at openSUSE on the Raspberry Pi too.

OPENSUSE TUMBLEWEED

The last time I triedĀ openSUSE on a Raspberry PiĀ I had a lot of trouble with it. I managed to get Leap 42.2 working, but I couldnā€™t even get Tumbleweed to boot. This time the experience has been much better.

The information, instructions and download links are on theĀ openSUSE Raspberry Pi 3Ā page. Itā€™s still not all smooth sailing, because none of the direct links to downloads on that page work (sigh). The reason is simple enough ā€” someone has removed ā€œrawā€ from the Current image names, but not from the links. The solution is also simple, just click on theĀ general download directoryĀ link, and find the version you want; or copy the specific link for the version you want, paste it and remove ā€œrawā€ from the end, and it will work. Itā€™s really (really) irritating when silly, careless mistakes like this make an otherwise good distribution look so bad.

Anyway, I downloaded the LXQt version (in the interest of minimizing system load and resource use), which comes in at a rather svelte 800MB. It is also in xz compressed format, so it can be uncompressed and dumped to an SD card using the same command as for Kali above.

Pop the microSD card into a Pi 3B+ (or 3B, or 2B), and let it boot. It takes quite a while, and the boot process will look very strange to experienced Raspbian users, but after a minute or two it will be up and running.

openSUSE Tumbleweed on Raspberry Pi 3B Plus

openSUSE Tumbleweed on Raspberry Pi 3B Plus

The LXQt version has a rather ugly/boring desktop wallpaper, so I have replaced that with the standard openSUSE wallpaper.

Performance is once again surprisingly good, although a tad slower than Kali when starting apps and such. Wired and wireless networking are no problem, but I couldnā€™t get Bluetooth to work, no matter what I tried (and I tried a lot).

Installing updates was no problem, and even though the installation image was dated 20181018, there were a lot of themā€¦ well, this is Tumbleweed so no surprise there either.

Where Kali is a penetration-testing focused distribution, openSUSE is a general purpose Linux distribution, and it comes equipped accordingly. Both Firefox and Chromium are included, as is Thunderbird; GIMP and Shotwell, Pragha and Videos, and just about anything else I could think of. The only obvious thing not included was LibreOffice, and thatā€™s more likely because I downloaded the LXQt version, not because of the Raspberry Pi target system.

OPENSUSE LEAP 15.0

Although I was specifically looking for the Tumbleweed version, I found that theĀ openSUSE Raspberry Pi 3Ā page also contained links for Leap 15.0 (the current Leap release) and Leap 42.3 (the previous Leap release). Please donā€™t ask me to explain about the version numbers, they donā€™t make much sense to me either.

I figured while I was there I would give it a whirl as well. The procedure started off the same; download, uncompress, dump to a microSD card, pop the card into the Pi 3B+, andā€¦ oops. It wouldnā€™t boot. It produced the classic ā€œblinking LEDā€ symptom which means that the boot files havenā€™t been updated for the 3B+. So I swapped the card over to a plain 3B, and it booted just fine.

openSUSE Leap 15.0 on Raspberry Pi 3B Plus

openSUSE Leap 15.0 on Raspberry Pi 3B Plus

It continued normally from there, coming up to the LXQt desktop. Iā€™ve left the ugly wallpaper on this one, for comparison. Once again, wired and wireless networking were just fine, and Bluetooth didnā€™t work. I installed all of the updates, then shut down and moved the card back to the 3B+, and it booted just fine. Yay!

Performance seemed the same as it was for Tumbleweed, so that was good. It doesnā€™t have nearly the assortment of applications and utilities in the base system, though. I only saw Firefox (no Chromium or Thunderbird), it has GIMP but not Shotwell, and no audio or video players at all that I could find. Again, this may be down to my choosing the LXQt version, and all of these applications and much more are available in the repositories.

My bottom line for openSUSE, either Tumbleweed or Leap, is that they are perfectly usable on the Raspberry Pi 3B or 3B+, and even tolerable on the 2B. So if you donā€™t care for Raspbian, and you donā€™t want to start with Kali and add the applications you need, or if you are in an organization that has standardized on SUSE or openSUSE, go for it. I donā€™t think youā€™ll regret it.

FEDORA WORKSTATION

While I was working on the Kali and openSUSE installations, I got an email from a reader who mentioned that he had just tried Fedora 28 on a Pi 3, and had been very pleasantly surprised by the ease of installation and performance.

The last time I triedĀ Fedora on Raspberry Pi 2 and 3Ā systems, I was less than entirely successful or satisfied. That was with Fedora 25, and I found that on the Pi 3 it still didnā€™t support a lot of the hardware (WiFi, Bluetooth, Sound and more), and on the Pi 2 it was so slow that I wasnā€™t interested in trying to find out what worked and didnā€™t.

Since I have now been on such a hot streak with Kali, Tumbleweed and Leap on the Raspberry Pi, I decided to give Fedora another shot. There is an excellent discussion of Fedora on the Raspberry Pi in theĀ Fedora Wiki, so I started there. I went to theĀ Fedora 29 Betadownloads and got the Workstation armhfp image.

There are two ways to copy the distribution image to an SD card; because it is in xz compressed format, you can use the same commands as given above for Kali and openSUSE. But there is also a utility script available which does the same thing, and lets you specify a few additional parameters in the process. So I installed that utility on one of my Fedora systems, and did it that way.

When I put the SD card in the Pi 3B+, it booted and, uh, sort of struggled its way up. Slowly. Very slowly. It finally made it up to the desktop, and I realized that I had made a big mistake. I had downloaded the standard desktop version, which is Gnome 3. Not a good idea at all; for a variety of reasons, even the Pi 3B+ is not up to running Gnome 3. It took tremendous patience just to get it to shut back down, so I could start over.

Fedora 29 LXDE on Raspberry Pi 3B Plus

Fedora 29 LXDE on Raspberry Pi 3B Plus

I went back to the Fedora 29 Beta distribution tree, and this time went to Spins instead of Workstation, and picked up the LXDE version (there are also LXQt, Xfce, MATE and KDE versions there). The same utility dumped it to the SD card, and this time it booted and came up reasonably well, although still noticeably slower than openSUSE (and much slower than Kali).

The first time you boot any of the Fedora images you are taken to the final screen of their anaconda installer, where you can configure the timezone, root password, user account and network info. Once that is done, the boot process continues to the normal login screen. One thing you donā€™t get to do during the initial boot is configure the keyboard layout, so if you have a non-U.S. keyboard youā€™ll have to configure that after you login. The easiest way I have found to do that with the LXDE desktop is to add theĀ Keyboard Layout ManagerĀ to the LXDE panel, and then use that to add the appropriate layout and delete the default (U.S.) layout.

At this point I was ready to declare Fedora 29 on the Raspberry Pi 3B+ usable ā€” but I still want to know a couple of other things. First, how does it do on the original Model 3B and on the 2B? That turned out to be easy enough to find out, and pretty much what you would expect. The 3B is noticeably slower than the 3B+, but still usable if you are determined and patient. The 2B is, in my opinion, just too slow. It really struggles, with long delays, when you try to do anything at all.

I was also interested in the other desktops, so I went back to the Fedora distribution tree; by this time, the final ISO images for Fedora 29 were up. The LXQt image seems to have disappeared, I donā€™t know if this is intentional or if it might still show up before release. I downloaded the Xfce spin, and tried that on the 3B+. Unfortunately it is much too slow, and it seems to have some pretty serious rendering problems (several icons in the panel were just blank boxes, for example).

My advice for Fedora on the Raspberry Pi is that if you really need/want/must use it, either due to strong personal preference (loyalty) or commercial requirements, it can be done ā€” but make sure youā€™re using a Pi 3B+ to run it and only try to use the LXDE desktop.

Overall Iā€™m pretty pleased with these results, the situation is certainly a lot better than it was the last time I looked at this. Letā€™s just hope things keep moving in the right direction.

 


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

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