Installing minimal / netinst Raspbian on Raspberry Pi

Consult thes links: How to build your own OS with Raspbian Net Install and github:raspbian-ua-netinst.

Features

  • completely unattended, you only need working Internet connection through the Ethernet port
  • DHCP and static ip configuration (DHCP is the default)
  • always installs the latest version of Raspbian
  • configurable default settings
  • extra configuration over HTTP possible – gives unlimited flexibility
  • installation takes about 15 minutes with fast Internet from power on to sshd running
  • fits in 512MB SD card
  • default install includes fake-hwclock to save time on shutdown
  • default install includes NTP to keep time
  • /tmp is mounted as tmpfs to improve speed
  • no clutter included, you only get the bare essential packages
  • option to install root to USB drive

Visit https://github.com/debian-pi/raspbian-ua-netinst/releases and download latest archive.

(If you use Windows or Mac, format your SD card with FAT32 (consult this link: link) and extract the .zip content to it.)

To flash your SD card on Linux:

xzcat /path/to/raspbian-ua-netinst-<latest-version-number>.img.xz > /dev/mmcblk0

* Replace /dev/mmcblk0 with the path to your SD card if it’s different.

Note: You need to configure your static IP if you don’t have DHCP on the router configured. Consult this link.

Installing

In normal circumstances, you can just power on your Pi and cross your fingers.

If you don’t have a display attached you can monitor the Ethernet card leds to guess activity. When it finally reboots after installing everything you will see them going out and on a few times when Raspbian configures it on boot.

If you do have a display, you can follow the progress and catch any possible errors in the default configuration or your own modifications.

Note: During the installation you’ll see various warning messages, like “Warning: cannot read table of mounted file systems” and “dpkg: warning: ignoring pre-dependency problem!”. Those are expected and harmless.

First boot

The system is almost completely unconfigured on first boot. Here are some tasks you most definitely want to do on first boot.

The default root password is raspbian. (The user is root and the password raspbian.)

Set new root password: (can also be set during installation using rootpw in installer-config.txt, consult this link)

passwd

Configure your default locale:

dpkg-reconfigure locales

Configure your timezone:

dpkg-reconfigure tzdata

The latest kernel and firmware packages are now automatically installed during the unattended installation process. When you need a kernel module that isn’t loaded by default, you will still have to configure that manually. When a new kernel becomes available in the archives and is installed, the system will update config.txt, so it boots up the new kernel at the next reboot.

Optional: For improved memory management performance install:

apt-get install raspi-copies-and-fills

Optional: Create a swap file with

dd if=/dev/zero of=/swap bs=1M count=512 && mkswap /swap

(example is 512MB) and enable it on boot by appending

/swap none swap sw 0 0

to /etc/fstab.

echo "/swap none swap sw 0 0" >> /etc/fstab

Tuning

Add user:

adduser <username>

Example:

 adduser johndoe

To view all groups, run:

cut -d: -f1 /etc/group

If you want to add your new user to a group:

usermod -aG <groupname> <username>

Example:

usermod -aG audio,sudo,ssh,video johndoe

To view the groups you belong to:

id <username>

Install packages

Everyone is free to install the packages you need or think you will need. Recommended are:

apt-get update && apt-get install mc unzip nano sudo git build-essential alsa-base

To enable the sound module, run after the installation of alsa-base, the next:

alsactl init
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s