Skip to content

Instantly share code, notes, and snippets.

@k0emt
Last active February 20, 2024 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k0emt/48c4c32156d4e821420e4f7858025777 to your computer and use it in GitHub Desktop.
Save k0emt/48c4c32156d4e821420e4f7858025777 to your computer and use it in GitHub Desktop.
Notes around setting up a Raspberry Pi 5 with Kali Linux

Kali Linux build

Documenting Kali Linux on Raspberry Pi 5 build
Pi 5 with 8G of RAM and a 64G Samsung microSD
Case is aluminum heat sink style with a smart PWM fan
Initial set up with USB-C power, portable display, TrackPoint keyboard

System

  • change hostname
hostname
hostnamectl
sudo hostnamectl set-hostname kaliverde
vi /etc/hosts # change hostname for 127.0.1.1
  • change password for default account passwd
  • consider creating a user separate from default kali
  • solaar for logitech mouse
  • Which release am I running? cat /etc/os-release

Trying to get OTG going over USB C

The goal is to be able to power and access (with VNC) the rpi over USB C.

There is an update that is supposed to resolve OTG over USB C The ramification of not having this patched is that even if the rpi is directly connected to your device via USB C, you are only powering it. Your ssh or VNC connections are only working because you are on the same wifi network. AFAIK, there is still no video over USB C support.

You may not need this step, the patch has been promoted up now. Update firmware sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/raspberrypi/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update
sudo rpi-update

Aborted because of warning that boot loader partition size is too small 256M, prefer 512M

Also discovered that the USB C cable I had been using wasn't rated for video.

This is still a work in progress for me.

Audio

Having problems with pipewire audio -- removed it.
Installed pulse audio -- still not working.
Modified /boot/config.txt file to enable audio
Reverted things back, remove pulseaudio, reinstalled pipewire

Configuration

  • set up .vimrc from gist
  • set up git, and repo access github ssh
  • created a script start-vnc.sh with tightvncserver :1 -geometry 1440x900

Installed tools

  • alacritty

  • htop sudo apt install htop

  • neofetch sudo apt install neofetch

  • aws CLI sudo apt install awscli

  • xfce4 terminal sudo apt install xfce4-terminal

  • nvm and node https://github.com/nvm-sh/nvm

  • go lang sudo apt install golang-go

  • elixir sudo apt install elixir

  • VS Code cd ~/Downloads ; sudo apt install ./code_amd64.deb

  • podman sudo apt update && sudo apt install -y podman

    • redis podman pull docker.io/redis
      • podman run -d --name redis_server -p 6379:6379 redis
      • podman exec -it --rm redis_server redis-cli
    • mongodb podman pull docker.io/mongo
      • podman run --name some-mongo -d mongo
      • podman run -it --rm some-mongo mongosh test

stuff to install

  • aws cli command completion
  • determine process around AWS credentials management/use
  • neovim and ecosystem
  • plugins from oh-my-zsh: encode64, git, podman, isodate, aws ?

nice stuff about the default installation

  • tons of security tools
  • uses zsh by default
  • tmux and ruby already installed
  • tightvncserver already installed. ssh into the rpi. Start the VNC server. Successfully connected with TigerVNC client. How to set up encrypted connection?

Observations

  • RAM usage doesn't seem to be a problem
  • powerline.io plays ok, but a little slow on low res graphics
  • system seems to hang or pause occassionally for a second or so
  • alacritty is significantly better than the default terminal
    But how to open another window and use same process?
  • Had to install xfce4-terminal for when VNCed into rpi alacritty and default terminal don't work over VNC
  • Open more terminals with ctrl-alt-t
  • intelligent PWM fan rarely runs

Usage

  • can connect and power with USB-C
    • ssh user@hostname worked with Chromebooks, Linux, WSL, and Windows
    • when using a mac, had to get ip nslookup hostname then ssh user@ip
    • ssh terminal exhibited some screen glitching with original Lenovo Duet (P60T)
    • ssh terminal performs well on newer model Lenovo Duet 3
  • Tested with GUI environment. Power it up, connect to a portable monitor, wireless keyboard and mouse
  • I'm tempted to try it with something like a nexdock. However, (at least for now), it can't be done with a single cable. Also, the docks are so expensive you could buy a Chromebook or used laptop.
  • Spun up Redis, and mongo with podman. Didn't note any system degradation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment