How to Install Debian GNU/Linux on your Xbox
by Edgar Hucek, 6 September 2002
My goal was it to bring Debian GNU/Linux to the XBOX. This Document describes the steps which are needed to install Debian on your XBOX.
What do you need?
a modded Xbox with a 10 GB hard disk ore an upgraded one
my Xbox Linux install CD from Sourceforge
a CD/RW wich works in your XBOX drive
a PC or Router which acts as internetgateway, for installing additional packages
!!! Warning !!!
It is highly recomended to make a backup of your XBOX harddisk.
How to start
After downloading the Xbox Linux install CD from Sourceforge you have to decompress the ISO image with bzip2 -d xbox-linux-install-..., the decompressed ISO image can be burnt with cdrecord or any other burning software which can use ISO images as source.
Turn on your Xbox on and wait until the Dashboard is loaded (I only tested with the Dashboard). Now you can put in the install CD into your Xbox. If your Xbox does not start from the CD, open the tray and close it again. If this does not help, you have to use another CD.
If you see Linux starting it's ok. On the login you can log in as user root with the password xbox. Now you are ready to make the needed partitions on your Xbox harddisk. Create /dev/hda1 starting at track 15534 (that's right after the last XBOX partition) with a size of 128 MB as a swap partition. Allocate the rest behind this partition (about 1.7 GB) as your root file system /dev/hda2. The root filesystem must be ext3 and on /dev/hda2 at the moment. (mkfs.ext3 /dev/hda2 ). If you have done this, you can start the little copyscript XBOXLinuxInstall. This script ask you two questions. On both you can press return. Now you can, if you are a smoker, smoke a cigarette or drink a coffee. After the script is finished, you are not far away. The next step is to put your xbox linux install CD in your desktop computer. On the CD is another iso image which is called hddboot.iso. This image you must burn onto another CD/RW. With this image you can start your bootstraped Linux from the hdd.
After the boot you can login (root/xbox) to your bootstraped system. Now you have to configure your network and default gateway. The network preconfiguration is :
IP : 192.168.0.2
Netmask : 255.255.255.0
Gateway : 192.168.0.1
Nameserver : 62.99.200.2 ( this is a public DNS )
Hostname : xbox.localdomain.local
The config files are:
/etc/hosts
/etc/hostname
/etc/network/interfaces
After changing your settings and applying it, it's time to run apt-get update. This will download a new package repository to your harddisk. Now you can run dselect and choose the packages you want. Some packages are preeselected. This packages are choosen by debian as default for a Basic system. You can change it ore leave it.
Congratulation your Basic system is running.
Notes on running X
On your harddisk there is also the Xfbdev X-Server. If you install the X-Window System, you must change two links after installation or your system will hang on the next restart. The first link is /etc/X11/X pointing to /usr/bin/X11/XFree86. This must be changed to /usr/bin/X11/Xfbdev. The next one is /usr/bin/X11/X which is pointing to /usr/bin/X11/XFree86. This must also changed to /usr/bin/X11/Xfbdev. Now you are ready to start your X-Window System with startx. If everyting is ok the X Server should come up.
Notes about the boostrap system
There are some changes to an original Debian system.
There are two additional directories. You can see /XBOXLocal and /usr/debian. This is my way i have choosen to make things work from CD. To the directory /XBOXLocal i have moved /etc, /home, /var, /tmp and /root. In the root directory these are only symbolic links to /XBOXLocal/{dirname}. To /usr/debian i have moved some bigger directorys from the original /var. The structure under /usr/debian is the same as the original. In the original locations i only make symbolic links. At boottime the initrd mounts an tmpfs to /XBOXLocal. The contents of /XBOXLocal from the rootfs is also in a compressed file on the boot CD which will decompressed after the mount of an tmpfs to /XBOXLocal. This makes it possible to hold temporary file and changeable files in the memory.
Some notes to the CD
With the CD it is possible to bootstraping a system to the harddisk, build an live filesystem on a CD or making a new bootstrap system. If you plan to make a live CD or a new bootstrap system from CD you need a kernel which supports transparent compression for the ISOFS filesystem, a new alpha version of cdrecord which supports compressed isofs and the zisofs-tools which can be found here:
http://www.kernel.org/pub/linux/utils/fs/zisofs/.
On the cd there is the file xbmake.tar.bz2. Decompress this to you harddisk. After decompressing you find a directory with the name xbmake. Under this directory there are several scripts und subdirs. Change to xbmake, mount the file rootfs on cd with mount -t iso9660 -o ro,suid,loop /{mountpoint of cd}/rootfs mnt and copy all files with cp -aR mnt/* xbox-linux/. Now you have the base for building new ISO images. You can change to xbox-linux make a chroot and install additional software to the base, changing the preconfiguration or what you want. After making your changes exit the chroot and change to the directory xbmake. Now run the following scripts to cdreate a compressed roots and a new bootcd.
./create_rootfs.sh
./make_iso.sh
Now you find a new ISO image under iso/ which can burnt to CD.