• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
KaliTut

KaliTut

Kali Linux tutorial and Linux system tips

  • Home
  • Raspberry Pi
  • Privacy Policy
  • About us

Create a minimal Raspbian image file

Last Updated on May 23, 2020 by Kalitut Leave a Comment

Rasbian is based on Debian, which attaches great importance to stable and secure operation. Especially because Raspbian is extremely stable, this Linux distribution is particularly suitable if you want to run Raspberry Pi as a server. Unfortunately, Raspbian already brings so many packages that you do not need.

Create minimal Raspbian image file

If you want to run Raspberry Pi as a server, you can not help worrying about uninstalling a large number of packages at first. This applies in particular to the software packages that are supplied with the graphical window interface and are useless in server operation.

Task

  • Uninstall all packages related to the graphical window interface.

Solution: Create minimal Raspbian
The following solution provides a way to disconnect from unnecessary packages of the standard Raspbian distribution. For example, if you want to operate Raspberry Pi as a server.
For a minimal Raspbian, there are some more online tutorials on how to purge a Raspbian for unused packages. Many of them are very extensive and thorough. But also associated with more time. This solution is a suggestion that does not do anything but removes most of it so that a Raspbian also fits on a 2GB SD memory card.

Note: It is recommended to clean up unnecessary packages before performing the server configurations. If you want to do it, if you have already set up everything, then you can shoot a painstaking and expensive configuration.
First we check the current memory usage of the SD memory card.

 df -h

Then we will arrange for an update of the package sources.

 sudo apt-get update

Then we start with the uninstallation of packages.

sudo apt-get remove lxde 
sudo apt-get remove gnome 
sudo apt-get remove xfce 
sudo apt-get remove python3
sudo apt-get remove midori omxplayer scratch tungsten engine sonic-pi dillo netsurf-common netsurf-gtk

Once these packages have been removed, there are still some packages left, which are now superfluous. We also remove these “corpses”.

sudo apt-get autoremove
sudo apt-get clean

Thereafter, still drive around configuration files whose packages are already uninstalled. You can delete them as follows:

 sudo dpkg -P `dpkg -l | grep "^ rc" | awk -F "" '{print $ 2}' `

Finally, we recommend a restart of Raspberry Pi.

 sudo reboot

After the restart, we check the memory usage of the SD memory card.

 df -h

After that you should come in any case under 2 GB.
Switch off swapping
Removing the swap service can save more space.

  • Set up and deactivate swapping on Raspberry Pi

Alternatively: Download the finished minimal image
If the memory usage is still too large, you have to try to uninstall other packages or look for alternatives that already offer ready-made images for download.

  • Minimal image of Raspbian for 2GB SD card

Filed Under: Raspberry Pi

Leave a Reply Cancel reply

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

Follow us

  • Facebook
  • Twitter
  • YouTube

Categories

  • Android pentesting tools
  • Arduino
  • Books
  • Darknet
  • database
  • General
  • Github Tools
  • Hacking
  • Kali Linux
  • Linux
  • Linux Commands
  • Network Administrator
  • Penetration Testing
  • Penetration Testing Tools
  • PowerShell
  • Raspberry Pi
  • resources
  • Review
  • Termux
  • Tutorials
  • Ubuntu
  • Uncategorized
  • Video Tutorials
  • vmware
  • WiFi Adapter
  • WiFi Pentesting
  • Wireless Router
  • Wireshark

Recent Posts

  • ZimaBoard Hackable Single Board Server Review
  • Hijacked Wi-Fi? Thorough explanation of hacking techniques
  • Windows PowerShell tutorial for beginners
  • Learn to Hack Steps from Beginner to Hacker
  • PowerShell Tutorial – GUIDE introduction with basics
  • Home
  • About us
  • Privacy Policy
  • Affiliate disclaimer

Copyright © 2023