Software Method HOWTO
From Xbox-Linux
by Michael Steil
This HOWTO tells you how to prepare your Xbox for Linux without opening it.
If you buy an Xbox, and you insert a Linux installation CD, by default it will not be accepted - not because the Xbox is no PC (it is!), but because Microsoft doesn't seem to want you to run Linux.
By using the MechInstaller trick, you can make your Xbox Linux-compatible, without ever opening it!
| Table of contents |
What does the "Software Method" do?
The "Software Method", when applied correctly, modifies the Xbox Dashboard in two ways:
- The Xbox Dashboard will become able to boot Xbox Linux CDs or DVDs. (That is, if you pop an Xbox Linux disc in the DVD drive while the Dashboard is running, the Xbox will now happily accept it, and boot from it.)
- The "Xbox Live" option will disappear from the Dashboard menu. Instead, you will get a new "Linux" option in its place. (This change is reversible, of course.) By selecting the "Linux" option, the Dashboard will launch a Linux distribution of your choice from the hard drive. (Only a small command-line based mini distribution called Emergency Linux is provided by default, but you can install a full-fledged Linux system on the HDD yourself, such as Xebian or GentooX.)
These modifications are fully software-based (hence the name "Software Method"!); you do not need to open your Xbox or solder anything.
| Missing image Icon-admonition-question.png FAQ | Why does the "Software Method" disable the Xbox Live option?
Disabling this menu option will safeguard you against accidentally connecting to the Xbox Live network while running modified system software. (The Xbox Live online gaming system is known to set a permanent ban to Xboxes with modified system software. Better be safe than sorry.) Moreover, from a hacker's viewpoint, the Xbox Live menu option is a just a convenient placeholder where to attach a hook for launching Linux. |
|---|
Is your Xbox compatible?
The Software Method takes advantage of a flaw in the Microsoft dashboard to make your Xbox Linux-compatible. Unfortunately this flaw has been fixed in newer versions of the dashboard. A Dashboard version of 4920 or below is required.
- If your Dashboard version is greater than 4920 and your kernel version less than 5713 then it is possible to downgrade your Microsoft Dashboard to 4920.
- If your kernel version is 5713 or later, then it is not possible to downgrade to a 4920 dashboard, and you will be unable to use the Software Method. ALL 1.6 Xboxes (see Versions HOWTO to determine the version number of your Xbox) have >=5713 kernels, and so cannot be made Linux compatibile using the Software Method.
Even if your kernel version is 5713 or later, not all is lost: it is still possible to run the Emergency Linux mini distribution included with the MechInstaller. You could use this to telnet into your Xbox and get info such as your HD key and unique HD password which can allow you to do other things.
| Missing image Icon-admonition-example.png Example | Finding your dashboard and kernel version. To find out which kernel and dashboard version you have on your Xbox, boot to the Dashboard (in other words, power on the Xbox without a disc in the DVD drive), select Settings and then System Info. Once the text starts scrolling, you should see the following:
XXXX is the Xbox kernel version and YYYY is the Xbox dashboard version. |
|---|
What you Need
- Any Xbox, except for the Japanese version, or version 1.6 without a modchip
- The MechAssault game for the Xbox. Only the original release will do; see below.
- A Linux, BSD, Mac OS X or Windows computer with USB connectivity
- A USB memory stick (note that you will have to overwrite it) or another USB device that adheres to the USB mass storage specification, such as an SD card reader or a digital camera (look at the Xbox USB Compatibility List)
- An adapter that allows connecting the USB mass storage device to your Xbox. (The Xbox game ports and Memory Unit slots are ordinary USB ports, but they have weird, proprietary connectors. Adapters for converting this proprietary connector to standard USB are available commercially, but you can also build one yourself. Here USB adapter (http://mesh.typepad.com/blog/2005/01/creating_a_usb_.html))
Some alternatives:
- You can use the Xbox version of the Action Replay device instead of a generic USB mass storage device and an adapter cable, if you follow this tutorial.
- Or, if you have an adapter cable that makes it possible to connect the Xbox controller to your PC, and if you also have an Xbox Memory Unit which plugs into a slot in the Xbox controller, it is possible to copy the MechInstaller savegames directly to the Memory Unit while the controller is connected to the PC. More details of this approach can be found in this incomplete HOWTO.
| Missing image Icon-admonition-note.png Note | You need the original version of the MechAssault game – not the "Xbox Game of the Year" or "Platinum Hits" version. The newer releases have been patched and will not work. The CD labels are often identical, but the version that says "Platinum Hits" is ALWAYS the BAD one. Look at the laser etching on the back. The new one says MS02308L (BAD) while the original is MS02301L (GOOD). A great source for the good version is your local used game store or a rental house like Blockbuster. |
|---|
| Missing image Icon-admonition-tip.png Tip | The MechInstaller savegames, once transferred to your Xbox HDD, can also be copied on a standard Xbox Memory Unit.. Then just take this memory unit and the MechAssault game with you, and you can patch your friends' Xboxes as well.
This will remove the need for special USB mass storage devices, special adapter cables, or special PC programs. You will still need the original MechAssault game in order to actually use the savegames, but copying them around among your friends can be done using just ordinary, unmodified Xboxes and ordinary Memory Units. This way even those who do not wish to modify their Xbox, or invest in any special equipment, can participate in storing and spreading the savegames to their friends. |
|---|
Recommended
- a telnet client for your computer
- a hub/switch and two regular LAN cables OR a crossover network cable
You'll need this if you want to backup your xbox hard disk key (a good idea). This requires using a telnet connection to your xbox, since a USB keyboard will not work in Emergency Linux.
Meet the MechInstaller
The "Software Method" is based on a simple idea: you run a special installer that will modify the Xbox's system software so that the Xbox will accept Linux.
The problem is that this installer itself would be rejected by an unmodified Xbox. If we just burned it on a CD (or a DVD) and tried to boot the Xbox with that, it wouldn't work. That's why we have to apply a trick to run it.
The Xbox games usually allow saving the game situation so that you don't have to play the game through in a single session. It has been discovered that the MechAssault game – which was published for the Xbox in 2002 – has a security hole in its savegame routines. This hole allows injecting arbitrary executable code into the MechAssault savegames, and running that code on an unmodified Xbox.
This blows the door wide open for us. Code which modifies the Xbox system files can be wrapped in a MechAssault savegame. Once you have this special savegame on your Xbox and select "Load Game" in MechAssault, our installer will be launched. We like to call it MechInstaller.
Where does MechInstaller live? How does it get to your Xbox?
Now, the hard part about this is getting this special savegame onto your Xbox. Or, actually, a bunch of savegames, since MechInstaller consists of several of them.
The Xbox normally allows storing the savegames either on its built-in HDD, or on special "Xbox Memory Units". (These are proprietary, Xbox-specific memory modules that can be purchased separately. They plug into the slots on the front side of the Xpad controller, and act as vehicles with which you can transfer savegames from one Xbox to the other.)
We're not interested in the HDD because accessing it would require opening the cover and fiddling with the hardware – this is supposed to be a software method, remember? The Memory Units, however, sound much more promising.
As it turns out, the "Memory Units" are actually just USB flash memory devices in disguise. Likewise, the slots on the controllers in which they plug into are just USB 1.1 ports with a proprietary connector.
Pick your poison
Now, we have two options:
- Connect a genuine Xbox Memory Unit to a PC, thereby fooling the PC into thinking the Xbox Memory Unit is a storage device.
- Entails copying save game (MechInstaller) to original Xbox Memory Unit -- uses non standard FATx format.
- Connect an ordinary USB memory stick to an Xbox thereby fooling the Xbox into thinking that this generic USB memory device is, in fact, an Xbox Memory Unit.
- Entails copying save game to semi-ordinary USB device -- not all devices work.
Neither option is a problem. You will either have to create or purchase one of the following USB adapter cables:
- USB port → Xbox controller
- Xbox controller port → USB Port
Both ways will work, but the latter one is by far and large the more popular.
FATX
There is still an added complication on our way: the filesystem on the Memory Units is FATX, Xbox's own proprietary format. It is possible to access FATX volumes on a PC with a suitable FATX-aware application program (or with suitable FATX drivers), but this isn't actually necessary in this case, as we have prepared a binary image of a FATX volume containing the MechInstaller savegames for you. This way it will be enough to simply copy the binary image to the flash device: you don't need to worry about the filesystem.
Copying the MechInstaller Files on a USB Memory Stick
If you have the MechInstaller on an Xbox memory unit already or know someone who has, you can skip the following section. If not you'll have to use a Linux, BSD or Mac OS X computer, a USB stick and an Xbox USB adapter cable to get the savegame onto your Xbox.
Download the MechInstaller image
Download the MechInstaller Image (http://sourceforge.net/project/showfiles.php?group_id=54192) hosted at SourceForge (http://sourceforge.net)
- If you have a less than 2000 blocks USB stick, use the image "MechInstaller-1.0-FATX-8MB-to-32MB.img".
- If you have a memory stick with at least 2000, but less than 4000 blocks, use "MechInstaller-1.0-FATX-64MB.img".
- If you have a memory stick with at least 4000, but less than 8000, use "MechInstaller-1.0-FATX-128MB.img".
- If you have a memory stick with at least 8000, but less than 16000, use "MechInstaller-1.0-FATX-256MB.img".
If the correct image didn't work, please try all other images one by one.
Copy the image to USB
Warning /dev/sda may be your hard drive if you have a SATA drive
You can use the following command, changing /dev/sda with whatever the location is of the USB Stick.
dd if=MechInstaller-1.0-FATX-64MB.img of=/dev/sda
Please enter the brand and type of the USB stick, as well as the size and the detected number of blocks into the Xbox USB Compatibility List - just click "edit" on that page.
Alternative to the procedure mentioned above (tested for Mac OS X 10.3):
- plug in the stick and find out what device it is by typing mount in the Terminal. The stick should appear as /dev/diskXsY where XsY is most certainly the highest number. It may also appear simply as /dev/diskX.
- Read the data on the stick by typing cat /dev/diskXsY > backup.img. You now have a disk image of your original stick as a backup. If you get an error saying that /dev/diskXsY is busy, use /dev/rdiskXsY (character device) instead of /dev/diskXsY (block device). The same technique can be used with the dd command.
- Write the downloaded images to the stick by typing cat MechInstaller-1.0-...-.img > /dev/diskXsY (or /dev/rdiskXsY). Try out which one works for you by verifying if the savegames appear in the xbox or not.
Nb: for Linux (Debian/Knoppix) need to remove usb-storage module with modprobe -r usb-storage in order to enable write of disk image. the command was: cat MechInstaller-1.0-FATX-128MB.img > /dev/sda Warning /dev/sda may be your hard drive if you have a SATA drive
- Once you copied the savegames to your xbox's hard drive you can restore the data on the stick by typing cat backup.img > /dev/diskXsY (or /dev/rdiskXsY).
- There is no need to be admin or root to do this, as you have full write permissions to the stick.
Windows 95/98/SE/ME/NT/2000/XP
(If you have a 32 mb stick, or Action Replay you can get the MechInstaller files here:
MechAssault Emergency Linux (http://www.xbox-linux.org/down/ar/MechAssaul_EmergencyL.zip)
MechAssault Install Linux (http://www.xbox-linux.org/down/ar/MechAssaul_InstallLin.zip)
MechAssault Restore Dashboard (http://www.xbox-linux.org/down/ar/MechAssaul_RestoreDas.zip))
For Windows users there is a great program called OzXMemory Stick Explorer (http://xbox-linux.sourceforge.net/down/ozxmemory.exe) (unofficial link (http://maxconsole.com/?mode=gotodownload&downloadid=211)), which can write the MechInstaller FATX images files to your memory stick. You will need a .rar extractor (http://www.rarlab.com/). The program has a GUI so it's quite easy to use.
- Connect the USB stick to your X-box goto memory then controller the x-box will erase and format the stick for you.
- Connect the USB stick to your PC and launch the program.
- Press Open 32MB image button and locate the 32MB FATX image file
- Press Write to xxx MB Stick button and the program should write the image file to the USB stick (you should choose the button corresponding your USB stick size). (If you choose the right size and but it doesn't work, try "Write to 32 MB Stick")
Now you have a USB stick that looks like an Xbox memory unit to the Xbox and contains the savegame that starts the MechInstaller.
Copying the MechInstaller Files to the HDD of your Xbox
In order to actually launch the MechInstaller, you will first need to copy the savegame files from the USB memory stick over to your Xbox HDD. Trying to launch them directly from the USB memory stick will not work.
Copying is done by using the savegame management features on the original Xbox Dashboard. You will need to navigate to your USB stick and copy each savegame on it one by one to your HDD. (You will get the "copy" option by moving to the right in the menu. The MechInstaller savegames should have little penguin icons on them.)
You can't copy the savegames as a group. You will need to select the individual saves, one by one. Move to the right in the menu in order to get options.
Backing up your Xbox Hard Disk Key
A USB keyboard will not work in the Emergency Linux
In case of problems, it is important that you have your Xbox hard disk key.
- Insert the MechAssault game
- Select "CAMPAIGN"
- Select "Emergency Linux"
- Get the key
-
telnet 192.168.0.3log in asroot, passwordxbox - type
xbox_tool -a - write down the hard disk key
- pass
-
Making the Xbox Linux-compatible
- Insert the MechAssault game
- Select "CAMPAIGN"
- Select "Install Linux"
Your Xbox will now be prepared. This will take some time. Afterwards, your Xbox is fully Linux-compatible, and there is an item "LINUX" in the Dashboard main menu which boots a minimal Linux system. Use an installation CD from http://xbox-linux.org to install a full Linux system.
Undoing the changes
You can always fully undo the changes by selecting "Restore Dashboard" in the "CAMPAIGN" menu of MechAssault. NOTE: from bagaudron54321@hotmail.com if this does not restore your dashboard, you may have to reimage your drive using XBOXHDM.
Removing the Savegames
You can delete the "Install Linux" savegame from hard disk, if you wish, it is not needed any more. If you don't plan to undo the changes, or if you can have the MechInstaller memory unit again when you wish to undo them, you can also delete the "Restore Dashboard" savegame.
Using your Modified Xbox
You can use the Xbox as before, you can play games and video DVDs (if you have the dongle), and you can run Linux. But you have to be cautious with the following:
- Video DVDs will not work if they are already in the DVD drive when you turn on the Xbox. Instead, insert them when the Dashboard is running.
- If you select "LINUX" on the Dashboard, a minimal Linux system with text mode only will start. After you install a full Linux system to E:, this will be booted if you select "LINUX".
- You can install a full Linux system by inserting an Xbox Linux installation CD (at the moment, only Xebian (Ed's Debian) works with this modification). As with video DVDs, only insert them when the Dashboard is running.
Creating a MechInstaller Xbox Memory Unit
With the savegames on your Xbox hard disk, you can easily copy them to a standard Xbox Memory Unit using the Dashboard, which you can give to your friends, so that they don't need a USB stick and the USB adaptor cable to prepare their Xboxes.
Troubleshooting
Can't see games
Read the main article at: Alternate Method for Preparation of USB Memory Stick
This problem is caused by an invalid image size. You will have to create your own images from the MechInstaller files. If your stick is detected and you can see the block counts it will work with XBOX Linux.
Flickering Screen
If your screen starts flickering after you select "Emergency Linux" and you can't see anything on the screen, then you have an Xbox manufactured since August 2003 (version 1.4+ Xbox)
- bagaudron54321 (mailto://bagaudron54321@hotmail.com)
- You may also have received updates to your kernel if you have used xbox live recently some times this can cause the flickering screen error. There is nothing wrong with that, a full Linux system such as Xebian will work without any problems, just the Emergency Linux shipped with MechInstaller does not support the new video encoders yet. Which also means you won't be able to use the method below to fix the blackscreen.
- mr.octopus (mailto://mr.octopus@mipgaming.com)
- Strictly speaking this is not 100% for sure. If your screen starts flickering after you select "Emergency Linux" then try selecting Install, the xbox will display an error and reset itself, (with orange light on power) allow it to reboot into MechWarrior, then select "Emergency Linux" and it should work, did with mine anyway and it's not a V1.4. If this doesnt work then the guys above are correct.
Boot CD errors
If you succesfully completed the software modification and burned an installation CD, however after booting the xbox with the CD many lines of text scroll by for an hour or so, then the screen turns staticy with a red "X" in the center.
Solution: Just shutdown the xbox before you see that red "X" and start the installation again, rechecking your steps.
Error Message
Also, some users noticed that Emergency Linux prints the line "sh: can't access tty: job control turned off" at the end. Just ignore this message...
- Mr.Octopus (mailto://Mr.Octopus@mipgaming.com)
- After googling it seems that this is an error/problem that some have had with BusyBox [dunno if you guys used that to do this or what, just a suggestion. =] If anyone had any information on this it would be very helpful. It seems that after the line is printed Emergency Linux halts. Any suggestions would be greatly appreciated.
- tapi (mailto://tapi@free.fr)
- Actually it doesn't halt, this is only an error message displayed during the shell startup, and may be due (i'm not sure of that) to missing tty devices (/dev/ttyx). But never mind, it doesn't harm that much, the shell works seamlessly.
USB Keyboard
No, USB keyboards cannot be used with MechInstaller 1.0 Emergency Linux yet. Just telnet connections work. A full Linux supports the use of a USB Keyboard.
Black Screen
If you get a black screen when selecting "Install Linux", your Xbox is very new (or your monitor (TV) is having a hard time displaying it. If you're using the HD-AV pack, try using the regular one. Or try it on a different monitor). Try this workaround:
Notice: If your Dashboard version is >= 1.00.5659.0, you need to downgrade the Dashboard first (See the section 'Install Linux' Fails below)!
- start MechAssault
- plug in Ethernet cable and connect it to another NIC (this is necessary for the upgrade option to become available)
- "Multiplayer" → "Xbox Live" → A button → "MechWarrior" → "Create new account" → Xbox will say it is restarting to dashboard and will update.
- start MechAssault again
- "Campaign" -> "Emergency Linux"
- upload fonts-2004-01-15.tar.gz (http://www.xbox-linux.org/down/fonts-2004-01-15.tar.gz) to ftp://192.168.0.3/mnt/E
- telnet 192.168.0.3 (user: root, pass: xbox)
cd /mnt/C/fonts tar xzf /mnt/E/fonts*.tar.gz mv XBox\ Book.xtf XBox\ Book.bak mv Xbox.xtf Xbox.bak mkdir /mnt/C/Linux cd /mnt/E/UDATA/4d530017/E8FF68C9193B cp -p default.xbe linuxboot.cfg vmlinuz initrd /mnt/C/Linux umount /mnt/C
- reboot and remove the game
This is the equivalent to "Install Linux". Your Dashboard will now include the menu item "LINUX".
'Install Linux' fails
If your Dashboard version is >= 1.00.5659.0, you need to downgrade the Dashboard first. Get the 500 MB image of a pre-5659 C: drive (/dev/hda51; this is legal if you have possessed an old version before, if not, we can't tell and it is up to you), upload it to ftp://192.168.0.3/mnt/E, telnet 192.168.0.3 (user: root, pass: xbox) and type:
umount /mnt/C cat /dev/discs/disc0/part51 > /mnt/E/backup-C.raw
Then if you have an old version image you can type
cat /mnt/E/Xbox_Dashboard_pre_Live_C_FATX_image.raw > /dev/discs/disc0/part51
If you don't have an image, but have the files then upload the file xboxdash.xbe and the directory xboxdashdata.hhhhhhhh (and all its contents) to /mnt/E and
mount /mnt/C cp /mnt/E/xboxdash.xbe /mnt/C/xboxdash.xbe rm -rf /mnt/C/xboxdashdata.xxxxxxxx cp -R /mnt/E/xboxdashdata.hhhhhhhh /mnt/C/xboxdashdata.hhhhhhhh
where xxxxxxxx is the old one and hhhhhhhh is the new one.
In case anything goes wrong, you can restore the old version:
umount /mnt/C cat /mnt/E/backup-C.raw > /dev/discs/disc0/part51
Alternatively, if you are using Kubuntu (or just Konqueror) to access your xbox over the network, you can type in
ftp://root@(networkAddress)/mnt/C
in the address bar. Network Address is the IP of the Xbox, and /mnt/C is the directory where the Dashboard files are.
Example: ftp://root@192.168.0.3/mnt/C
Log in to your xbox with
username: root password: xbox
Next, simply copy over all the dashboard files from your local machine to the /mnt/C folder in Konqueror. Boom, there you go. Now, just run the "install linux" option in MechAssault and it should work.
hint: if you can't find a copy of your dashboard files that you previously owned but forgot to back up, try googling the name of the dashboard file: xboxdash.xbe
Clock Loop Problem
Read the main article at: Clock Loop Problem HOWTO
It's best not to unplug the Xbox from power after the modification. If you do, you may experience the Clock Loop Problem. If the clock loop problem does occur, it does not mean your xbox is broken!!!
- bagaudron5432 (mailto://bagaudron54321@hotmail.com)
- If you cant get out of the loop by any of the ways listed in the Clock Loop Problem HowTO page refer to the image your hard drive section in this page, and downgrade your drive, or if you have a 5713 kernel the image will just restore your dashboard and get rid of the clock loop problem.
- thepureamrit (mailto://thepureamrit@gmail.com)
- If You get The Clock Loop Error -- Turn off your xbox → Plug in an ethernet cable to a powered device → Leave it standing

