Gentoo Linux On An XBox
Why We're Here (in the smaller sense)
This is my guide to installing Gentoo Linux on an Xbox. Some of this I figured out myself, the rest was from helpful people like ShALLaX and dmp in #xbox-linux on irc.oftc.net. I wrote these instructions because everything I found on the net was out of date, or otherwise not applicable. The Xbox is basically a PC, once you get past the modchip/BIOS issues. Too many pages assumed I was already some l33t Xb0x h4x0r and knew what all the magic words were, how to do the Mech Assault/007 mod, etc. Phooey on that. I wanted something a little more prodedural that didn't make too many assumptions, and I figured other people might also. So here we go...
First, I don't really know what all this Mech Assault/007 mod is about, I don't know about EvolutionX (other than the coarsest idea), and I sure don't know (and don't care) about worrying about E: and F: and whatever partitions. I have no interest nor intention of playing games on the modified Xbox. I want to run Linux, and if I want a game box, I'll go buy another one for that. Servers are meant to serve, not bounce up and down like yoyos. First thing I do is unlock the HD, yank it out, label it with the Xbox serial number, put it on the shelf, and drop in a 120GB or 250GB HD (I like the Maxtor 7Y250P0). Although I'm turning the Xbox into a dedicated Linux box, I can always put the old HD in, set the Xenium to boot into the retail BIOS (or take it out altogether), and it's restored to it's original Xbox functionality.
There are a number of ways to do this. Some are legal (using a modchip, Cromwell BIOS, etc), and some are not (EvolutionX). I decided to use a modchip because I'm lazy. That, and there's far less risk of turning your box into a nice 7lb paper weight. I chose the Xenium ICE, for no particular reason. It's easy to install, it's east to use, etc. I ordered it from Divineo for $46.95 USD, plus $5 shipping.
What you need:
- Xenium ICE with 2.0.1 or better firmware
- Cromwell BIOS from SourceForge
- Bootable Gentoo Live CD (*1)
- Network connection to the internet (*2)
- Television connected to the Xbox
- USB keyboard (not absolutely required, helps a lot)
- SSH client for your PC (putty, ssh, openssh, etc)
- A lot of patience
*1 - If the link to the Live CD is broken, find the latest version on the download page at www.xbox-linux.org
*2 - If you're a cable modem user, and don't have a firewall, you're going to have trouble. That's beyond the scope of this document. You'll want to have your PC on your local network, in addition to the Xbox. If this can't be done, I'd advise pulling the plug on this. If you're on dial-up, you're about to discover a whole new world of agony. Gentoo downloads a LOT of data. Dial-up doesn't really cut it.
VERY IMPORTANT: As of 2004/10/27, v1.0 Xboxen with Xenium ICEs can only use Cromwell BIOS 2.30 and BELOW. This limits you to using 2.4 verison kernels. Cromwell 2.31 and higher changed the memory map so that 2.6 BIOSs can be be used. The problem with the Xenium on v1.0 boxes is believed to be a CPLD issue. The problem shows up when trying to start the 2.31+ BIOS. The box will power cycle twice, and then FRAG (Flashing Red And Green eject button). This may or may not be fixable. If you have a v1.1 or higher XBox, you won't have to concern yourself with this issue.
Install the modchip per the instructions. There's no point in duplicating their easy install instructions, so just open the box up, install it, and get the box booting. Once it boots, follow the instructions to put the retail BIOS onto the Xenium, then back-up the EPROM. Then use the Xenium menu to unlock the HD, shut the box down, take out and label the HD, and install your replacement HD.
Getting Cromwell on to the Xenium
I'd recommend configuring the Xeniums webserver at this point. You can use the webserver to upload the Cromwell BIOS to the Xenium, and avoid having to burn a DVD, or find a USB memory stick (most any should work, like the Sandisk Cruzer, Lexar Jump drive, etc. I really like these PQI iSticks). If you're not using DHCP, you can use the same IP address you're planning on using for the Xbox later.
If you're not going to use the Xenium's webserver, copy the Cromwell BIOS to a CD-RW or USB memory stick, making sure it's named 'image.bin'. If you use the webserver to load the BIOS, the course of action is pretty obvious. Point the PC browser at the Xbox's IP address, select 'Add BIOS', choose the Cromwell BIOS file, assign a name, select a LED color, and upload it. If you're using the CD-R/DVD or USB stick (in which case you'll need to put the USB adapter that came with the Xenium in one of the USB (game controller) connectors. Using the 'Launch Menu', select 'Add Item', select the D: drive if using a CD or DVD, or the H: drive for USB, then select the 'image.bin' file. Assign a name ("Cromwell 2.32" or something. Note that the left Xpad trigger toggles case and the right trigger selects the punctuation menu) and a LED color.
If you're using the webbrowser, select the 'Launch BIOS' option, and select the Cromwell BIOS. If you're using the CD-R/DVD, use the Xpad 'B' key to backout to the main Xenium menu, select 'Launch Menu' again, select the Cromwell BIOS, and make sure it boots. You should get a Cromwell sign-on screen, and see several icons at the bottom, of which the CDROM drive will likely be selected.
At this point, the Xenium has a BIOS loaded, you're booting into it, and all is well. If you're brave, you can screw the drive carriers back down, put the cover back on, install the case screws, and reapply the rubber feet. If you're a pessimist, well, you might just want to wait until you've actually got Linux booting.
Booting the Live CD
Now burn the Gentoo Live CD ISO to a CD-R or DVD. If you have a Thompson drive, my experience is that it boots a DVD more reliably than it does a CD-RW. Your results may vary. In any case, be sure to burn the image as an ISO, and not as a file. Most people either seem to use Nero under Windows, or cdrecord or k3b under Linux. If you're not sure about the difference between the two, read the help built into the programs, use Google to search, or (as a last resort) hop on IRC and ask in #xbox-linux on irc.oftc.net (if you really don't know how to do this, it's questionable if you should be trying to install Linux. Don't be trying to do this because you want to be l337 and tell people "Yah, d00d, I h4x0r3d my xbox, and inst4ll3d Lunix!". You'll look like an ass).
At this point, you should be able to place the Live CD CD-R or DVD in the drive, turn on the Xbox, launch the Cromwell BIOS, and watch it eject the DVD, then ask you to insert the CD with the bootable image. This is because at least up to 2.32, Cromwell is still a little braindead, and doesn't actually check to see if any media is present. So give the drive tray a kick so it sucks it back in, either wait a few seconds, or press the 'A' key, and if all went well, you should see Linux start to boot. If it doesn't, you're going to need help. This document (like oh so many out there) assumes everything is going right, and if it doesn't, well, you're boned. If you hit that point, the best suggestion is either to keep tinkering (try different media, these drives are picky, especially the Thompsons), or hop on IRC and ask for help (don't, however, expect instant results. The channel is slow, and there may not be anyone around, in spite of the 40 people logged in. There are plenty of lurkers, and only a few talkers. Also, please make sure you can spell, and don't pull that MSN crap of "hepl! r u able to help me? it doesn't work." Speak English spell words, and try not to look like an AOL luser).
So, it looks like you're booting, and you've problably got a shell prompt on the television. If your using DHCP to assign addresses, what you probably want to do is skip the whole television/USB keyboard thing, and use SSH to connect to the Xbox. This helps immensely, as you can actually read the screen, and probably have a good bit more screen real estate, instead of trying to read 80x24 on a 640x480 television. If you're not using DHCP, then you can use the following paragraph on how to assign the IP address to the Xbox from the keyboard, then SSH in. If you're not going to SSH into the Xbox, you'll be doing the same commands, you'll just be squinting a lot more to read the poorly rendered text.
Manually assigning an IP address: Dunno, we'll have to try this when we bring up the next box. srikthx :) At this point, you should be able to SSH in from the PC. Note that every time the Live CD boots, you get a new fingerprint. This means you'll need to edit your known_hosts file (~/.ssh/known_hosts on Linux), delete the Xbox's IP address line, and accept a new fingerprint. The root password is 'xbox', so you'll "ssh root@<ip address>", and use enter 'xbox' when prompted for the password. If you can't do this, you need to determine if you've got networking issues. If you do, they'll come back to haunt you in a little while.
Starting the Linux install
At this point, we're going to switch formats. Most of the text here is directly taken from the Gentoo x86 Quick Install guide (last located here). If you've installed Gentoo before, this of course will be familiar. If you haven't, I'm probably making some assumptions that I shouldn't, and you need to email me with the clarifications.