Getting started with Linux on CM-iAM

From Compulab Mediawiki
Revision as of 13:53, 29 October 2009 by Denis (talk) (Boot from local NAND disk)
Jump to: navigation, search

Overview

Linux for the CM-iAM/SB-iAM is based on Ubuntu 9.04. The Linux package for CM-iAM includes a ready-to-run NAND flash image, Linux kernel configuration and source code, dedicated repository with graphic drivers, media player and kernel related packages.

Package contents

The CompuLab Linux package for CM-iAM contains the following components:

run-time disk images

  • sb-iam.ubuntu-9.04.NAND.img.bz2 - archived image of local NAND disk. Contains fully configured Ubuntu 9.04

kernel

  • 2.6.28 kernel sources and configuration file customized by Compulab.
  • The kernel is also present as a package in debian repository.

debian repository

  • To be consistent with Ubuntu/Debian packaging standards, we created a simple local repository that resides in /opt/compulab/ in the run-time image.
  • This repository contains binaries and sources for all the custom packages provided by CompuLab, such as kernel, graphic drivers, libraries, etc. Please read more about working with a repository in Debian Repository HOWTO

scripts

Miscellaneous useful scripts

  • image_mount.sh - utility to mount run-time image partitions on a host workstation
  • image_creator.sh - utility to create installation and recovery image for bootable USB flash drive. Run this script from scripts directory in the package, sb-iam.ubuntu-9.04.USB.img will be created in the images directory.

Boot from external device

It`s possible to boot not only from the local NAND disk, but also from an external storage device such as a USB flash disk, SATA disk or MMC/SD/SDIO card. At it`s initial state, the local NAND disk is empty and booting from an external device is the only option. Below booting from disk-on-key is described.

  • Obtain any Linux workstation and download Linux kernel package for CM-iAM to it.
  • Unzip iam-linux-release.zip to some place on your Linux workstation.
  • Open Applications->Accessories->Terminal
  • Get root permitions using the su command.
  • Run image_creator.sh script from scripts directory in the package, sb-iam.ubuntu-9.04.USB.img will be created in the images directory.
# cd /path/to/downloaded/iam-linux-release/scripts/
# ls
image_creator.sh image_mount.sh
# ./image_creator.sh
(some output here)
../images/sb-iam.ubuntu-9.04.USB.img is ready.
# ls ../images/
sb-iam.ubuntu-9.04.USB.img sb-iam.ubuntu-9.04.NAND.img.bz2
Admolition note.png Currently created sb-iam.ubuntu-9.04.USB.img is nearly identical to sb-iam.ubuntu-9.04.NAND.img. The images differ only in device numbering in /boot/grub/menu.lst and /etc/fstab. Also sb-iam.ubuntu-9.04.USB.img contains archived sb-iam.ubuntu-9.04.NAND.img in /home/user/Desktop/
  • Prepare an external storage device, 4GB or more capacity will be enough.
  • Connect the USB flash drive to the Linux workstation. We assume here it's recognized as /dev/sdb.
  • Extract the USB image directly to the connected USB flash drive using the following command:
# dd if=../images/sb-iam.ubuntu-9.04.USB.img of=/dev/sdb bs=2M
  • Insert formatted USB flash drive into an empty USB slot on the SB-iAM baseboard, ensuring that no other external storage device is connected.
  • Power on the SB-iAM. In BIOS, choose your USB flash drive as the first boot device and reboot.
  • Welcome to Ubuntu 9.04 for SB-iAM, username: user, password: 111111
Admolition note.png Bootable USB image sb-iam.ubuntu-9.04.USB.img contains a filesystem with 1.2GB empty space. If your storage device is bigger than 4GB - you can easily reformat it with the fdisk and resize2fs utilities to get more empty space.

Boot from local NAND disk

  • Boot from external device as described above.
  • sb-iam.ubuntu-9.04.NAND.img.bz2 image file will appear on the desktop.
  • Open Applications->Accessories->Terminal
  • Get root permitions using the su command, root password is "111111".
  • Extract the image file directly to the local NAND disk using the following command:
root@sb-iam:/home/user# bzip2 -dc /home/user/Desktop/sb-iam.ubuntu-9.04.NAND.img.bz2 | dd of=/dev/sda bs=2M
  • Reboot, choose in BIOS, local NAND disk as first boot device, save changes.
  • Welcome to Ubuntu 9.04 for SB-iAM, username: user, password: 111111

See also