How to Turn an Xbox Into a $150 Linux PC

In this TechBuilder Recipe we'll explore what an Xbox is made of and how to make it work running Linux. Best of all, we'll do it without opening the box!

But first, I'd like you to consider the fact that an Xbox is no mere gaming console. In reality, it's a powerful PC. Take a look at what's inside that $150 Xbox:

That's a lot of PC. The question is, how do you get to it? The answer, of course, is with Linux.

Naturally enough, Microsoft does not invite the use of other operating systems on its premier gaming machine. Especially free ones. But in few simple steps, and with the support of a friendly Linux community, you can load and run Linux to unlock all the Xbox hardware.

id
unit-1659132512259
type
Sponsored post

A group known as The Xbox Linux Project has pioneered the way. They have kindly posted a wealth of information and experience on their site. We'll make use of all that information. But before you get started, it will be helpful to understand a bit about the Xbox's internals.

When an Xbox is powered up, like any computing machine, it needs to boot something. Off the shelf from your local Wal-Mart, the Xbox contains a Spartan operating system that has just enough smarts to load a minimal set of drivers and display a simple user interface called the Dashboard. The Dashboard lets users select games, save and copy gaming information to hard-disk or memory units, copy music from CDs, but not much else. In fact, a user's only interface to the Dashboard is the system's four gaming controllers, known as Xpads. There is no keyboard, no mouse, and only a very limited operating system. In addition, the Xbox will run only those DVDs it recognizes as an Xbox game. The good news: It's pretty easy to overcome all of these obstacles.

In fact, to gain access to the real potential of the Xbox, all you have to do is trick the Xbox into thinking a small version of Linux is actually a game. The Xbox starts this small version of Linux, which, in turn, loads the drivers. These drivers support things like telnet sessions that allow entry into the hardware and invites the possibility of installing a full, bootable distribution of Linux. Voila! Computing freedom!

Okay, maybe you're thinking, "This blows my warranty, right?" Well, not entirely. Yes, the Microsoft literature states clearly that opening the Xbox or running software other than games voids the one-year warranty. But some experts say otherwise. More important, there is some precedent showing that at least part of your warrantee will hold. If you're truly worried, read this short article about the differences in "Warranty by Law" and "Insurance of the Manufacturer."

Basic Steps

Below, I've broken the operation down into steps with some technical details briefly explained along with links to even more detailed information provided by the Internet Linux community.

Step 1: Build a cable to attach USB memory devices to the Xbox console.

Step 2: Find a suitable USB memory device.

Step 3: Get an image that will boot Linux onto the USB memory device.

Step 4: Use Xbox copy utilities to copy the image over to the hard drive.

Step 5: Run the image using licensed game software.

Step 6: Obtain and install a full distribution of Linux.

Now let's look at each step in more detail.

Step 1: Build a cable

Xbox controllers, called Xpads, are really just USB devices. They may not look like USB devices, since they don't use the standard USB connectors. But inside the shielded cable that connects the gaming controller to the console are the familiar four wires used in standard USB cables,plus one mysterious yellow wire rumored to be for a future addition of a lightpen. This is good news: USB memory devices, keyboards and mice will attach here with just a modified cable. I built a cable using a female connector chopped from a cheap USB extension cable and a frayed controller cable I needed to replace. Here's what my modified cable looks like:

To build the modified cable, I matched the colored wires in the cables, red to red, black to black, etc. I left the yellow one disconnected, but insulated from the others. The table below gives a bit more detail:

Standard USB Pin-out

For more information on attaching USB devices to an Xbox, check out this Xbox Linux Project article. Alternatively, if you do not want to make your own modified cable, you can also buy a pre-made cable from Lik-Sang.

Step 2: Find a USB memory device

Memory cards that plug into the Xbox controllers are simply USB memory devices -- like the portable data drives, USB "sticks," or "jump drives" -- but with a proprietary connector. The trick is to find one that the Xbox will work with and that you can get an image on. Unfortunately, some work, some don't. Here are two devices that work with the Xbox and are widely available:

* Kingston DataTraveler 32 and 256 MB.

* Lexar JumpDrive Secure 128 and 256 MB (must be "Secure" -- other models may not work).

Also, be sure to refer to the Xbox/USB device compatibility list here.

Important: Be sure to back-up your USB memory device. Once the USB device is sensed by the Xbox, it will be reformatted.

Next, plug your modified USB cable into the console. Insert the USB memory device at the other end. Power up your Xbox. The USB device will be discovered and reformatted. It may take a minute, and you may have to try more than once. Once the USB device is formatted, it will appear under Memory Devices in the Xbox Dashboard. Unlike the other memory devices, this device can be read and written to by your PC. By the way, you can use the USB device just like the Xbox memory cards, even saving your games to it. Best of all, you're no longer limited to 8 MB on the standard Xbox memory units that plug into the Xpad controllers. Third-party cards are available, but they are all small compared with the hefty 128-MB or 256-MB memory stick.

Step 3: Get a bootable image

The image you will want to download and copy to your newly formatted memory device is a "Savegame" that can be loaded by a couple of games. It will help you to boot a rudimentary Linux operating system. The one I used is the Xbox licensed game MechAssault. A MechAssault image is available from SourceForge.net. Download the image that matches the size of your memory device: 128 MB, for example.

Note: The format used by Xbox memory devices is FatX. FatX may be easy to deal with if you already have a Linux box or a Mac with OS X. But it is not Windows PC-friendly. In other words, when you plug the memory stick into a Windows PC, you will see the device, but not the contents. You will need to use a shareware program called Stick Explorer, which is available at OzXChip.com to flash the FatX image to the USB stick. It works quite well. Or find a friend who runs Mac OS X.

For more information on using the Stick Explorer and on software preparation of the Xbox, check out this Xbox Linux Project page.

Step 4: Copy the image to the Xbox

This step is a natural for all you gamers. Use the Xbox Dashboard to view the contents of the USB memory stick. It should now contain three entries: Emergency Linux, Remove Linux, and Install Linux. (By the way, that handsome penguin in the icons is Tux, the Linux mascot.) Use the usual Xbox methods to copy all three savegames on the USB memory stick to the hard drive. You will now see, and more importantly, be able to invoke these Savegames in our next step.

Step 5: Run the image to start Linux

To run the image, you will need the MechAssault game DVD. Savegames are associated with specific games. It is this association that tricks the Xbox into running the image. You will need the game only to get Linux started. I rented a copy from my local video store.

While I chose MechAssault for our installation, I've heard of other modifications using EA's 007 Agent Under Fire DVD. It's important to note that the game you use must match the Savegame images that you've downloaded as it is the game that "tricks" Xbox into running them.

Okay, let's do it!

Insert the MechAssult game. Select Campaigns and Emergency Linux (one of the Savegames we copied in the previous step). You will see the Xbox restart. This time, you won't see the usual Dashboard graphics; instead, you'll see a black screen with white letters scrolling through the Xbox Linux boot-up.

If you've gotten this far, congratulations! A small version of Linux is running, and you can now telnet into the Xbox at its default address:

192.168.0.3.

Log in as "root" with the password "xbox." Then type the following command:

xbox_tool-a

Write down this hard disk key. The hard disk key is encrypted in the EEPROM memory of the Xbox and can be used if you ever need to recover or do further modifications. Now you know it.

Again, insert the MechAssault game. Select Campaigns, and this time select Install Linux. Once this completes, the Xbox disk has been set up and the item Linux will appear in the Dashboard. Our Savegame trick will no longer be needed.

If you need additional help with the above step, follow the detailed directions at this Xbox Linux Project page.

Now, simply selecting Linux from the Dashboard will boot the minimal version of Linux. A complete full-featured distribution of Linux can be loaded in our next step. Emergeny Linux is essentially a temporary way to get started; Install Linux really sets-up the disk; and Debian installation (our next step) loads the real Linux OS.

Step 6: Install a complete Linux distribution

As you probably know, there are many Linux variants including RedHat, Mandrake, FreeBSD, SuSE, and Gentoo. But the best and probably only choice for reliable operation on the Xbox currently is Ed's Debian. It's based on the popular x86 Debian and tailored specifically for Xbox. Here's a good general page for information on Ed's Debian Linux.

Recent versions of Ed's Debian come with a bootable CD, which is used for installing the base system on the hard drive. The CD boots into a clean, graphical Xwindows desktop environment. There is even a virtual on-screen keyboard you could use with the Xbox controller, but a real USB keyboard will work, too. Another option is to log in via SSH (192.168.0.2/255.255.255.0) and complete the installation that way. The default login and password are "root" and "xbox," respectively.

Also, here are two tutorials on obtaining and installing Ed's distribution: How To Debian and Install Debian.

When Debian loads, you need to use the virtual keyboard to start the installation process. After the installation, the OS recognizes USB devices.

Installing Debian is straightforward. Insert the Installation disc into the Xbox drive and boot from it. After a short time, a virtual keyboard will appear on screen. When it does, type "su" to login as a superuser. The system will prompt you for a password; type in "xbox." Now type "XBOXLinuxInstall," and remember that capitalization does matter. Then follow the onscreen instructions to complete the installation.

Since you now have a standard USB connector on the XBox, you can connect any USB keyboard, mouse, webcam, printer, or scanner that is supported by Debian. You might consider a USB keyboard with a USB or PS2 mouse connector built-in for convenience. Or use a simple USB-to-PS2 splitter cable, which costs about $10.

That's all there is to it, but that's also just the beginning. Now put that Xbox gaming console to work as a full desktop computer with mouse and keyboard or a web/email box connected to TV or even a server or router. Oh, and have fun playing a few games on it now and then, too.

ANDY MCDONOUGH is a professional musician, composer, voice actor, engineer, and educator happily freelancing in New Jersey. He occasionally games on the Xbox, but has never beat his 10-year-old son.

Did you try this TechBuilder Recipe? If so, how did it work? Start or join a discussion thread in the Recipes Forum.