Sector Size on Virtual Machine


I noticed that on my virtual machines, the number of heads / cylinders on the disk are far larger than would technically be possible

A normal hard drive has 2 heads per platter, and up to 5 platters for a total of 10 heads.

This vm has 255!

root@ubuntu:~# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes

255 heads, 63 sectors/track, 2610 cylinders, total 41943040 sectors

Units = sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x0002a643

Device Boot Start End Blocks Id System

/dev/sda1 * 2048 40105983 20051968 83 Linux

/dev/sda2 40108030 41940991 916481 5 Extended

/dev/sda5 40108032 41940991 916480 82 Linux swap / Solaris


41943040 sectors * 512 byte sectors = 21474836480 bytes (21GB)

41943040 sectors / 2610 cylinders = 16,070.130268199 sectors per cylinder (Strange that isn’t divisible evenly)

Apparently further research is needed.

  1. Why do virtual machines have 255 heads?
  2. Why do the number of sectors per cylinder no divide evenly?

If you have any ideas, leave them in the comments.

Arduino Powered Foosball Table

wpid-foosball005-2013-04-15-23-11.jpg  + wpid-foosball008-2013-04-15-23-11.jpg  = Screen Shot 2013-04-15 at 11.57.54 PM

Why Attach an Arduino to a Foosball Table?

– Because the foosball table is clear on the opposite side of the building.

– Because we can!

What are those parts?

– The gold disk is a piezo electric transducer, commonly known as an electric guitar pickup. It converts vibrations into electricity.

– The red circuit board is an Arduino with Ethernet. It uses the standard Arduino library to handle dhcp requests.

– The circuit board is soldered after the knock sensor tutorial on

– They grey cables are Power Over Ethernet Injectors (POE). They are not required if your foosball table is in reach of a power outlet.

Where can I buy this stuff?

Arduino –

POE Cable –

Piezo Transducer –

1 Mega Ohm Resistor – Radio Shack

Circuit board –

Headers –

Wire – Your local garbage can

How do I code it?

See the code on . You will need an account on to store your sensor readings. Replace the “Feed ID” with your feed Id, and the “Data-stream” with your data stream name.

You will need to generate a new Private API Key and replace the API key in the code with your own API key. documents how to get code from an arduino to their servers here: and here:

The webpage uses jquery and the cosm javascript library. You can find examples of how to use it in the “Sandbox” directory in github

The Cosm javascript library is documented here: Cosm developers are very active on

Once you have the webpage how you want it. You will need to create an ubuntu virtual machine and install apache to host the website. It does not need to be on the same network as your sensor.

I highly recommend setting up your ubuntu web server using vagrant.

How did you make the webpage so pretty?

The majority of the webpage was coded by a friend who does web development professionally.

The github and “i” icons are actually fonts, not images.

The green button is made entirely with css3 and gradients.

The graph is made with cosm’s graph builder

Only the flat piezo elements work, speakers pulled from computer cases absolutely do not work.

What If I want to make my own awesome foosball table, but I have questions?

Leave a comment below

Ask your question on stack overflow and tag “cosm”

Go to the Arduino Forums

Any problems you discovered on the way?

I was going to use a raspberry Pi, but they don’t have analog sensors. Lady Ada has a great article of how to work around this:

Arduino Ethernet has 5 analog pins, but pins 4 and 5 are used by the ethernet shield. Pins 0 and 1 are also shared and shouldn’t be used.

What if I want to see pictures and a video of the table?

Here you are!







available unavailable



Lack Rack

The Lack Rack


This is a proof of concept server rack consisting entirely of IKEA coffee tables. 5 Racks in total make for 45 U. The best part is that each coffee table only costs $9 USD



Which to Buy

If you decide to make your own, pay attention to which size lack rack you get. IKEA strangely offers 2 slightly different sizes

22 inch


21 5/8 inch.

The 21-5/8” racks are the exact dimensions of server equipment.



To keep the tables from sliding off of each other, 3/16 inch holes were drilled in the bottom of each leg and 4 holes were drilled in the top corners. Metal pegs (courtesy of the IKEA) keep everything in alignment




21-58” IKEA LAC table = 9.99 x 5

16 metal pegs = free from IKEA parts department

Total = $49.95


Final Notes:

This obviously isn’t as sturdy as a real rack. 3 tables is probably the maximum anyone would trust with real equipment. (Assuming the servers aren’t heavy).

Checkout the IKEA Lack coffee table for full length servers

Reset Cisco 1200 AP

1. Assign computer static ip in same subnet as 10.0.0.x with /8 subnet mask (


2. Connect Crossover Cable to Ethernet Port on AP


3. Connect Power to AP – Allow 30 seconds to boot up You will have either 1 or 3 green lights


4 You are now going to continuously hold the ‘Mode’ button down for 30 seconds while performing these other tasks:

        - 10 seconds with power

        - 10 seconds without power

        - 10 seconds with power

        - As you connect and disconnect the power with one hand, Make sure to always keep the ‘Mode’ button pressed down with your other hand

5. Wait until the lights change or about 10 to 15 seconds, then let go of ‘Mod

6. Navigate to


Username = Cisco

Password = Cisco


If these steps didn’t work

  1. Power cycle the device, then give it up to 1 minute to start up and try webpage again
  2. Verify you are using a cross-over cable and that the cable is good
  3. Make sure all other network interfaces are turned off on your laptop / desktop, especially wireless. Ensure your computer is not connected to the internet.
  4. Restart your browser if you have changed the state of any network interface cards on your computer. Some browsers tie all traffic to active interface on startup.
  5. Perform reset sequence again waiting 20 seconds between each step.

SSC Spread Spectrum Clocking – Hard Drives

A little known feature on many new hard drives called SSC has caused a lot of people to wonder if they should turn it on.


The answer is NO unless you are working as an electrical engineer and are using an oscilloscope nearby, or if you are working on the large hadron collider and can’t have any interference. (If you are working on the large hadron collider please contact me because you are my new best friend).


A default hard drive emits electrical radiation similar to the green line

A hard drive with SSC enabled would look more like the red line.

I can’t verify this, however supposedly enabling SSC slows down the spin up times of the hard drive thus making it a fraction slower in tests.

Open Source Hardware?

Hackers, modders and makers have always loved the idea of open source software such as linux, because it is the antidote to being owned by ‘The Man’. No one likes the idea of being limited or told how their software should run.

The Open Hardware Summit is the organization behind a radical new idea of ‘open hardware’. What open hardware means is that companies / hobbiests can choose to release the schematics and information of a product to the world free of charge. Anyone is then free to use the designs for their own use, or even in a product that they sell. I will be finishing up the schematics for my word clock and releasing both designs under the Open Hardware license in the next couple of months.

The common paradigm has been to protect your intellectual property to prevent outsiders from making cheeper duplicates of your product. Rather then hide away from those who would like to take your plans, embrace them with open arms.

If you design hardware and want to share it with the world, you can put the Open Source Logo on your designs. The neat part is that until April 15th 2011 anyone can vote what they want the new official logo to be.

Take a look at the candidates and cast your vote here.


Image credit

Hard Drive Upgrade

My macbook pro came with a tiny 320 gig hard drive. That simply won’t do. Introduce my brand new out of the bag 750 western digital black hard drive. Why western digital black? They are the fastest baddest drives around, that’s why.


I opened the bag and started inspecting it. I noticed something funny on the bottom of the circuit board. Corrosion!


Notice the blue tint.


This had me worried. Arduino recently had a similar quality control problem. I did not want my brand new super fast drive to have issues.


I plugged the 750 into an external enclosure, and tried to copy the data. Thats when the errors really started.


My cd rom drive was removed so I could cram in a solid state drive


I got a strange error that I have never seen before.


I simply formatted the drive, and didn’t worry about it.

I opened my favorite copying software “Carbon Copy Cloner” . Again, I got another error. This isn’t looking good


By this point I was afraid that the drive might have been bad. I gave it a scan with disk warrior. More errors.


Another strange error.


Great! I am defiantly thinking this drive is bad. I really don’t want to have to wait for a replacement.

I heard about a program called Drive Genius. Their software is fantastic. Unfortunately It wasn’t happy either.


Ok time for one last effort. Format it again. What’s this? The drive is now a 2.2 tb drive!!??? Great. I am finally getting past the denial and accepting that this drive could be bad.


Ok time for one last effort before I send the drive back. I borrow my roomate’s agonizingly slow sata to usb adaptor.


SUCCESS!!!!! It worked without a single issue.
The entire drive copied error free.
        I copied some files back and forth, ran a disk integrity check and made sure that it wasn’t a fluke. The USB to Sata adaptor I was using must have had issues. Strange that I could use any other hard drive without incident. Even stranger was that the errors I was getting were at random times throughout the transfer process.

Here is my theory as to why.

The enclosure that I was using was made before the advanced format drives came out. (if you are unfamiliar with Advanced Format, check out this link here). Basically many new drives are using 4000 byte sectors opposed the the traditional 512 byte sectors we have been using since the floppy era.
My old usb to sata drive appeared to work perfectly for a short while before giving random errors.

The apparent corrosion had nothing to do with the errors I was receiving.

Hopefully this helps someone else running into similar problems.

One last step I did was change my icons to a picture of the actual drives.


Update: My drive has been running great for several months now. I would defiantly recommend this drive to a friend as long as they have a high quality sata to usb adaptor to transfer data.