Version 1 (modified by tim, 8 years ago) (diff)

Initial RaspberryPi Installation Instructions

Setting up a Raspberry Pi for Fawkes

This document describes how to get a Raspberry Pi (raspi) board up and running for use with Fawkes. We will go with the Fedora ARM Remix installation, as we use that system on the other robot and desktop machines as well.

Raspberry Pi Installation - Laptop

We chose to go with the easy route through the graphical installer Fedora ARM Installer, but you can choose any installation method, for example the ones described on the Fedora Raspberry Pi wiki page. The catch with the graphical installer is that it must be run with the English locale. If you use a different default locale, for example German, run the installer with (on your laptop/desktop):

LANG=C fedora-arm-installer

Update the list of images, choose the SD card device (unmount the drive if it was automatically mounted on insertion), and start the writing process. Then you are done.

Raspberry Pi Installation - On the raspi

The following installation instructions are meant to be executed on the raspi. After writing the image to the SD card plug the card into the raspi and connect it to Ethernet and power. The raspi will automatically get an IP address via DHCP if such service is provided. All the following instructions assume that you have found a way to know the IP (query the router/DHCP server or guess) and logged in as root using ssh root@the-ip-you-found. The initial password is raspberrypi.

Resizing the Root Partition

The default image comes for a 2GB SD card, while you typically will want to use a larger disk. Hence the root partition must be resized. For this we will need to erase the partition and create a new one that starts exactly at the same position, but spans the free space. Afterwards need to reboot and to (on-line) resize the file system. Now step by step:

  1. Login as root on the raspi using SSH.
  2. Run fdisk and resize the partition by deleting and recreating.
    [root@raspi ~]# LANG=C fdisk /dev/mmcblk0
    Welcome to fdisk (util-linux 2.21.2).
    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.
    Command (m for help): p
    Disk /dev/mmcblk0: 7948 MB, 7948206080 bytes
    4 heads, 16 sectors/track, 242560 cylinders, total 15523840 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xfdddd43b
            Device Boot      Start         End      Blocks   Id  System
    /dev/mmcblk0p1   *        2048      106495       52224    c  W95 FAT32 (LBA)
    /dev/mmcblk0p2          106496    15523839     7708672   83  Linux
    Command (m for help): d
    Partition number (1-4): 2
    Partition 2 is deleted
    Command (m for help): n
    Partition type:
       p   primary (1 primary, 0 extended, 3 free)
       e   extended
    Select (default p): p
    Partition number (1-4, default 2): 2
    First sector (106496-15523839, default 106496): 106496
    Last sector, +sectors or +size{K,M,G} (106496-15523839, default 15523839): 
    Using default value 15523839
    Partition 2 of type Linux and of size 7.4 GiB is set
    Command (m for help): w

Now you need to reboot the raspi using reboot.

  1. Resize the file system. This can be done online. Just login as root again and execute:
    resize2fs /dev/mmcblk0p2

After a few seconds to minutes you will be able to make use of the full space.

Set Timezone

The time zone is set to EST by default. To switch it copy the appropriate zoneinfo file (see the available files with rpm -ql tzdata). For example for Europe/Berlin? do:

cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime