Hardware Method HOWTO

From Xbox-Linux

by Michael Steil, 5 July 2003 (updated 29 March 2004)

This HOWTO explains how to permanently mod an Xbox for exclusive Linux use.

Table of contents

Introduction

The Xbox is an IBM PC, with one difference: It only runs code authorized by Microsoft, i.e. all executables have to be signed with Microsoft's private key. That's why Linux won't run if you simply insert the Xbox Linux install CD into a standard Xbox.

But now, there are several ways to circumvent this limitation:

  • The 007/Mechassault method
  • The Dashboard method
  • The onboard TSOP method

Please note that depending on your local law, these methods might void your warranty. We will not be responsible for any damage done to your Xbox - or yourself...

The 007/Mechassault method

Both the game "007 Agent Under Fire" (Electronic Arts) and the game "MechAssault" (Microsoft) contain malfunctions that make it possible to run Linux by infiltrating the xbox. All you have to do is load a savegame that has been modified in a certain way, and Linux will start.

The problem is that with this method you will have to insert the game CD and select "Load game" every time you want to start Linux. Also, it is impossible to eject the DVD while Linux is running. You will have to find the 007 savegames elsewhere, though.

The Dashboard method

Another malfunction is in the Dashboard, the application that runs when there is no game in the DVD drive, makes it possible run Linux every time you turn on the Xbox - instead of the Dashboard, Linux will be started. By using the 007/Mechassault methods to install the Dashboard modification, you only have to use the game DVD once, from that time on, Linux will always run when there is no game in the DVD drive - and you don't ever have to open the Xbox. You can even eject the DVD when booting from hard disk.

Doing the modifications

The 007/MechAssault method

Ingredients

  • either the game "007 Agent Under Fire" or the game "MechAssault"
  • either of the modified savegames, depending on the game you have
  • a method to write to USB storage devices formatted with FATX (see below)

These are the different methods to write to USB storage devices with the FATX file system:

  • using another Xbox that is already modified, as well as either a PC USB storage device, such as a USB stick, or an Xbox memory unit
  • using a PC USB storage device with a FATX enabled Linux on a PC
  • using a PC USB storage device from within PC or Xbox Linux, if you already have FATX images of the savegame
  • opening the Xbox and hot-swapping it to a Linux PC that understands FATX - this way you need no USB stick or memory card at all, but you have to open the Xbox

Copying the savegame to the USB device

The idea is to copy a modified savegame (that will make the game crash and load Linux) onto your unmodified Xbox. Without opening the Xbox, this can only be done using an Xbox memory unit. The Xbox also accepts most USB storage media, such as USB sticks or ZIP drives as memory units.

You can download the saved game files here: http://www.xbox-linux.org/wiki/Download#Action_Replay_Saved_Game_ZIP_Files

Creating the memory unit using another Xbox

For this method, you need another Xbox that is modified so that you can upload savegames to the E: drive. Then you have to connect the USB stick or the Xbox memory unit and copy the savegame to the USB device, using the Dashboard's savegame management functions.

Creating the memory unit using a FATX-enabled PC

For this method, you need a USB storage device (an Xbox memory unit will not work) and an Xbox USB adaptor. You have to compile a Linux kernel that includes the FATX filesystem, by patching your kernel sources with the Xbox Linux patch and only enabling FATX. Then your PC will be able to read and write FATX file systems. First connect the USB device to the Xbox, using the adaptor, and enter the "Memory" menu, so that the Xbox formats the device. Then connect it to the PC, and copy the savegame files onto it.

Creating the memory unit using a Linux-PC and the FATX-images

If you happen to have the savegame in FATX image format instead of ZIP/TGZ, you can use a Linux computer to write the raw image to the USB device using the "dd" command. As with 2.1.2, no Xbox memory units will work with this method, and you'll need an Xbox USB adaptor to connect the USB device to the Xbox afterwards.

Opening the Xbox and hot-swapping the hard disk

This way, you need no USB device or Xbox memory unit at all, but you have to open your Xbox, hotswap the hard drive when the Xbox is turned on to a FATX- and Xbox-partitioning-enabled Linux computer (i.e. you have to compile a kernel) that is also running and in the LILO/Grub boot menu. The PC will recognize the Xbox hard disk, and you will be able to mount the E: drive and copy the savegame into the subdirectory UDATA.

Using this method, the savegame is already on the target hard disk, you can skip the step described in 2.1.2.

Copying the savegame to the Xbox hard disk

As soon as you have the savegame on the USB device, you can connect it to your unmodded Xbox and use the dashboard to copy it to the Xbox hard disk.

Running Linux

Now run the game and choose "Load Game". On 007, choose "Xbox Hard Disk", in MechAssault, choose "Run Linux". Linux will now start. You can repeat this step whenever you want to run Linux, you don't need the USB device any more - you can even use it to copy the savegame to as many other Xboxes as you like.

The Dashboard method

You can easily permanently install Linux to the Xbox hard disk, so that it boots every time you turn on the Xbox. You can still run games, just by inserting a game DVD when you turn on the Xbox.

It is strongly recommended that you update your Xbox dashboard to the "Xbox Live" enabled version (4 menu entries instead of 3), by selecting "Xbox Live" in any Live-enabled Xbox game such as MechAssault. You don't need an Xbox Live membership, just select the menu entry.

Now just run Linux on your unmodded Xbox using the method described in 2.1, then, using Linux, go to C:\, rename the "fonts" directory to "fonts.old", create a new "fonts" directory and copy ernie.xtf and bert.xtf into this directory. Then copy the default.xbe distributed with the Dashboard hack to C:\, as well as your linuxboot.cfg, your vmlinuz and your initrd. The next time you start the Xbox without a game in the drive, Linux will start.

You can easily uninstall Linux by just renaming font.old back, using Linux.

Note that you need the game every time you want to install Linux, or uninstall Linux if the installed Linux is broken. As long as Linux is installed, you cannot use the Dashboard any more.

Caution

If you unplug the Xbox so that it loses the time, the Dashboard will always start when you turn on the Xbox, asking for the current date and time, ignoring a disc in the DVD drive. If this happens, and the Linux on your hard drive is broken (missing kernel or initrd, for example), there is currently no way to uninstall Linux without opening the Xbox, because you cannot run a one-time-Linux using the method described in 2.1 any more. Please be careful, we're working on a solution already.

Note that this does not apply to the MechInstaller method. There is the possibility that you run into similar problems when the MechInstaller method has been applied to your Xbox, but it can easily be solved by just turning the Xbox on and letting it loop for half an hour.

There is a separate Clock Loop Problem HOWTO, which is recommended reading.

The onboard TSOP method

Another method to install Linux permanently is to reprogram the Flash ROM on the Xbox motherboard with the Xbox Linux BIOS. But for this solution, you need to open the Xbox and solder two bridges on the motherboard, to disable the write-protection, as described in the TSOP flashing HOWTO. Note that this document describes the method for various revisions of the Xbox hardware. Be sure to identify it correctly before attempting the mod.

Get the raincoat utility and a Xbox Linux BIOS ("Cromwell") image from our download section on sourceforge (http://sourceforge.net/project/showfiles.php?group_id=54192). Afterwards, run Linux using the 007 or MechAssault method described in section 2.1 above. Using your favorite FTP client, transfer raincoat and the BIOS image from your PC to the Xbox, if you don't have them there already.

NoteMechInstaller users: The canonical UNIX directories (/bin, /etc, /tmp) aren't writable in Emergency Linux. Why? Because in Emergency Linux these directories reside on a cramfs filesystem (http://en.wikipedia.org/wiki/Cramfs). Use /mnt/X, /mnt/Y, or /mnt/Z for temporary working space instead of the directories suggested below.

Assuming the files are named raincoat-0.10.tbz2 and cromwell-2.40.tar.gz (current at the time of this writing), and you uploaded them to directory /tmp, unpack them using the following commands:

cd /tmp

tar xvjf raincoat-0.10.tbz2
cp raincoat-0.10/bin/raincoat /bin
cp raincoat-0.10/etc/raincoat.conf /etc

tar xvzf cromwell-2.40.tar.gz
cd cromwell-2.40

CautionIf you have a 1.0 or 1.1 Xbox (1 MB Flash ROM), you need to use the 1024 KByte version of the image, or else you will break your Xbox!

Now type, depending on the BIOS size you need for your Xbox

raincoat -p cromwell.bin
or
raincoat -p cromwell-1024.bin

to start the actual flashing process.

Every time you turn on the Xbox, the Xbox Linux BIOS will start and ask for a Linux installation CD, as long as you haven't installed Linux to the hard disk. Recent versions of the Xbox Linux BIOS present a graphical menu to you with a choice of boot options - for details please refer to the Cromwell Manual.

Please note that the Xbox Linux BIOS will not run any games!!

Links

At the moment, we cannot provide direct links to the savegames, so you have to find them yourself (the Xbox Linux website is a good starting point, though), but we're considering to put together a list of links soon.