home'XBOX

Linux@XBOX




How to install an initial bootable Linux system on your XBOX
- tutorial and files by conFB

Preface

This is a small howto on how to install an initial bootable Linux system to start modding your Xbox from, without the need to buy any fancy equipment like mod chips, memory sticks, usb stuff or games like MechAssault or Agent Under Fire.

You'll need:

  • Linux bootdisk available through this site
  • knowledge of the exact type of network interface card (nic) on your PC
  • Torx 10 and 20 screwdrivers to open your Xbox
  • a bit of Linux knowledge never hurts :-)

    bootdisk-extractor.exe  (Linux bootdisk, including disk writer tool (Windows))
    nicdrivers.zip  (Linux network interface driver package)

Warning

  • You might not be able to run any Xbox games anymore after finishing this modification!!!!
  • Warranty will be void, because you have to open your Xbox!!!
  • Use all the information on this guide at your own risk!!!!
  • The initial Linux system, you are going to install on your Xbox, will only boot as long as the Dashboard clock is correctly set. Make sure to set it before you start with this guide and do not disconnect your Xbox from power for more than a few minutes until you've finished with whatever you want the initial Linux system to do (I've only used it to flash cromwell).

1 Prepare Linux bootdisk

The bootdisk is a MSDOS formatted disk. It allows easy access to all the named config files and nic driver files through any MSDOS/Windows operation system and also from Linux using the VFAT filesystem.

1.1 Copy nic drivers to the disk

Your first task is to copy nic drivers for your nic into the modules drawer of the bootdisk. If you own a RTL8139 based card (RealTek, quite common low price 10/100 MBit card in Germany), you can skip this part, because the disk is set up for this particular card already. Otherwise delete mii.o and rtl8139.o from the modules drawer on the bootdisk, then find the files you need for your nic from the nic driver list below and copy these files from the nicdrivers.zip archive to the modules drawer of the disk. Then edit the file nic.sh in the cfg drawer of the disk and change the insmod parameters to match the files, you've just copied into the modules drawer. Delete one or insert more insmod commands if necessary. The order of the insmod commands is important so make sure to use exactly the same order as shown in the nic driver list below.

1.2 nic driver won't fit on the bootdisk

In that case delete all files in the modules drawer of the bootdisk and delete nic.sh in the cfg drawer of the bootdisk. The disk will then boot without any Ethernet support. You may then load your nic drivers manually from a second disk your use the startup.sh file in the root directory of the bootdisk to do it. Knowledge of Linux and shell scripting is required for this. To mount any MSDOS formatted disk, enter "mount /mnt" on the console after the bootdisk finished booting.

1.3 Configuring IP address and Internet access

Edit network.cfg in the cfg drawer of the bootdisk. IP sets the IP address the Linux system on the boot disk will use after booting. Optionally you can configure Internet access for the Linux system on the bootdisk, either through an Internet router of you have one, or through a broadband internet connection using the PPPoE protocol like T-DSL in Germany for example. To be able to use an Internet connection set INTERNET=yes in network.cfg and then set INTERNET_TYPE=ROUTER if you'd like to connect through an external router or set INTERNET_TYPE=PPPoE to dial an Internet connection directly from the Linux system of this bootdisk.

1.3.1 Internet access through external router

Set INTERNET_TYPE=ROUTER in network.cfg as described above, then enter the IP address of your router under GATEWAY and enter the IP address of the DNS server to use under DNS.

1.3.2 Internet access through PPPoE

Set INTERNET_TYPE=PPPoE in network.cfg (case sensitive), then enter your username for the Internet connection under USER, enter your password under PASS and set the MTU to the correct value for your Internet service provider. For Germany that's MTU=1492 for T-Online and other service providers that use the backbone of Deutsche Telekom and 1454 for all service providers using the Telefonica (ex Mediaways) backbone. Internet connection dialup will occur automatically, when you send any packets to any Internet address, disconnect will occur after 5 minutes of inactivity. Keep that in mind if you have to pay your Internet service provider by the minute!!!
1.3.2.1 Using the Linux system on this bootdisk as an Internet router
You can even use this bootdisk as an Internet router. Set any gateway and dns (or nameserver) parameters on your client PCs or Xboxes to the same IP address, you've entered under IP in the network.cfg file of the bootdisk. This can also be used to connect several Xboxes to the Xbox live service simultaniously through a single Internet connection.

2 First boot of the bootdisk

Try to boot from the bootdisk. Make sure there are no error messages at the end of boot process. If there are, something probably went wrong with nic configuration in step 1, so doublecheck everything. If you see any "Unresolved symbol" messages, you've probably forgot a nic driver module or loaded them in the wrong order. Fix all error messages, do not continue until all errors are fixed, otherwise some or all of the features described in the next steps won't work.

3 File access methods supported by the Linux system on the boot disk

3.1 ide hard drive partition mount

You can mount ide harddisk partitions from the Linux system on the boot disk:
mount /dev/discs/discX/partY /mnt
File systems supported are ext2, ext3, FAT16 and FAT32.

3.2 Network file system (nfs)

If you have more than one PC, you can run a nfs server on one of them and the bootdisk on the other:
mount -t nfs -o nolock nfsserver:path /mnt
## Don't forget the nolock parameter, if you do, mount will hang.

3.3 internet/wget

Connect the bootdisk Linux system to the Internet as described in step 1. Use the wget command to access any http or ftp downloadable files on the Internet:
wget -O dstfile url
You have to know the exact URL of course.

4 Get and extract all needed files

4.1 Xbox dashboard exploit

On the Internet google for a mailing list message with "When full disclosure is the only way" in the subject. Attached you'll find a file called dayX.tgz. It might be base64 encoded, so you'd have to base64 decode it first. dayX.tgz contains three files: ernie.xtf, bert.xtf and default.xbe. Extract all of them using gzip and tar and put them in any location you will be able to access from the Linux bootdisk later.

4.2 Initial Linux system

Get MechInstaller-1.0-FATX-Images.zip from http://sourceforge.net/project/showfiles.php?group_id=54192 and extract MechInstaller-1.0-FATX-8MB-to-32MB.img from the zip file. Boot the bootdisk. Use any of the above described file access methods to access to file MechInstaller-1.0-FATX-8MB-to-32MB.img. Mount it via the loop device:
mount -t fatx -o loop MechInstaller-1.0-FATX-8MB-to-32MB.img /mnt
Go to the 4d530017/E8FF68C9193B subdirectory and copy vmlinuz, initrd and linuxboot.cfg to the same location as you put ernie.xtf, bert.xtf and default.xbe in step 4.1. You can also try the ernie & bert files you you find in the 4d530017/E8FF68C9193B directory, I don't know if they'll work too. They didn't work for me, but that might have been because I didn't know about setting the Dashboard clock at the time.

5 Open your Xbox and remove the hard drive (HDD)

There are six screws hidden on the bottom side of your Xbox: One under each foot, one under the warranty sticker and one serial number sticker. Unscrew all of them using a Torx 20 screwdriver, then lift up the top of your Xbox. To remove the hard drive, you have to remove the hard drive's plastic tray first. Take a look on how the Xbox hard drive is jumpered, jumper it to primary master. Mine was originally jumpered to cable select.

6 Copy the initial Linux system to your Xbox HDD and make the Xbox boot it

Reconnect the removed hard drive to your Xbox and boot into the Dashboard. Make sure, you have a Xbox live enabled Dashboard, otherwise you may experience different directories on the Xbox C: (system, part51) partition as described below. Disconnect the IDE cable from the Xbox hard drive while the Xbox is in the Dashboard. Be very careful with this, try not to shake the hard drive while doing it to prevent damage to it through a head crash. Leave the power cable from the Xbox connected to the hard drive. The Xbox hard drive mustn't power down during this hot-swap, otherwise you have to start over. On your PC remove primary master IDE drive from your IDE cable. If this is your PCs hard drive (it usually is) and you'll need it to access the files prepared in step 4, reconnect it to some other IDE port. Start booting the boot disk. Once you see the LILO prompt, but before the kernel booting messages appear, connect your Xbox hard drive to the primary master IDE port of your PC.

ONLY THE PRIMARY MASTER IDE PORT WILL WORK!!

After your PC finished booting from the bootdisk and if there were no error messages, you can now mount your Xbox system partition (drive C:)
mount -t fatx /dev/discs/disc0/part51 /mnt
Also mount either your PCs harddrive partition or nfs server on some other mount point. Move your Xbox font directory out of the way and make a new one:
mv /mnt/fonts /mnt/fonts.old mkdir /mnt/fonts
Copy ernie.xtf and bert.xtf to the new fonts directory:
cp ernie.xtf bert.xtf /mnt/fonts
Copy default.xbe, linuxboot.cfg, vmlinuz, and initrd to /mnt (the root directory of the Xbox E: partition):
cp default.xbe linuxboot.cfg vmlinuz initrd /mnt
Unmount the Xbox partition:
umount /mnt
Power down both Xbox and PC and swap the Xbox HDD back to the Xbox. Boot up the Xbox and it should boot the initial Linux system now. At this point you should still be able to run any Game CDs. You can now either tailor the inital Linux system to your needs or use raincoat and cromwell to transform your Xbox to a Linux only system at which point Game CDs will not work any longer!!. See http://xbox-linux.sourceforge.net for more information. The initial Linux system has IP address 192.168.0.3 and will accept telnet connections on port 23 (root/xbox) or ftp connections on port 21.

7 nic driver list

NIC driver files

3COM EtherLink 3c501                            3c501.o
3COM EtherLink II 3c503                         8390.o, 3c503.o
3COM EtherLinkPlus 3c505                        3c505.o
3COM EtherLink 16 3c507                         3c507.o
3COM EtherLink III 3c509/3c529/3c579            3c509.o
3COM ISA Fast EtherLink 3c515                   3c515.o
3COM Vortex/Boomerang 3c590/3c900 series        mii.o, 3c59x.o
AMD LANCE and PCnet (AT1500 and NE2100)         lance.o
SMC WD80*3                                      8390.o, wd.o
SMC Ultra                                       8390.o, smc-ultra.o
SMC 9194                                        smc9194.o
Racal-Interlan (Micom) NI 5010                  ni5010.o
Racal-Interlan (Micom) NI 5210                  ni52.o
Racal-Interlan (Micom) NI 6510                  ni65.o
T1700 (Fujitsu 86965) ISA                       at1700.o
DEPCA, DE10x, DE200, DE201, DE202, DE422        depca.o
HP 10/100VG PCLAN (ISA, EISA, PCI)              hp100.o
Cabletron E21xx ISA                             8390.o, e2100.o
EtherWORKS 3 ISA (DE203, DE204, DE205)          ewrk3.o
EtherExpress16 ISA                              eexpress.o
Intel EtherExpress Pro/10 (i82595)              eepro.o
HP PCLAN+ (27247B and 27252A) ISA               8390.o, hp-plus.o
HP PCLAN (27245, 27xxx) ISA                     8390.o, hp.o
Intel Professional Workstation/panther 82596    lp486e.o
ICL EtherTeam 16i/32                            eth16i.o
NE2000/NE1000 and clones, ISA only              8390.o, ne.o
AMD PCnet32 PCI                                 mii.o, pcnet32.o
Adaptec Starfire/DuraLAN                        starfire.o
Ansel Communications EISA 3200                  8390.o ac3200.o
Apricot Xen-II on board Ethernet                82596.o
IBM Etherjet, cs89x0 based Cards                cs89x0.o
DECchip Tulip (dc21x4x) PCI                     tulip.o
Generic DECchip & DIGITAL EtherWORKS PCI/EISA   de4x5.o
(Digital DE425, DE434, DE435, DE450, DE500)
Digi International RightSwitch SE-X PCI/EISA    dgrs.o
Davicom DM910x/DM980x                           dmfe.o
Intel EtherExpressPro PCI 10+/100B/100+         mii.o, eepro100.o
                                                or e100.o
Myson MTD-8xx PCI                               mii.o, fealnx.o
National Semiconductor DP8381x series PCI       natsemi.o
NE2000 and clones, PCI only                     8390.o ne2k-pci.o
RealTek RTL-8139 C+ PCI                         mii.o, 8139cp.o
RealTek RTL-8139 PCI (incl. RTL-8129/8130)      mii.o, 8139too.o
SiS 900/7016 PCI                                mii.o, sis900.o
SMC EPIC/100 (EtherPower II) PCI                mii.o, epic100.o
Sundance Alta                                   mii.o, sundance.o
TI ThunderLAN                                   tlan.o
Toshiba TC35815                                 tc35815.o
Via Rhine                                       mii.o, via-rhine.o
Winbond W89c840                                 mii.o, winbond-840.o
Alteon AceNIC/3Com 3C985/NetGear GA620          acenic.o
D-Link DL2000                                   dl2k.o
Intel PRO/1000                                  e1000.o
National Semiconductor DP83820                  ns83820.o
Packet Engines Hamachi GNIC-II                  hamachi.o
Packet Engines YellowFin Gigabit                yellowfin.o
SysKonnect SK-98xx                              sk98lin.o
Broadcom Tigon3                                 tg3.o
3COM 3c589 PCMCIA                               3c589_cs.o
3COM 3c574 PCMCIA                               3c574_cs.o
Fujitsu FMV-J18x PCMCIA                         fmvj18x_cs.o
NE2000 and clones, PCMCIA only                  8390.o pcnet_cs.o
Asix AX88190 PCMCIA                             axnet_cs.o
New Media PCMCIA                                nmclan_cs.o
SMC 91Cxx PCMCIA                                mii.o smc91c92_cs.o
Xircom 16-bit PCMCIA                            xirc2ps_cs.o
Xircom CardBus (DEC 21*4*-based chips/cards)    xircom_cb.o
Xircom Tulip-like CardBus (DEC 21*4*-based)     xircom_tulip_cb.o
STRIP (Metricom starmode radio IP)              strip.o
AT&T WaveLAN & DEC RoamAbout DS                 wavelan.o
Aironet Arlan 655 & IC2200 DS                   arlan.o, arlan-proc.o
Aironet 4500/4800                               aironet4500_core.o, 
                                                aironet4500_proc.o, 
                                                aironet4500_card.o
Cisco/Aironet 34X/35X/4500/4800 ISA & PCI       airo.o
Hermes chipset 802.11b (Orinoco/Prism2/Symbol)  hermes.o orinoco.o
Hermes PCMCIA                                   hermes.o, orinoco.o, 
                                                orinoco_cs.o
Cisco/Aironet 34X/35X/4500/4800 PCMCIA          airo_cs.o
Aviator/Raytheon 2.4 MHz                        ray_cs.o
Xircom Netwave AirSurfer                        netwave_cs.o
AT&T/Lucent Wavelan                             wavelan_cs.o
Aironet 4500/4800 PCMCIA                        aironet4500_core.o, 
                                                aironet4500_proc.o, 
                                                aironet4500_cs.o
all rights reserved. any commercial exploitation requires written permission of the respective owner unless otherwise noted. Impressum