[dundee] Xboxes etc.

Nistur nistur at googlemail.com
Fri Dec 7 10:36:16 GMT 2007


First of all, sorry Arron for not turning up, I was intending to do a 
quick flash talk on compiling as you suggested and maybe let it lead 
onto LFS if I didn't have enough to talk about (./configure && make && 
make install wouldn't take 10 minutes!) However I only realised after 7 
what the time was.
I've been working on getting Linux onto my XBox (procrastinating on 
coursework) I had quite a few hiccups but I think I have almost got it 
sorted. I'm going to give as brief an account as I can and if anyone 
manages to read it (I doubt it) I would like to know if there is a 
simpler way of doing this as I think I would prefer to kick myself and 
know for next time.
Firstly, background. The XBox is more or less a standard PC with a 
Celeron 733MHz processor, The Harddrive is normally 10GB, but microsoft 
planned it for 8GB so in the good ol' MS way, they ignored the spare 
2GB. The exploit is in a Microsoft Game Studios game (so not even a 
cheap third party game) and lets you run unsigned code when selecting 
saved games. Linux installer save games have therefore been created and 
can be downloaded from sf.net.

<prologue>

Ok, so, first hurdle was my XBox was too new, I ended up copying the "C" 
partition from my friend's XBox to downgrade the "dashboard" which 
worked fine using the MechInstaller Emergency Linux savegame. Then I 
installed Linux onto my own system. This gave me a very basic busybox 
system. Looking on xbox-linux.org told me that there are quite a few 
xbox created derivatives, but only one liveCD will work on a softmodded 
XBox, Xebian by name.
I downloaded the newest Xebian bootdisk, burnt the 50MB image to a DVD 
(Xbox drives can have issues with CD-Rs but seem happier with DVDs) and 
booted. Looked good, because it was very specific hardware and a base 
install there wasn't much in terms of an installer, just hostname 
selection, ip address and the like and hit go and it copies the file, 
rebooting and selecting the Linux item on the dashboard gave me my very 
own debian lovechild to care for. That didn't last. I have used debian 
derivatives very little and I also wasn't too fond of apt-get, although 
synaptic was a very nice frontend. I just wanted my Arch back.

</prologue>
<scene1>

Before I did anything I obviously checked that it would be possible to 
do what I wanted, I checked compatible kernels and the like and 
everything up to 2.6.16 is supported, although I think the only thing 
that the xbox patches do is enable FATX which the XBox uses, out of 
spite I guess. Otherwise things seemed to be fairly standard.
First idea was then to boot the LiveCD and mount the HDD, delete 
everything on it and install pacman and some basic packages, chroot and 
install the packages I wanted (leaving kernel out until I had a base 
system) thankfully pacman files are just tarballs of the binaries and 
sometimes an install script if things have to be done post install (or 
pre install or post removal or pre...) so the first bit wasn't a 
problem, I got pacman and dependencies installed manually. Then I hit a 
problem. Only then did I notice that the Xebian disc was booting a 
2.4.31 kernel. chroot was telling me "FATAL: kernel too old" Lovely... 
scouring the web told me that pacman can infact install to a different 
root (there's even pacman.static for installing Arch from other 
distros...) So I try that, I update pacman from within itself (I thought 
it was a good idea that it knows of it's own existence) and... after 
symlinking of cache directories, config files etc from the destination 
back to the host I got it working. Great, smooth running from now on. Nada.
Next I tried to install the base arch system and it downloaded it fine, 
but then when it came to installing it it complained about libc6.so or 
something, great glibc was too old for binaries to work to run the 
install scripts...

</scene1>
<scene2>

Trashing that plan I thought about installing LFS to it from the liveCD 
and then installing pacman and starting from there, That idea was 
quickly thrown out when I realised all versions of LFS that would work 
with a 2.4 host also gave 2.4 systems... I then though... "Ah, I know 
it's hideous but I'll install Xebian, then pacman and overwrite Xebian 
files with Arch ones and deal with the consequences after"
I then got the same "FATAL: kernel too old" when trying to run pacman 
from within Xebian...
Next (read: after messing things up multiple times and reinstalling a 
couple) I tried updating Xebian to get the newest kernel glibc etc it 
could offer and therefore make life simpler (although still hideous as 
I'd still be overwriting files one at a time)
I got pacman to work, that wasn't a problem then, when I tried 
installing base again, it gave the same glibc error. I guess I oculd 
have unpacked glibc manually,then pacman ontop of it, but things were 
getting messy enough as it was.

</scene2>
<scene3>


SPARSE FILES - WOO
Ok my final (and so far successful) attempt began. The plan:
Install fresh Xebian.
Update to brand spanking new kernel
create a sparse file on a seperate partition and format ext3
mount
install to new filesystem
Boot LiveCD
Format HDD
copy new filesystem from sparse file to HDD

Everything has so far been good apart from one thing... the kernel I 
downloaded (I didn't feel in the mood at that point to possibly have to 
compile 2 kernels that night) the guy had been using it for an XBox 
server, and had erased the entirety of the original XBox system so he 
hadn't needed FATX support. Which left me with ~2GB of room for Xebian 
and the sparse file... well, I gave it a go and so far I'm good, I'm 
just on compiling the kernel, which I'm going to try and do through ABS 
(Archlinux Build System) so I can get it recognised by pacman and I 
won't have dependency issues and it then tries to install a "standard" 
kernel

</scene3>

Congratulations, if you've really got this far you are probably more 
bored than me...
Does anyone have any suggestions how I could have done this in a shorter 
way? Saying "Not bothering to begin with" "Stuck with Xebian" or the 
like doesn't count :P

Nistur



More information about the dundee mailing list