The HAL Project
Let's get ready to hack the box. For this article, we skip the Mac OS X instructions. It is a special case that gets complicated; visit our Web site for more information. Otherwise, it's a four-step procedure: flash the device, move the operating system to the hard drive, install Firefly Media Server and customize your configuration.
First, you need flashing software. Under Microsoft Windows, use Sercomm's utility, and under Linux use upslug2. You can find both of these via our Web site at www.halproject.net/wiki/Hal-LinuxJournal.
Then, download “OpenSlug firmware for NSLU2, binaries version” for the distribution page, which you also can reach via our Web site.
Be careful—this next step is the one that you do not want to mess up. Hold down the reset button and power-on your NSLU. Release the reset button when the yellow light turns red (about ten seconds). If everything worked, NSLU's LED should blink green and red. This indicates that the NSLU is in upgrade mode. Now, follow your software's instructions to upload the firmware. Within about three minutes of initiating the transfer, the software should indicate that the flash procedure was successful.
Restart the NSLU. At this point your hard drive is still sitting on your desk, unplugged. At the end of the boot sequence, once the light on the NSLU stops blinking, connect your hard drive to the first USB port (the one near the power source).
Log in to the box via SSH. Depending on the device's version, past settings and the stellar alignment, the IP could be 192.168.1.77 (Linksys' default), a static address you configured before, or it could have been obtained via DHCP. The user name is root, and the password is opeNSLUg.
Once logged in, use fdisk to create partitions on the sda device.
We use the following schema:
/dev/sda1 : 500 megs, type 82 (linux) /dev/sda2 : 258 megs, type 83 (swap) /dev/sda3 : "the rest", type 82 (linux)
The first partition is for the operating system (mounted on /). The second is the Linux swap. The third is going to be mounted on /home/musique by the installation script.
With the partitions in place, create the filesystem (nslu> is the prompt):
nslu> mkreiserfs -q /dev/sda1 ; mkreiserfs -q /dev/sda3 nslu> halt
The NSLU will turn itself off. Unplug the hard drive, and restart the NSLU. Once it is booted, ssh in, replug the USB hard drive in the same port (the one near the power, remember?), and launch the following three commands:
nslu> turnup init nslu> turnup disk -i /dev/sda1 -t reiserfs nslu> reboot
The first command returns all kinds of questions (new root password, hostname, network information); the second copies the OpenSlug operating system to the hard drive, and the third reboots the NSLU. From then on, there is no need to remove the hard drive again.
If everything went well, you now have OpenSlug installed, with your own hostname and your own custom network settings. This gives you a great little Linux box with which you can run all kinds of software. The package system of OpenSlug is ipkg. Get going!
Installing HAL is really easy—really. All you need to do is get the admin.sh script from the HAL_Project server:
nslu> wget http://files.halproject.net/lj/admin.sh nslu> sh admin.sh
This script installs all the other required parts (such as mt-daapd, OpenSSH, rsync, libraries and so forth).
You will want to change the default configuration. Check the HAL-Help command for more information. You also should run HAL-SetName to change the name advertised to iTunes clients.
That's it. That's all the knowledge you need to build a HAL box from scratch. Plug your HAL box in to your network to see your now-empty share automatically appear. You can add media sources with the HAL-AddSources command at the OpenSlug prompt.
We would like to switch to an mdns server that is more powerful than the one distributed with Firefly Media Server. In particular, we would like to advertise other services in addition to daap shares. Imagine locative bookmarks that would automatically, and only temporarily, be added to users' browsers (Safari already supports this feature), or collaborative tools like SubEthaEdit.
Another feature high up on the to-do list is completing the central server. Media synchronization is easy with two or three HAL boxes, but in larger HAL deployments, central management tools become a necessity.
We also are investigating other hardware platforms. This article focuses on the Linksys NSLU2, but many other fun pieces of hardware exist. The ASUS WL-HDD2.5 pairs a 2.5" hard drive enclosure with a Wi-Fi radio, which would be ideal for HAL. But, its CPU is a lot slower than that of the NSLU, and its memory is almost non-existent, so it is not clear whether our software fits or whether it can be made to fit. The device is on our order-and-test list, along with many others.
Another aspect of the project open for further development is copy protection. Content providers (in our case, student-run radio stations and artist groups) are more ready to contribute media for the project when they are confident that it won't end up on a P2P network the next day. We know techniques exist for ripping content from a daap feed, but we will be working hard to limit those possibilities (knowing we won't be able to eliminate them all).
While keeping this technology suitable to individual HAL use, we're excited to bring this project to a larger scale. We have 12 boxes currently deployed, and we plan to expand to 25 by the end of 2006. Also, we hope to assist the community wireless group WirelessToronto set up its own network of HAL boxes in the near future. The goal of creating a richer, more diverse, more accessed local culture is a lofty one, but hopefully this project will have an impact.
The HAL Project has much work ahead of it. We look forward to hearing from people who feel like rolling up their sleeves and joining in.
Resources for this article: /article/9459.
Pascal Charest is a network consultant. He's the technical coordinator of the HAL Project as well as a board member of Ile Sans Fil. He spends too many nights hacking hardware.
Michael Lenczner helps develop free information infrastructures through his organization CivicSense.ca. He is the cofounder of Ile Sans Fil and the nontechnical coordinator of the Montréal HAL Project.
Guillaume Marceau is a computer science graduate student at Brown University and a new volunteer with Ile Sans Fil.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- My +1 Sword of Productivity
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Managing Linux Using Puppet
- Non-Linux FOSS: Caffeine!
- Doing for User Space What We Did for Kernel Space
- SuperTuxKart 0.9.2 Released
- Google's SwiftShader Released
- Parsing an RSS News Feed with a Bash Script
- Rogue Wave Software's Zend Server
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide