SBC:InstallationCF
From TIER
This guide describes how to install the TIER Linux distribution to a CF card which can be then used in a wireless router. You need a Linux machine with a USB CF-card reader and a CF card (256MB, 512MB, 1GB). Recommended distribution is Ubuntu.
Contents |
1 Preparation
1.1 Get installer packages
Download the the following packages from the TIER website at: http://shirin.cs.berkeley.edu:8000/releases/
- Installer: tier-install.tar.gz
- Root file system - choose on of the following
- For linux 2.6.19.2 (ALIX or WRAP boards): tier-linux-geode-2.6.19.2.tar.gz
- For linux 2.4.26 (for WRAP boards only): tier-linux-geode-2.4.26.tar.gz
- For old versions of the packages, download from http://shirin.cs.berkeley.edu:8000/releases/built/
Untar tier-install.tar.gz in to tier-install. Do not untar the root file system (tier-linux-geode-2.4.26.tar.gz or tier-linux-geode-2.6.19.2.tar.gz)
1.2 Setup host system
Make sure that your computer is not configured to automount CF cards when inserted as it creates problems for the installer.
- Ubuntu option 1: go to System->Removable Drives and Media or run'gnome-volume-manager' as root. Then disable automounting of removable drives.
- Ubuntu option 2 (for hardy and other recent releases): run 'polkit-gnome-authorization', go to Storage->Mounting of removable drives->Edit and then disable in 'Active consoles'
- SUSE/others: temporarily stop automount by stopping the haldaemon:
# /etc/init.d/haldaemon stop
1.3 Setup the hardware
Plug a USB card reader into your computer or insert PCMCIA-CF adaptor for your laptop. Then insert the CF card into the reader.
Find out what the CF card device name is configured (Very important) Run 'dmesg' on the command line. If the CF card is correctly detected, 'dmesg' should show you the device name. For USB readers, the CF card is usually configured automaticall as /dev/sda or sdb,sdc,sdd etc. For PCMCIA readers, the device could be /dev/hde. Note that for computers with SATA drives (e.g. Thinkpad T60), the primary hard disk is /dev/sda and so the CF cards would be given names starting from sdb,sdc etc.
Sample 'dmesg' output:
# dmesg usb-storage: waiting for device to settle before scanning Vendor: Generic Model: STORAGE DEVICE Rev: 9321 Type: Direct-Access ANSI SCSI revision: 00 SCSI device sda: 500400 512-byte hdwr sectors (256 MB) sda: assuming drive cache: write through /dev/scsi/host4/bus0/target0/lun0: p1 p2
2 Installing
2.1 Configure network settings
Specify the network configuration settings that you want to be installed on the CF card by changing the file: tier-install/config/network/interfaces.template
The default ethernet device is usually configured as:
auto eth0
iface eth0 inet static
address 10.0.1.10
netmask 255.255.255.0
broadcast 10.0.1.255
2.2 Run installer
Go into tier-install directory and run install.tierlinux.pl as root
# ./install.tierlinux.pl -a <archive location of the root file system> -n <hostname>
Here are important options:
-a <archive> (default:../tier-linux-geode-2.4.26.tar.gz)
../tier-linux-geode-2.4.26.tar.gz OR
../tier-linux-geode-2.6.19.2.tar.gz
-n <hostname> hostname to use (default:t-def)
-I interactive install (default)
-noI automatic install without asking questions
NOTE: After running the installer in interactive mode once, it saves the selected options in a local file 'local.cfg' and then you can use the non-interactive install (-noI) for faster writing.
2.2.1 Select options
First questions are related to the mounting location that will be used by the installer, the SBC board type and the device name.
Warning: You can wipe out your hard disk if these answers are wrong.
Directory for creating mounting locations?
default=/mnt/cf:
Board selection:?
0: net4501
1: net4521
2: net48xx
3: routerboard
4: wrap
5: alix
default: 4
Enter selection :
Device for the installation?
default=/dev/sda:
Choose the correct partition scheme according to disk size such that two partitions are created - one for root file system and the second for storing logs and other read/write data.
- For 256MB card, choose 256M.2parts
- For 512MB card, choose 512M.2parts
- For 1GB card, choose 1G.2parts
Verify the whole configuration and thes press 'y'.
Installer directory: /home/rabin/work/wireless/testbed/sbc_geode/tier-install
Install Device: /dev/sda
Will be mounted on: /mnt/cf
Board name: routerboard
Kernel Version: 2.4.26-tier-4801
Kernel Type: 2.4.26
Hostname: tier-test
Mount point: / is on /dev/sda1 from ../tier-linux-geode-2.4.26.tar.gz root
Mount point: /extra is on /dev/sda2 from ../tier-linux-geode-2.4.26.tar.gz extra
Disk partitioning scheme: 256M.2parts
Table:
Disk /dev/sda: 980 cylinders, 16 heads, 32 sectors/track
Units = cylinders of 262144 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 0+ 488 489- 125168 83 Linux
/dev/sda2 489 979 491 125696 83 Linux
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
Verify the above configuration carefully -- Continue (y/n)?:
2.2.2 Copying files and running lilo
The installer then asks questions about the following steps:
Partition disk according to the partition scheme
After partitioning ... Disk /dev/sda: 695 cylinders, 15 heads, 48 sectors/track Units = cylinders of 368640 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End #cyls #blocks Id System /dev/sda1 0+ 488 489- 176039+ 83 Linux /dev/sda2 489 694 206 74160 83 Linux /dev/sda3 0 - 0 0 0 Empty /dev/sda4 0 - 0 0 0 Empty
Format partitions
Formatting the whole disk: /dev/sda with 2 partitions... Continue (y/n)?:y
Copy files to root partition
Installing tier-linux-geode-2.4.26/root from archive ../tier-linux-geode-2.4.26.tar.gz on device /dev/sda1 (mounted: /mnt/cf/disk1) ...
Continue (y/n)?:y
Extracting base distribution to /dev/sda1 ...
Continue (y/n)?:y
deleting files the /dev/sda1 partition ...
extracting from archive /dev/sda1 partition ...
Configure root partition (you will be asked to enter the root password)
Configuring the root partition aton device /dev/sda1 (mounted: /mnt/cf/disk1) ... Continue (y/n)?:y Setting up SSH keys... Copy the default public keys to the new system Set the root password ... Now set your root password for the new system: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Copying network files ...
Copy files to extra (the read write) partition
Install LILO on the Main Boot Record (MBR) of the CF card
Install lilo on MBR of disk:/dev/sda? (with boot directory on /dev/sda1) Continue (y/n)?:y . . . Running lilo on partition:/dev/sda1 mounted at:/mnt/cf/disk1...
3 Booting
Once the CF card is written without errors, you should test it trying to boot a board with it. Refer to the TIER Wireless Install guide for instructions on how to boot the board, how to connect to it via serial RS232 port or ethernet and how to configure it using the web GUI.
