When you first install Kali Linux onto your SD card for use with a Raspberry Pi it doesn’t use up the entire capacity of the SD card so you will need to resize Kali Linux partition for Raspberry Pi.
In this article we use a Sandisk 16 GB microSD card and after you install Kali Linux on Raspberry Pi 3 with 3.5 inch LCD screen or without the screen you will notice that the installation only takes up 6.78 GB of space on the SD card rather than the total 16 GB.
WHAT IF YOU DON’T RESIZE KALI LINUX PARTITION FOR RASPBERRY PI?
If you don’t resize Kali Linux partition for Raspberry Pi then you could run into problems in the future when trying to update or upgrade. The installation itself uses about 3.10 GB of space and only leaves around 3.68 GB free. If you wanted to update or upgrade it may require more space than what is free. This would cause issues that would prevent you from updating or upgrading Kali Linux.
If you plan to install full version of Kali Linux on Raspberry Pi 3 then you will need to resize your partition first. To resize your partition we will be using a program called gparted which we will show you how to install and use.
RESIZE KALI LINUX PARTITION FOR RASPBERRY PI – GETTING STARTED
To get started you need to make sure you have Kali Linux booted up on your Raspberry Pi and have the desktop environment loaded. If you are interested in accessing your Raspberry Pi remotely then see how to install VNC Viewer on Raspberry Pi with Kali Linux.
If you haven’t already figured out the default username and password for Kali Linux, the username is “root” and the password is “toor”. If you would like to disable the login screen so you don’t have to enter a username and password then see Raspberry Pi 3 Kali Linux auto login.
Now lets get started. First open up a terminal session and update the package lists from the repositories by typing:
Now we are going to install gparted so that we can resize our partition. With your terminal session still up type in:
apt-get install gparted
When it installs you need to open the program by typing the following into your terminal:
The program should then open up and should be visible on your desktop. You should see fat16, ext4, and unallocated as the three file systems currently in use on your SD card. You will need to resize the ext4 file system so go ahead and click on it.
When the ext4 file system is selected you need to click the “Resize/Move” button near the top of the window.
When you click on the “Resize/Move” button another window will pop up. Here you will need to select how much space you would like to utilize on the SD card. Since we are going to use all the space all you need to do is move the slider at the top all the way to the right.
After you move the slider all the way to the right your “free space following (MiB):” should be 0. Then you click the “Resize” button and the “Apply” button. After you click the “Apply” button a prompt will pop up asking if you are sure you want to apply the pending operations and you click “Apply”. Now your SD card is utilizing all the space that is available on it.
COMPLETED – RESIZE KALI LINUX PARTITION FOR RASPBERRY PI
You now should have a complete Kali Linux install on your SD card for your Raspberry Pi while utilizing all the available space on the SD card. Now you can continue your endeavors and make use of updating and upgrading without being interrupted with errors due to not enough space being on the SD card.