My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
PandaboardOS  
Instructions for installing ubuntu 12.04.1 LTS desktop/server and updating with the latest software
Updated Feb 9, 2013 by saund...@gmail.com

SD Card

  • Ensure the SD card does not have any partitions, remove them if there are any.
  • sudo fdisk /dev/sdX
    Command (m for help): d
    Partition number (1-4): 1
    ... (as many times as needed until last partition is removed)
    Command (m for help): d
    Selected partition X
    Command (m for help): w
  • Download the ubuntu desktop/server release from Ubuntu 12.04.1 LTS pre-built binaries. The Pandaboard ES version will have a name that includes armhf+omap4.
  • Extract and copy the img to the SD card, the ubuntu server is show in the following...
  • gunzip ~/Downloads/ubuntu-12.04-preinstalled-server-armhf+omap4.img.gz
    
    sudo dd bs=4M if=~/Downloads/ubuntu-12.04-preinstalled-server-armhf+omap4.img of=/dev/sdX ; sudo sync
  • safely remove the SD card

Ubuntu Server (Only) Setup

  • Note: only connect the power until the following items are complete
  • Connect the pandaboard ethernet to an active internet connection
  • Connect the pandaboard serial to a computer using putty/minicom at 115200 baud
  • Plug in the SD card from the previous section
  • Connect the power only after the previous steps are completed
  • If successful, the serial output will display information immediately and start resizing the filesystem.

Completing Setup

  • When prompted for language/country/timezone/UTC, the defaults are fine.
  • Provide the username/password/network configuration/etc.
    • (Ubuntu Server only) wlan0 will only work for WEP, most routers will be WPA2 since WEP is insecure thus will not work at this point...
  • (Ubuntu Server only) I suggest OpenSSH server for additional server packages, select using spacebar.

Configuring the System

  • (Ubuntu Server only)
  • sudo apt-get update;
    sudo apt-get install python-software-properties
    • Note: You may continue without serial terminal at this point; to do so, record the IP address using ifconfig -a, power off using sudo poweroff, wait until poweroff, disconnect power, remove serial connection, and reconnect power.
  • Add the TI PPA and update the system
  • sudo add-apt-repository ppa:tiomap-dev/release
    sudo apt-get update
    sudo apt-get dist-upgrade
    sudo apt-get install ubuntu-omap4-extras
    • Note: There will be a TI warning that must be acknowledged
  • (Critical) Edit /boot/boot.script, such as sudo vi /boot/boot.script, and replace "vram=40M mem=456M@0x80000000 mem=512M@0xA0000000" or any vram or split mem settings with: "mem=1G@0x80000000". Finally, run sudo flash-kernel to generate boot updates
    • The recommended bootargs is "ro elevator=noop console=ttyO2,115200n8 mem=1G@0x80000000 root=<UUID or LABEL root> fixrtc splash" and I recommend addint "text" if a desktop environment or window manager is installed and running startx manually is desired.
  • sudo reboot

Extra packages

  • General
  • sudo apt-get install vim
  • Development
  • sudo apt-get install git-core cmake-gui build-essential default-jdk doxygen
    sudo apt-get install libusb-1.0.0-dev libgtk2.0-dev libqt4-dev libflann-dev libeigen3-dev
  • Extras (just adds more image/video capabilities)
  • sudo apt-get install libghc-gstreamer-dev libghc-zlib-dev libtiff4-dev libjpeg-dev libjasper-dev libpng12-dev libdc1394-22-dev libavcodec-dev libswscale-dev libv4l-dev libavformat-dev

Change the root partition

  • To rename the partition of an existing ext2/ext3/ext4 partition such as /dev/mmcblk0p2 on the SD card to rootfs, as an example, use e2label as follows
  • sudo e2label /dev/mmcblk0p2 rootfs
  • Edit root=UUID=Device_UUID in /boot/boot.script to root=LABEL=rootfs and do the following
  • sudo flash-kernel
  • Note: you could also mount root from a partition label located on a SSD drive and populate the partition from the contents of the rootfs tarball made during a backup of the SD card.

Removing long boot delay due to no network connection

  • Edit /etc/init/failsafe.conf and comment out all sleeps

Performance Tweaks

  • Edit /etc/fstab to remove swap, use tmpfs, and use discard/noatime. The result will look like the following
  • proc /proc proc nodev,noexec,nosuid 0 0
    LABEL=rootfs / ext4 discard,noatime,errors=remount-ro 0 1
    #/SWAP.swap  none  swap  sw  0 0
    tmpfs /tmp          tmpfs nodev,nosuid                  0 0
    tmpfs /var/log      tmpfs nodev,nosuid                  0 0

The following should only be used for development, if needed, not for the actual robot

Desktop Environment/Window Manager

  • A desktop environment or window manager can be installed, as an example, fluxbox and xubuntu are shown in the following
  • (fluxbox) sudo apt-get install xorg fluxbox
    (xubuntu) sudo apt-get install xorg xubuntu-desktop
  • To launch a window manager or any desktop environment
  • sudo startx
    • Note: There are reports of blackscreens, in such a case, use ctrl+alt+f1/+f2/+f3/+f4 to get back to a console and do a sudo reboot to try again.

Wireless (WPA2)

  • Install wireless packages
  • sudo apt-get install wireless-tools wpasupplicant
  • Add a wireless network configuration
  • sudo su
    wpa_passphrase <ssid> [passphrase] >> /etc/wpa_supplicant.conf
    exit
  • Edit /etc/wpa_supplicant.conf and add id_str="<name>" for the new network, the following is an example
  • network={
            ssid="<ssid>"
            #psk="[passphrase]"
            psk=<hexadecmial psk generated from passphrase>
            id_str="<name>"
    }
    • Note: Additional wireless connections can be made using this, the order they are listed will determine the order they are attempted
  • (First time) Edit /etc/network/interfaces and append the following
  • # The wireless network interface
    auto wlan0
    iface wlan0 inet manual
       wpa-roam /etc/wpa_supplicant.conf
  • Edit /etc/network/interfaces and append the following to refer to wireless connections configured in /etc/wpa_supplicant.conf. The order here is the same as the order of attempts to connect to a wireless network, a successful connection will end the process.
  • iface <name> inet dhcp

The following are basic utility actions with the sd cards

Backup the SD Card

  • Mount the SD Card partitions on a host computer
  • cd <mount point 1>
    tar -cvf <storage folder>/<backup name>.tar .
    
    cd <mount point 2>
    tar -cvf <storage folder>/<backup name>.tar .
  • Example:
  • cd /media/rootfs; sudo tar -cvf ~/ubuntu-rootfs.tar .
    cd /media/SERVICEV001; sudo tar -cvf ~/ubuntu-SERVICEV001.tar .
  • Note the size of partitions can be found by
  • df -h

Partition/Format and Restore an SD Card

  • Partition/Format the SD card using the following script
  • #!/bin/bash
    if [ ! "$1" = "/dev/sda" ] ; then
      unset LANG
      DRIVE=$1
      if [ -b "$DRIVE" ] ; then
        dd if=/dev/zero of=$DRIVE bs=1024 count=1024
        SIZE=`fdisk -l $DRIVE | grep Disk | awk '{print $5}'`
        echo DISK SIZE - $SIZE bytes
        CYLINDERS=`echo $SIZE/255/63/512 | bc`
        echo CYLINDERS - $CYLINDERS
        {
        echo ,9,0x0C,*
        echo ,,,-
        } | sfdisk -D -H 255 -S 63 -C $CYLINDERS $DRIVE
        mkfs.vfat -F 32 -n "SERVICEV001" ${DRIVE}1
        mkfs.ext4 -L "rootfs" ${DRIVE}2
      fi
    fi
  • Mount the new sd card partitions and extract sd card backup tarball
  • cd /media/SERVICEV001; sudo tar -xvf ~/SERVICEV001.tar; sudo sync
    cd /media/rootfs; sudo tar -xvf ~/rootfs.tar; sudo sync

Other

  • I had an issue with mounting a partition, the following command was able to fix invalid group descriptor checksums.
  • sudo fsck.ext3 -v /dev/sdX
Powered by Google Project Hosting