Open main menu

CDOT Wiki β

Changes

FSOSS 2010 Plug Computing Workshop

4,813 bytes added, 22:31, 7 November 2010
Getting the Root Filesystem Image
* 802.11bg wireless
* bluetooth
* u-SNAP connector for home power automation (smart electric meter access)
The total power consumption of the GuruPlug is typically under 5W - about that of a small nightlight.
Although ARM devices can use normal mechanical disk drives, most use [http://en.wikipedia.org/wiki/Flash_memory flash memory]. Flash memory is non-volatile, consumes little power, and is quite fast for reading, but most types of flash have a limitation of as little as 10,000 write cycles and may be slow for writing. Expandable storage is often provided in the form of [http://www.sdcard.org/home/ SD/SDHC] or microSD/microSDHC cards.
In order to accommodate the performance characteristics of flash memory, the Linux kernel provides the [http://www.linux-mtd.infradead.org/ MTD] (Memory Technology Device) subsystem, as well as the [http://www.linux-mtd.infradead.org/doc/ubi.html UBI] (Unsorted Block Image) and [http://www.linux-mtd.infradead.org/doc/jffs2.html JFSJFSF] (Journalled Flash File System2) subsystems. === Installation === Most ARM operating systems (typically Linux distributions) are not shipped with an installer program; instead, a pre-built root filesystem (rootfs) and a kernal are loaded on an SD card or programmed into flash memory (an initial ram disk -- initrd -- may also be supplied). The installed system can then be further adapted using the distribution's package management tools, such as apt (Debian) or yum (Fedora).
= Setting up the GuruPlug =
== Getting the Root Filesystem Image ==
# Check that the file <code>rootfs-f12.tar.bz2</code> is in your Downloads directory (go to the menu option Places>Downloads). If not, download Download and save this file: http://australia.senecacproximity.on.ca/fsoss/rootfs-f12.tar.bz2
== Copying the rootfs to the microSD Card ==
# Insert the card into the card reader on your PC. A window should appear; it is OK to leave this window open.
# Open a terminal window (menu option Applications>System Tools>Terminal).
# Request administrator/superuser privilege by typing: <code>su</code>(password is "fsoss10")
# Change to the directory containing the microSD card: <code>cd /media/*</code>
# Erase everything on the card ('''type this command very carefully!'''): <code>rm -rf /media/*/*</code>
# Change to the directory containing the startup scripts: <code>cd /media/*/etc/rc.d</code>
# Add this code to the rc.local script to flash the lights:
for LAMP in /sys/class/leds/*/trigger
echo heartbeat >$LAMP
done
 
== Preparing the rootfs Image: Setting a Message of the Day ==
 
Edit the Message of the Day file so that you can be sure that you've connected to the right plug later in this workshop.
# Edit the file <code>/media/*/etc/motd</code>
# Add a greeting of your own choice. For example: <code>Welcome to Chris & Diane's GuruPlug!</code>
# Save the file.
== Try it! ==
# Umount Unmount the microSD card.Find the icon for the card on the desktop, and right-click to select "Unmount"; or enter the command: <code>umount /media/*</code>
# Remove the card from your PC.
# Insert the card into your GuruPlug.
To connect to your plug over the network, you'll need to connect to the computer managing the GuruPlug cluster, which is named "HongKong".
# Connect to HongKong: <code>ssh -p 2222 XC ''nameOfYourPlug''@hongkong.proximity.on.ca</code> -- for example, if your GuruPlug is <code>cdot-guru-2-3</code>, then connect with <code>ssh -XC cdot-guru-2-3@hongkong</code> (password is "fsoss10")# Connect to your plugfron HongKong: <code>ssh root@''nameOfYourPlug''</code>(password is "fedoraarm")# Check the message of the day (printed after you log in) to be sure you have connected to the right GuruPlug. = Making Your Plug Useful = Now it's time to use your plug to do something useful. == Using yum to Add Packages == Fedora uses a package manager named ''yum''. This tool can find, add, remove, and update software packages, automatically downloading them and resolving dependencies as required. Basic yum commands:{|class="wikimedia sortable" border="1" cellspacing="2" cellpadding="0" width="100%"!Operation||Command||Example||Notes|-|List packages||yum list||yum list "*wiki*"||Lists according to package name only.|-|Search for packages||yum search||yum search "calendar"||Searches package name, summary, and detailed description.|-|Get information about packages||yum info||yum info "httpd"||Gives detailed information about a package, including license, package size, summary, and description.|-|Install a package||yum install||yum install gallery2||Determines the package dependencies, displays package and dependency list and asks for confirmation (unless -y argument given), downloads packages, and installs them.|-|Updates a package (or updates all packages)||yum update||yum update bash||Determines the availability of updates based on package name, version, and release numbers; handles new dependencies as required. Like ''yum install'', the user is shown the list of packages to be installed and is asked for confirmation (unless -y argument is given).|-|Removes a package||yum remove||yum remove httpd||Also removes any package which depends on the packages being removed. Prompts for confirmation by default.|-|Cleans up cached packages and metadata||yum clean||yum clean all||Options include: all, packages, metadata|} == Accessing Your GuruPlug == Due to the network configuration used in this lab, the GuruPlugs are not directly reachable. However, you can access them from the system ''HongKong''. In particular, you can use remote display capability to run a Firefox web browser on HongKong and display the output on your local computer:  ssh -XC ''nameOfYourPlug''@hongkong.proximity.on.ca firefox http://''nameOfYourPlug''/ == Put Your Plug to Work == Use your plug to [[FSOSS 2010 Plug Computing Workshop - Photo Gallery|ake a web photo gallery]]. = Other Uses for a Plug Computer = Here are some other PlugComputer application ideas (which are less suited for demonstration in this workshop):* wiki host* print server* scan server* network-attached-storage (NAS) device - attach a large disk and make your files accessible over wired or wireless LAN, or through the Internet* automatic weather station - attach USB sensors and create a web-based weather tool* streaming media server* webcam server* home security system* backup system in an outbuilding - add a disk and put this in your detached garage, programmed to back up your main household computers at regular intervals via wireless networking and strong encryption* small business VOIP phone system - using Asterisk PBX software* Internet radio station* router, firewall, or intrusion detection system* VPN connector* mail server with spam filtering* e-mail autoresponder or mailing list server* rsyslog or syslog-ng server - collecting activity and event logs from a network of systems* RSS aggregator* IRC bot* home automation controller* game server for LAN parties* small e-commerce system* order server for a restaurant - communicating with handheld tablets used by servers* moodle server for a school* GIT or other version control server* automatic wireless backup system for smartphones* collaborative editing server using Obby ... the applications go on and on.