psu logo back to main page

 

Running Linux on an Xbox

Note: I got fed up with some of the limitations of Xbox Linux and converted my old Athlon Desktop PC to a RAID equipped file server running Debian - much simpler in the end. However this guide still is useful, hence it's addition to the site.

 

One man and his Xbox

This page documents my efforts to put Linux on my old Xbox. The information is already out there on t'internet, if a little fragmented, so I thought I'd try and pull all of the info that I've found useful together in one place. Hopefully, if you are reading this and thinking of doing the same, you will find it helpful.

 

General Info

Before doing anything about modifying your Xbox, I would heartily recommend reading as much as you can of the information here as it contains pots and pots of useful info. The only downside were the annoying flashing adverts that give you a headache!

Good ones to start with are

Between these two guides, they cover most of the basics.

Also there is lots if good info on Xbox Linux, especially in the documentation section

 

Installing and programming the mod chip

I decided to go for a modchip because I'm an Electronics Engineer and there is something reassuringly familiar about wires and soldering - nice to get the project started on safe ground! After a bit of looking at UK suppliers, I bought an Xecuter 2.6 CE Mod Chip from these guys. They looked legitimate and I rang them up to ask about their stock levels and contents of the mod chip kit and they were helpful on both counts. Postage took about 2 days.

Xbox version identification here (mine is a v1.4). Install instructions are here.

Where to get the Bios from - a bit of a convoluted path - I used mIRC and Filezilla to obtain the X2 5035 BIOS files. To decompress the .RAR files, I used Rarzila Free Unrar which uses a very simple drag and drop interface.

You need to replace the Cromwell BIOS that comes supplied with the modchip - this is pre-programmed in because it is a legal BIOS (no copyright infirngements, etc.) and it allows the subsequent downloading of another BIOS that will allow you to run non signed apps.

Attempts to network flash it using the guides herefailed and the LED on the eject button Flashed Red And Green (FRAG) - a sign that summat is broke :'( boo hoo. Neither of the banks would boot FlashBIOS app any more so I had no way of re-programming the modchip - waaaah!

I was going to use the CheapLPC programmer but I bit the bullet and bought a Xecuter X2 programmer instead, again from Kanection. Boy they are getting their monies worth!

Initial confusion with the X2 programmer as the header on the board is not the same size as the hearder on the 2.6CE modchip. Looking at the pin header on the Xbox mainboard, it looked as if the top pins were not populated / not used and I knew from the instructions here that the bottom pin was a 3V3 supply. I gambled on the fact that these bottom pins should be the one that are connected to the header so I plugged the programmer in and attached the modchip - blue LED = success!

iXia is dead easy to use, follow the instructions here -
In the version that I used the blocks changed colour throughout the programming process. I dragged the 5035 bios file into each of the two blocks available and then hit "Erase", then "Program" when that operation was complete, followed by "Verify".

Turn on the Xbox with the drives re-attached and the "chip enable" switch in the Off position and it will turn on as normal. Cycle the power with the switch in the On positon and when the X logo is displayed there is a little "Xecuter rocks my box" logo at the bottom of the screen instead of the Microsoft logo that was there before.

Note: At this point, the Xbox will only work with original hard drive as it is still locked to the console. Plugging in a different HDD will result in the Xbox locking up during startup and giving an error code. You can insert the Xebian CD at this point and it will boot a live version of Xebian.

 

Installing Linux

I decided to install Xebian as I've already messed around breifly with Debian and have heard good things about it. This page gives you a brief overview of Xebian but the really meaty stuff is covered in the Xebian HOWTO page. This is all run by the Xbox Linux project.

I removed the existing 8GB HDD from the Xbox and put it on one side (should I ever decide to restore the Xbox to it's original condition) and put in an 80GB 7200rpm Western Digital hard drive instead. It is important to make sure that the larger HDD has its jumpers set to "Cable Select" otherwise the install will hang when creating the boot partition.

I downloaded and burned the Xebian ISO onto a 74-min Memorex CD-R (no reading problems observed with these discs and the Philips DVD drive) and stuck it in the DVD drive. With the X2 5035 bios loaded onto the modchip the live CD booted correctly into the Xebian front end.

Following the instructions here you open the Terminal and enter super user mode (su, pwd: xebian). Enter "XBOXLinuxInstall" (no quotes) and the startup script runs.

I chose the third option in the install menu that installs Xebian to the entire hard drive. Contrary to the instructions on the Xebain HOWTO, the install didn't prompt me for a size for the root partition, I assume it used the rest of the disk that wasn't the 256MB swap partition.

Default user details after installing Xebian

USER: live
PASS: live

USER: mce
PASS: mce

USER: root
PASS: xebian

Needless to say I have changed these ;-)

So I ejected the Xebian CD and restarted the box by issuing the shutdown -h now command in Linux. Restarted the box, epecting to get Linux up and running but no - it just loaded the flubber animation and then gave an error code because I didn't have the right HDD in place. Bum.

 

Auto-Booting Linux

So how do I get it to auto boot then?

After some reading up it became evident that I needed the Cromwell Bios to auto boot Xebian at startup.

Cromwell is available from the Xbox Linux website as a tar.gz file. I initially had some problems downloading it at work, for some reason it got converted from a tar.gx to a tar.tar which I couldn't open even with 7-Zip (now my favorite archive management tool) and Iceows. I tried downloading it at home and got the tar.gx file the first time. Dunno what happened there - I blame IT!

I programmed the BIOS with the 256k cromwell.bin image, replaced the modchip and re-started the box. The Cromwell BIOS screen immediately appears with the Hard Drive icon highlighted. Without further keypresses and after a few seconds, the words "Loading Linux" appears, the Linux boot process starts and it eventually boots into the Xebian front end.

Success!

 

Tools

This is going to be my tinkering box, however the TV only output is a bit hard to read. Plus I want to tinker on the laptop whilst watching the telly so network access is the way to go. As a result I'm using PuTTY for a command line interface over SSH and WinSCP for an SFTP interface.

 

Further Messing About

I wanted to access this box using PuTTY and WinSCP over SSH but it took ages for the Xbox to authenticate my ssh login request. This was causing problems with using WinSCP as it crashed whilst waiting for the login prompt to run. Following the advice here and added the IP address of the SSH client PC into the file /etc/hosts using vi (awful, vim and pico are so much better) and it worked straight away.

To edit a file using vi, do this ( "//" denotes the start of a comment)

vi /etc/hosts // or whatever your filename actually is
<ESC>
<i> // enter insert mode
alter the file
<ESC> to quit editing
:x to save and exit
vi /etc/hosts to check the edit has been saved OK

Alternatively, you can use WinSCP to edit the file, which is much easier!

I also disabled the autologon of the "live" user by editing /etc/inittab and commenting out the appropriate line.

 

NAS Box Setup

Kevin Herring has written an interesting looking guide on how to convert an Xbox into a NAS, LAMP server and BitTorrent manager.

 

How To: Convert your Xbox to a NAS - Part 1


Small Net Builder | Tom's Networking

This part of the guide details how to modify the Xbox using a modchip so that it is capable of running Linux. It also covers the installation procedure for Xebian and the replacement of the DVD drive with a second hard drive. I think my drilling is neater than his but his Linux skills make up for it :-P

When running with the DVD drive installed, I had my HDD set to Cable Select for the box to boot properly. Running two hard drives with Cable Select set results in the box not booting correctly - probably both hard drives are fighting for the bus. Instead, the second hard drive located in the DVD drive space needs to be set as Slave with the other drive (the one that Linux was installed on primarily) needs to be Cable Select to boot correctly.

 

How To: Convert your Xbox to a NAS - Part 2


Small Net Builder | Tom's Networking

The first recommendation in this part of the guide is to read this document Tutorial: Adding Additional Hard Drives in Linux which covers the basics of mounting, partitioning and formatting. For installing a blank HDD, there is part of the guide that covers installation of a new blank hard drive and installing a file system on there.

One point worth noting (this tripped me up) is that in the line that says...

now format it with:
mkfs -t ext2 -j -m 1 /dev/hdb1

...the character after the -m is a '1' (one) not an 'l'!

I didn't bother installing mysql-server, php4 or phpmyadmin yet because I'm not bothered about BitTorrent or a web server - I'll save this for the future. I'm also leaving the X-Windows interface in place because I might want to run a VNC server at some point.

The aptitude and the apt-get program is fantastic, It makes using Linux much easier than I had thought. :-)

 

How To: Convert your Xbox to a NAS - Part 3

Small Net Builder | Tom's Networking

 

RAID1 Setup

How do you create a RAID using Linux? This is the place to look.

 

Network Setup

I configured my Netgear ADSL modem / router / switch to assign a static IP to the MAC address of the Xbox

Fed up now, going to use my old desktop PC instead!