Custom Beaglebone Black Image
The following document describes our own method of creating a custom Kali Linux Beaglebone Black ARM image and is targeted at developers. If you would like to install a pre-made Kali image, check out our Install Kali on Beaglebone Black article.
You’ll need to have root privileges to do this procedure, or the ability to escalate your privileges with the command “sudo su”.
01. Create a Kali rootfs
Build a Kali rootfs as described in our Kali documentation, using an armhf architecture. By the end of this process, you should have a populated rootfs directory in ~/arm-stuff/rootfs/kali-armhf.
02. Create the Image File
Next, we create the physical image file, which will hold our Beaglebone Black rootfs and boot images:
:~$ sudo apt install -y kpartx xz-utils sharutils
:~$ mkdir -p ~/arm-stuff/images/
:~$ cd ~/arm-stuff/images/
:~$ dd if=/dev/zero of=kali-custom-bbb.img conv=fsync bs=4M count=700003. Partition and Mount the Image File
:~$ parted --script kali-custom-bbb.img mklabel msdos
:~$ fdisk kali-custom-bbb.img <<EOF
n
p
1
+64M
t
e
p
w
EOF
:~$ parted --script kali-custom-bbb.img set 1 boot on
:~$ fdisk kali-custom-bbb.img <<EOF
n
p
2
w
EOF04. Copy and Modify the Kali rootfs
05. Compile the Beaglebone Black Kernel and Modules
If you’re not using ARM hardware as the development environment, you will need to set up an ARM cross-compilation environment to build an ARM kernel and modules. Once that’s done, proceed with the following instructions:
Use the dd command to image this file to your SD card. In our example, we assume the storage device is located at /dev/sdb. Change this as needed:
Once the dd operation is complete, unmount and eject the SD card and boot your Beaglebone Black into Kali Linux. When booting you will need to press and hold the “BOOT” button, it’s the one closest to the microSD card.
Last updated
Was this helpful?