Beowulf, Grendel, and the BeagleBone Black

My brother is a PhD candidate in a computational chemistry program. He occasionally asks me for help with some of the software he’s required to use. In the course of helping him, I’ve learned a few things about scientific software. The following are my observations:

  1. Scientists love Fortran. They love Fortran as much as a Linux systems programmer loves C and they will probably never leave it for the same reasons. There is apparently a lot of Fortran code out there and the effort to rewrite it would be immense. I’ve suggested to my brother to use wrappers in SciPy, a language with which he is more familiar, but the old guard insists on using Fortran.

  2. I think scientists-who-use-software don’t really get how to write cross-platform code. One package he showed me used a Make file (yeah!) but required you to edit a bunch of text config files first to specify the architecture and some paths and then run make.

  3. Despite these unfortunate realities, I feel that scientists are among the few who use computers for their full potential. It saddens me that the raw computational power in your smart phone is being used to so that you can click like on a post.

There was only so much help I could provide my brother because I really didn’t know anything about the software being used in massive clusters. So when Packt publishing offered me a chance to review Building a BeagleBone Black Super Cluster by Andreas Reichel, I was interested. My cluster operations knowledge is very limited, but I’m pretty familiar with the BeagleBone so I thought this book might be a good way to learn more.

A pack of BeagleBones found in the wild found in a cluster formation.
A pack of BeagleBones found in the wild found in a cluster formation.

I enjoyed reading Andreas’ approach to the topic. He brings a certain academic perspective to the BeagleBone which is a bit refreshing in a way. In the preface and his introduction he puts the BeagleBone in historical context of computing history which was enjoyable to read.

He then continues to describe how to build a small cluster of BeagleBones. He made a custom mount of ten BeagleBone blacks. The details on how to build the enclosure are complete including how to hack an ATX power supply to power everything. I thought the set up was particularly clever.

The rest of the book describes how to use open source scientific software to run on this cluster. The examples seem very complete including providing details on source code modifications that need to be performed before compiling. This confirms my impression of scientific software πŸ™‚

The book is approachable by more than just academics. I think there is a growing citizen-scientist movement who would benefit from learning more about parallel computing, especially in the areas of simulation and modeling. There are the occasional Hackaday posts the mentions clusters if you are looking for applications. One post describes a 33 Raspberry Pi cluster and the other an eight-node clustered webserver.

Now if my brother asks for help, I still really won’t understand what he’s doing, but I’ll at least have some background on how the software tools should work.

My book, BeagleBone for Secret Agents, is now available

My book, BeagleBone for Secret Agents, is now available. The title is slightly misleading as you need not be a secret agent to enjoy this book. πŸ˜‰ There are five self-contained projects involving electronics, cryptography, and various software packages but I wanted to write a book that was more than just a collection of projects. In BBfSa, I tried to motivate the social and individual importance of using software like Tor, GPG, and OTR. While the projects are cool, IMHO, I’m hoping that readers will appreciate the need for and difficulty of developing privacy enhancing technologies.

I picked projects that were explicitly more detailed than one could describe in a blog post. Most of them combine hardware and software and I would describe the projects as challenging, but attainable. If you decide to buy it hopefully you not only enjoy it, but learn something as well.

The book is available as a DRM free eBook and as a bound collection of printed dead-trees. I’ve stopped reading with eBooks readers, but there are just over 100 references, most with URLs, and I can appreciate the convenience of using one. You can visit my BBfSa page to see its availability or buy it direct from Packt Publishing.

Thanks to the many people at Packt who helped with the direction, editing, and layout. I was lucky to have very talented reviewers. Lastly, thank you Nate for writing an incredibly insightful forward and to SparkFun, without whom the projects in this book would not have been possible.

Simple script to change hostname on BeagleBone

Simple script to change hostname on BeagleBone

I update my BeagleBone images very frequently. As soon as you have more than one beagle running around your house, keeping track of them takes some effort. I like to have unique hostnames set for each device so that I can ssh into the unique device. I also put a little sticker on each one to remind me of the hostname.

I'm a H2G2 fan. I feel somewhat compelled to always have a picture. The use of the filter in this picture is borderline relationship ending.
I’m a H2G2 fan. I feel somewhat compelled to always have a picture. The use of the filter in this picture is borderline relationship ending.

Anyway, it’s pretty easy to change the hostname on Debian. To do it properly you need to edit two files, /etc/hosts and /etc/hostname. It’s an annoying little task that I do often enough I finally decided to script it. I should start making a collection of these scripts as I perform the same tasks each time, but we have to start somewhere.

Behold, the script:1


if [[ "$#" -ne 1 ]]; then
    echo "$0 usage: newhostname (run as root)"
    exit 1


hostname $1
sed -i "s/$name/$1/" /etc/hosts

Also available via wget:

chmod +x

  1. It’s not that impressive, I know. I need to put all of these scripts in a repo and then somehow automatically download them and run them.2 
  2. There may be a utility that does this already. But it’s fun to re-invent the wheel every so often. 

CHUCKWAGON design files from DEF CON 22 are released

CHUCKWAGON design files from DEF CON 22 are released

The schematic, EAGLE CAD files, and Bill of Materials for the CHUCKWAGON I2C adapter as presented at DEFCON22 are now available. You can buy the board directly from OSH Park, the components from Digikey, and solder the device yourself. For those looking for some references on using I2C on the BeagleBone Black, check out my I2C references post.

CHUCWAGON soldered to the CryptoCape. I soldered wires underneath and to the male headers just below the CHUCKWAGON.
CHUCWAGON soldered to the CryptoCape. I soldered wires underneath and to the male headers just below the CHUCKWAGON.

It does require surface mount soldering, but it’s a good board on which to practice. The top layer isn’t so bad but the pads for the P-channel MOSFET on the bottom are a bit tight. If you don’t want to deal with the P-Channel MOSFET, you can put a solder bridge over the source and drain and connect the 5V rail from the VGA adapter to the board. Just be careful not to get the gate, which will short the power rail to ground!

The CHUCKWAGON was also in the NSA Playset Deluxe package. This package was auctioned at the EFF auction, theSummit, which sold for over $2,000. A representative from the EFF passed along their thanks:

Thank you very much for your fantastic donation this year! It’s clear how appreciated it was as it is now the highest valued item auctioned at the EFF summits… ever!

The collection of NSA Playset gadgets. There's a CHUCKWAGON in there somewhere... Photo by Michael Ossman
The collection of NSA Playset gadgets. There’s a CHUCKWAGON in there somewhere…
Photo by Michael Ossman

I think the two HackRFs in the bucket were of greater value than the CHUCKWAGON though πŸ˜‰

Happy Hacking!

CryptoCape screen casts are posted

After months of work, the CryptoCape is now available at SparkFun Electronics. This cape adds a bunch of security features to the BeagleBone Black. There are seven independent ICs on that board that are connected over I2C. Each IC has a range of features as such, there’s a lot one can do with this hardware. For those who like to read, check out the hookup guide for examples and a walk-through. If you want to listen and watch an off-the-cuff screencast of me performing at demo, check out these screencasts.

Me with the CryptoCape and a good German Beer.
Me with the CryptoCape and a good German Beer.

I’m very grateful to SparkFun for supporting this idea. I approached them with this idea and applied for their Hacker-in-Residence program. Back then, SparkFun was still calling “capes” “shields”. Now they have a slick BeagleBone Proto Cape in addition to mine, so I’d like to think I helped them get more into the BeagleBone πŸ™‚

I’ve been having a lot of fun with this cape. Of course, I like the security ICs and written a few drivers for them. Even if you are not into security, the onboard ATmega is really fun. It can be flashed from the BeagleBone so you can combine Arduino projects with the Beagle!

I have a few boards on Tindie, that I hand assemble, but this is the first device that’s being professionally manufactured. This is the first, of hopefully more, open source hardware security devices from Cryptotronix. I have a few projects spinning now, but if you support open source hardware, and want to add some hardware security, feel free to contact me.

I’ll be talking more about the CryptoCape, how I got into this, and some project ideas at HOPE X in NYC this summer.

For those with a darker color hat, my DEF CON 22 talk was recently accepted. Once the abstract is posted on the speaker page I’ll announce that here. <evil grin>

Change to the BeagleBone Flasher image

For those that use the BeagleBone flasher images there was a recent change posted. For new images, the four LEDs will be OFF when the flashing is complete. Previously, they were all on.

I'm not sure why I felt the need to include a picture of unlit LEDs. Consider this journalistic proof of what LEDs look like when they are off.
I’m not sure why I felt the need to include a picture of unlit LEDs. Consider this journalistic proof of what LEDs look like when they are off.

The change will improve the reliability of the micro SD card you use to flash the Beagle as the board will now be shutdown by the flasher script. Most of the blogs and instructions out there will say wait for all four LEDs to be illuminated when done. However, the reference instructions has always been at the eLinux Beagle Board Debian site.

The latest images are available from When you flash your new Rev C, keep in mind this change!