Install Raspbian on 2GB Card

There are several options for running a Raspberry Pi operating system on a 2GB SD card, but in the this blog post I’d like to talk about how to install the ‘official’ distribution, Raspbian, on a smaller SD card. This method requires the minimal Raspbian Unattended Netinstaller which can be found at the following link:

The readme file that is shown on the base GitHub project linked above covers the basics of installing the operating system which I will briefly touch on here and the cover a few additional configuration options I choose to do. Some of the key things I like about the raspbian-ua-netinst project is that it fits on a 512 MB card, it downloads the required components through an internet connection via the Ethernet port, and it can do all the hard work completely unattended.

At a high level, here is what is needed to perform the install. (Reference the github link above for more detailed instructions):

  • Grab a 512 MB or larger SD card
  • Download the 10 MB installer package
  • Format the SD card as FAT32
  • Unpack the installer archive
  • Copy the unpacked files to the SD Card
  • Plug the SD card and a network cable into the Pi
  • Power up the Pi and let it install (this is the unattended part mentioned above)

After letting the system run through the installation, I attempted to start the python interpreter and received the following response:

-bash: python: command not found

I then attempted to to issue a command as root using sudo and received the same response:

-bash: sudo: command not found

After going through a few more commands, I realized that a few of my favorite Linux commands/applications were missing including Python, Sudo, and Nano. In order to get these applications installed after the base Raspbian-UA-Netinst installation, run the following command at the command shell to install the above packages:

apt-get install python sudo nano

Additionally, in order to use sudo, you will want to add your own user. Run the command below substituting the [username] with the preferred username for the new user account you would like to create:

adduser [username]

Follow the prompts to complete the addition of the user. This should prompt you to set the password and other descriptive information for the user. When this step is complete, we will add the user to the sudo group to allow the user to temporarily escalate their permissions when needed via sudo.

adduser [username] sudo

Additionally, if this user will be using serial ports (files in /dev/) you will want to add the user to the dialout group:

sudo adduser [username] dialout






One response to “Install Raspbian on 2GB Card”

  1. Christoph Avatar

    Thanks you for this article. I have so many 2GB microSD cards but couldn’t get Raspbian on them.
    Also I like how simple it is to set up a new Pi completely preconfigured just by a few scripts.

Leave a Reply

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