The following document describes our own method of creating a custom Kali Linux Samsung Chromebook ARM image and is targeted at developers. If you would like to install a pre-made Kali image, check out our Install Kali on Samsung Chromebook article.
In this guide, we create an image with two boot partitions - one containing a kernel hard-coded to boot from the SD card and the other containing a kernel hard-coded to boot from USB. Depending on your USB storage media type, make sure to mark the relevant boot partition with higher priority after you dd the image to your USB device as instructed in the last stages of this guide.
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
Start by building 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 that will hold our Chromebook rootfs and boot images:
:~$ parted kali-custom-chrome.img --script -- mklabel msdos
:~$ parted kali-custom-chrome.img --script -- mktable gpt
:~$ gdisk kali-custom-chrome.img <<EOF
x
l
8192
m
n
1
+16M
7f00
n
2
+16M
7f00
n
3
w
y
EOF
This is the point where you need to mark either boot partition 1 or 2 to have higher priority. The number with the higher priority will boot first. The example below will give priority 10 to the first partition (-i) and will thus boot successfully from a SD card.
Once this operation is complete, boot up your Samsung Chromebook with the SD/USB device plugged in. At the developer mode boot screen, hit CTRL+u to boot from from your USB storage device. Log in to Kali (root / toor) and startx.
If you’re not using ARM hardware as the development environment, you will need to set up an to build an ARM kernel and modules. Once that’s done, proceed with the following instructions.