Xebian HOWTO
From Xbox-Linux
The Xbox-Linux website is also available in: French |
Credits
- based on the original Ed's Debian HOWTO by Jukka Aho, 27 January 2003 (Updated 31 January 2003)
- updated by Thomas Gierlinger, 25. September 2004 (Updated 17. July 2005)
- further expanded, updated and wikified by Jukka Aho in January 2006
Introduction
What is Xebian?
Xebian is actually two things packaged on a single CD:
- On one hand, Xebian is a bootable install CD that allows installing a standard Debian GNU/Linux distribution (http://en.wikipedia.org/wiki/Debian) on the Xbox HDD. The installation is accomplished by running a special install script from within the live CD system (see below.) Afterwards, Xebian can be booted directly from the HDD and used just like you would use an ordinary Debian installation on a desktop PC. For example, you can install applications from the standard Debian package repository (http://packages.debian.org/unstable/) using apt-get.
- On the other hand, Xebian is a Knoppix-style live CD (http://en.wikipedia.org/wiki/Live_cd) which you can use simply by popping the disc in the DVD drive. It boots into a preconfigured graphical desktop environment. There is a selection of preinstalled applications, including a web browser, media players, an ssh client, an ftp client, text editors, and the like. You can use all these applications directly from the Xebian CD, without installing anything on the HDD.
The choice is yours: you can either use Xebian as a live CD (with the typical live CD limitations, such as slow disc access and inability to save your modified configurations or update the bundled software) or as an install CD for a full-fledged, HDD-based Debian GNU/Linux system.
What Xebian is not
Xebian is not a stand-alone, independent Linux distribution. Rather, it is an "xboxified" configuration built on the top of a standard Debian installation. When you're using Xebian, what you're really actually using is Debian – the Xebian author has just preconfigured and tweaked a standard Debian installation so that it works nicely on your Xbox.
For example, if you want to keep your Xebian system up-to-date or install new applications, you will have to rely on the standard Debian i386 package repositories. Xebian does not offer package repositories on its own – at least not for anything else than strictly Xbox-related things.
The same goes for documentation: Xebian does not offer any documentation on its own beyond what is needed to understand the Xbox-specific pecularities of the installation. You will have to rely on the standard Debian documentation (http://www.debian.org/doc/) for learning more about common day-to-day tasks – such as system administration, installing and updating applications, or understanding the underlying scripts and configuration files.
Finally, if you have problems or questions about those aspects of Xebian that do not have any direct relation to the Xbox, the correct place to ask is the Debian irc channels, newsgroups, mailing lists, and forums – not the Xbox Linux irc channel, newsgroups, or mailing lists. The Xbox Linux people will not shun you away, but you'll get better and more accurate answers about generic Debian usage directly from Debian-related resources.
Xebian versus a standard Debian installation
An HDD-based Xebian installation is a standard x86 Debian system. The directory structure is the same, the packages are the same, the binaries are the same, the configuration files are the same, the package repositories are the same. The differences lie in...
- Installation: Xebian does not use the standard Debian installer (http://www.debian.org/devel/debian-installer/). Instead, there is a custom install script that helps with partitioning and basically just copies a snapshot of a preconfigured ("xboxified") Debian system from the CD to the HDD.
- Bootloader: The boot process, partitioning schemes and file systems of the Xbox differ from a standard PC so common bootloaders (such as Grub or LILO) cannot be used. Instead, Xebian makes use of the common Xbox Linux bootloaders, which include xbeboot.xbe (http://cvs.xbox-linux.org/viewcvs.py/xbox-linux/xbeboot/) (a plain XBE bootloader), xromwell.xbe (http://cvs.xbox-linux.org/viewcvs.py/xbox-linux/cromwell/) (the XBE version of Cromwell), and Cromwell (a flashable replacement firmware for the Xbox with a built-in Linux bootloader.)
- The kernel and the kernel modules: The Xbox needs a special kernel with some Xbox-specific patches and drivers. For example, the system timer ticks at a different rate than on an ordinary PC.
- Framebuffer and X Server configuration: The Xbox has a video encoder (aka "a TV out chip") in place of an ordinary RAMDAC. All video goes through this chip, and its register settings must be adjusted in sync with the CRTC (GPU) registers to get out usable video modes. Xebian is configured to use a special xboxfb framebuffer driver which handles this special aspect.
- Bundled tools: Xebian comes with some Xbox-specific command line tools, such as xbv, xbox_info, xboxdumper, xboxfbctl, and raincoat.
Preparing to install Xebian
Finding and downloading the latest version
The official releases of Xebian are available on the SourceForge project page for the Xbox Linux project (http://sourceforge.net/projects/xbox-linux/). See the Xebian release notes (http://sourceforge.net/project/shownotes.php?release_id=190967) for details on the current versions. The actual files are located in the Files section (http://sourceforge.net/project/showfiles.php?group_id=54192) of the project, within the Ed's Xebian "package" (http://sourceforge.net/project/showfiles.php?group_id=54192&package_id=57509).
Before you actually download anything, see the following section about variants of Xebian.
Choosing between Xebian variants: "basic" vs "xbox"
Each Xebian release comes as two different variants. The variants are denoted on the download page in the filenames, with the names basic and xbox:
- The basic variant is a stripped-down installation with only the rudimentary basics. There is no graphical desktop or fancy applications; only a shell (the command line environment) and the basic tools. The user is supposed to install all the needed applications himself from the Debian package repositories. This variant is primarily intended for advanced users; especially for those who would like to use the Xbox as a headless server.
- The xbox variant has a full graphical desktop and many application programs (web browsers, media players, etc.) preinstalled. This variant is most suitable for those who would like to use the Xbox as if it was an ordinary desktop PC – or as a living room streaming multimedia player, or a tv-enabled web browsing terminal.
Download the variant that better suits your purposes. The variants do not depend on each other in any way. You only need to download one or the other.
Extracting the files from the archive
Xebian comes as a tarball (http://en.wikipedia.org/wiki/Tar_%28file_format%29). Extract the files to somewhere suitable.
Handling tarballs. In case you aren't
familiar with tarballs yet, you'd better get your hands dirty with them:
.tar.gz is the most popular archive format on UNIX-like
platforms. Here are some quick instructions to get you started:
|
Making sense of the included files
As of this writing, the most current release of Xebian is 1.1.4. The 1.1.4 tarball includes the following set of files:
- CHANGELOG, which is a text file describing the changes and new features in this release
- README, which is another text file giving detailed information about installation and usage.
- xebian-cover.jpg, which is a printable cover image for a DVD case
- 1.1.4-xbox.iso or 1.1.4-basic.iso (depending on the variant you downloaded), which is a CD image (http://en.wikipedia.org/wiki/Disk_image) (or "ISO image (http://en.wikipedia.org/wiki/Iso_image)", if you insist) that contains the actual Xebian CD.
The README file
You should always start by studying the included README file. It is the most up-to-date source of documentation concerning your download, and may contain important new information that has not yet found its way into this HOWTO.
The README file details the default user accounts, passwords and IP addresses, install script names, and other information which may have changed between Xebian releases.
Reading the README file in
Windows. The UNIX world does not have a concept of file extensions.
[1] That's why the included README and CHANGELOG files
do not have the .txt ending, even though they are text
files.
This poses a problem for a Windows user. As Windows recognizes the file type and the associated application from the extension, you can't simply double-click the README file to read it. Windows doesn't know what to do with extensionless files. Instead of double-clicking the file, do as follows:
So why did I insist on using Wordpad instead of Notepad? Because Notepad can't handle UNIX-style line endings (mere LF instead of CR+LF). Just try it yourself if you don't believe me. What? You want to know more about these mystical CRs and LFs? This HOWTO is not about them. See Wikipedia instead:
[1] OK, I lied a bit. The UNIX world didn't use to have the concept of file extensions – they were optional at best, and the file system doesn't have any special provisions for them – but things have become a bit muddled along the way. On many file formats it is these days easier to use a conventional "extension" as the trailing part of the filename than leave it off, and to speak the truth, even the Linux kernel itself relies on extensions (modules have a file extension on their own.) In any case, text files and executables are traditionally named without an extension in UNIX-like environments, and that's what you're seeing in the Xebian tarball, too. |
Burning the CD image
Now that we got all that out of the way, it's time to burn the CD image on a blank disc and boot the Xbox with that. But wait, I see a question coming...
Media matters
Most Xboxes have a DVD drive that can't read burned media well. 'CD-Rs are generally a waste of time, and won't work at all.(Actually I used a Phillips CD-R to write the ISO and I used the program Adensoft DVD CD Burner. My XBOX version is 1.1.3, hope this is helpful to you)' CD-RWs are a little bit better (if you get lucky, that is!), but they can be very flaky as well. If at all possible, try burning the image to a DVD-R first. DVD-based media generally works much better with the Xbox DVD drive than CD-based media.
The importance of choosing reliable and
compatible media cannot be emphasized enough. Failure to do this
will result in weird I/O errors and flaky installation problems,
or you may not be able to boot the install disc at all. Pay special
attention to this. Please.
Both pages are recommended reading. Studying them before burning anything is likely to save you a lot of trouble. |
Shall we burn now?
Yes, by all means, go ahead. But in case it isn't painfully obvious...
Burning CD images 101
You are not supposed to burn a CD image (http://en.wikipedia.org/wiki/Disk_image) as a single file on the CD. If your burning attempts result in a disc that only contains a single file, you did something wrong. CD authoring applications usually have a separate option that is specifically designed for burning CD images and not regular files. Use that option instead of the regular way to burn files. If you have never burned a CD image file (in this case, an .iso file) before, refer to the documentation of your CD burning application to make sure you're doing things the correct way. • • • For example, in Nero Burning ROM (a popular CD burning application for Windows), the correct way to burn a CD image is using the Burn image... option in the Recorder menu. If the program starts up by opening the New Compilation window (which is your normal starting point for burning regular files), simply close that window so that you can access the menus in the main window. ► See the Boot CD HOWTO for more instructions about various CD burning applications. |
When you're done with burning the CD (or the DVD), you should see several files on the disc – not just a single file.
Booting the Xebian live CD
Booting should be simple enough once you have a working copy of the Xebian CD image on a medium that your Xbox DVD drive can read.
- If you're using Cromwell, just power on the Xbox and insert the Xebian CD.
- If you're using a patched 3rd party firmware that allows running unsigned XBEs, likewise, just power on the Xbox and insert the Xebian CD.
- If you're using the MechInstaller softmod, power on the Xbox without a disc in the drive, wait for the Dashboard to appear, and then insert the Xebian disc. (This requires that you have already succesfully run the Install Linux savegame from within MechAssault.)
Watching the boot messages
Once the Xebian CD is in the drive, the Linux kernel should start up by displaying Tux the Penguin (http://en.wikipedia.org/wiki/Tux) and some kernel boot-up messages. As the CD continues loading, you will see more messages scrolling by, the screen will flash blank a couple of times, and display a checkquered pattern with "X" in the middle of the screen. Eventually you will end up on a GUI desktop.
On the desktop
Okay, Xebian has succesfully loaded and you're now staring at the desktop. You see shiny desktop icons (ooh... shiny...) and a background image. Now what?
Working without a mouse and a keyboard.
|
For starters, it should be noted that there are dozens of different graphical desktop environments available for UNIX-like systems (http://xwinman.org/). The simple default desktop configuration provided with Xebian is perhaps not one of the most feature-rich, but it is just one of the possibilities, and it has been chosen because it does not eat up too much of system resources (to remind you, the Xbox only has 64 MB of RAM.) You can change the desktop configuration to your liking once you install Xebian to your HDD.
Feel free to experiment, but note that the Xbox DVD drive is quite slow at reading CDs, so using the Xebian live CD can feel sluggish at times. (HDD-based Xebian installs are much snappier.) There's a Mozilla Firefox (http://www.mozilla.com/firefox/) icon on the desktop, and you can find some of the preinstalled applications in the root menu, which can be accessed by clicking the desktop with the right mouse button.
User accounts
A few words about user accounts. The Xebian live CD logs you on the desktop automatically, but what is the user account you're using in this configuration?
- The user account you are using in this default autologin configuration is called "live", and its password is "live" as well.
- As is typical for the UNIX-like systems, there is also an all-powerful superuser account (http://en.wikipedia.org/wiki/Superuser) called "root". The password for the root user account is "xebian".
Network settings
By default, Xebian uses a predefined, fixed IP address. You can configure it to use DHCP if you want to, but DHCP is not enabled by default. The default network settings are as follows in Xebian 1.1.4:
- IP Address: 192.168.0.10
- Subnet mask: 255.255.255.0
- Default gateway: 192.168.0.1
- Subnet mask: 255.255.255.0
Chances are that you cannot access the Internet from the Live CD with this configuration. If needed, the settings can be changed using the ifconfig command as the root user (http://en.wikipedia.org/wiki/Superuser). (Whatever changes you make, they of course cannot be saved back to the CD. If you wish to make the changes permanent, you will need to install Xebian on the HDD.)
An alternative for using ifconfig which can be somewhat messy for novice users, is the option to enable DHCP on the fly. Activate a shell, become root (enter "su" password "xebian") and enter dhclient. Ofcourse, you need a DHCP server somewhere in your network.
Installing Xebian on the HDD
1. Plug in your USB keyboard (if you have one) and boot your Xbox with the Xebian live CD.
2. Next you will have to open a new terminal window. This is done by clicking on the corresponding icon in the bottom left corner of the desktop. A window will open and a command shell prompt will appear.
If you do not have a USB keyboard, it is
also possible to log in over the network by using the SSH protocol (http://en.wikipedia.org/wiki/SSH)
and run the Xebian install script that way. The Xebian CD will
automatically start an SSH daemon on the background at the boot time. The
default network settings for your Xbox are:
...for Xebian release 1.1.0 and later
...for earlier releases of Xebian
If you do not know how to temporarily configure your PC to connect to the same subnet, do not bother with this installation method. Buy a USB keyboard instead. |
3. Now that you have the command shell prompt in front of you, type "su" and press Enter. You will be prompted for the root password
...for Xebian release 1.1.0 and later
xebian
...for earlier releases of Xebian
xbox
Type the password and press Enter.
You will now see the root (superuser (http://en.wikipedia.org/wiki/Superuser)) command prompt, signified by a hash sign. Type:
# XBOXLinuxInstall
(without the hash sign) and press Enter. This will launch the installation process. The command must be entered just the way it is written above, as UNIX systems differentiate between lower case and upper case letters.
Now you will be presented with a menu which will ask where you would like to install Xebian system.
Making an informed choice about where to
install. See the following articles for more information about the
partitioning scheme used on the Xbox:
|
4. Make up your mind on whether you would like to install it on the "E:" FATX partition as image files (which is the safest, non-destructive option), or directly in the unused, unpartitioned space above 8 GB (which might be used by the "F:" partition if you have created one, so be careful not to choose this option if you would like to keep the files you possibly have there.)
If you wish to use the entire drive for linux, thus removing the ability to run any regular Xbox code (that includes games), you can by choosing the 3rd option, instruct the installer to wipe out the entire disk and create 2 partitions (1 for swap and 1 for the linux).
If you are unsure which option is which, the installation script refers to the "E:" partition as "the game partition".
5. Next, the script will ask about the preferred size for the swap partition. The default (256 MB) is a good choice.
6. The script will ask about the root partition size. The default value for this is 2000 MB but you can also choose something else if you wish. By default, everything is installed on the root partition – there will be no other partitions, unless you create them manually later and move things around – so you should keep that in mind when deciding about the size.
7. After all questions have been answered, the script will create the partitions, format and prepare them for use, and copy the base system from the CD-RW to the hard disk. This might take a while. You will see a list of filenames scrolling by during the copying phase.
If you see any error messages during this stage – in particular, anything about I/O errors or read errors – or if the copying just stalls at some point and doesn't continue any further, that's a sure sign of problematic CD or DVD media. In that case you might want to try burning the CD image again on different media or with a lower speed. See the Boot CD HOWTO for more information. |
8. When the script has finished, you will be prompted for the network configuration of the Xbox. Choose a static IP address, the corresponding subnet mask and the gateway. One example configuration would be:
IP: 192.168.0.3 MASK: 255.255.255.0 Gateway: 192.168.0.1
9. In case you installed Xebian on the game partition (E:), you're done - the next two steps are not necessary anymore. The installer has automatically copied the files from the boot_fatx_e.iso to E:\debian; IOW: you'll find a E:\debian\default.xbe, which you can add to the configuration of your dashboard.
10. Now you should burn one of the boot images to a CD-RW. The necessary boot image depends on the installation type you have chosen during the installation. Currently there are two images, one to boot from the game partition "E:" and one to boot from a newly created partition in the unused space "F:".
11. After you have determined which boot image to use, there are several ways to start Xebian:
- if you have done the software modification with Mechinstaller you can boot up the system from within the Dashboard, just chose Linux.
- use the CD-RW to boot up Linux.
- If you do not like the idea of booting from a CD, it is also possible to make Linux bootable directly from the dashboard. For this to work, you will need to extract and copy all the files inside the boot CD image to a folder on your hard disk - much the same way you would install any homebrew software - and make the default.xbe file in this folder available on the dashboard menus.
(For people with EvolutionX dashboards add an item like this in your evox.ini under the menu section: Item "Xebian Linux", "e:\debian\default.xbe")
Note: On my xbox ( V1.4 TSOP Flashed with Cromwell ) The XBOXLinuxInstall script would only work if the HD was set to ide master and the CD / DVD was set to slave. This is not normaly the case in an unmodified xbox.
Xebian post-install configuration
What people often want to do is:
- disabling autologon for the "live" user (not necessary, but if you want to!)
- changing user and superuser passwords (this should be done for security reasons)
Open a shell and type the following:
$ su (password see above) $ passwd (enter new password for root) $ passwd live (old password=live)
Now your accounts should be safe, one thing to do is to disable autologon. There are several additional accounts in 1.1.0 that are left enabled with default passwords. You should change the passwords and/or disable logins on them.
$ passwd admin (default password=admin) $ passwd mce (default password=mce)
Any account with a default password is potentially exploitable by remote attackers/bots. It is critical you do this if your xbox is accessible form the internet and you don't want to become a warez drop or zombie host. Do the following to remove these accounts:
$ su $ userdel admin $ userdel mce
Disable the autologon
$ su $ vi /etc/inittab (starts Vim to edit inittab)
Now press the "/" key and type "1:12345" Press the "n" key until the following lines show up:
1:12345:respawn:/sbin/mingetty --noclear --autologin live tty1 #1:2345:respawn:/sbin/getty 38400 tty1
Change these lines to:
#1:12345:respawn:/sbin/mingetty --noclear --autologin live tty1 1:2345:respawn:/sbin/getty 38400 tty1
by pressing the "i" key. Vim behaves like a normal text editor in this mode. After you are finished with this, press the "ESC" key, after that the ":" key and type "wq", now press "ENTER" and you're done.
If you have problems using Vim type ":" and "help". Do the Tutorial, this will teach you the basics of editing with Vim. type "init q" to cause getty re-examine the inittab Next time you boot Xebian you will be asked for your login (live) and password. If you login as root you have to start the X-Server manually. (startx)
Changing from Static IP to DHCP
Many people have a router that uses DHCP to assign IP addresses on their network. The default setup in Xebian is a static IP Address of 192.168.0.3, Subnet Mask of 255.255.255.0, and a default Gateway of 192.168.0.1. Sometimes these settings won't work: either the IP address is already taken on the network, or the subnet is different, or the gateway is not correct. DHCP resolves this by making a request to the network for this information at boot up. The router sends this information back, giving it the next available IP address and letting the computer know what the subnet and gateway info are.
To switch to DHCP, the simplest method is to edit the interfaces file.
$ su $ cd /etc/network $ cp interfaces interfaces.back (backup original file) $ vi interfaces
In the file, change the word static to dhcp, and delete the three lines beneath it (use the dd command to delete a line). Save the file (by typing ":wq") and restart the network:
$ /etc/init.d/networking restart
Since most users don't need to connect to their Xbox from another machine after Xebian is installed, this is a more reliable way to ensure that the Xbox connects to the network without error. If you ever need to go back, use the interfaces.back file in the same directory.
Changing keyboard layout and screen resolution
You may have noticed that the screen resolution is pretty low and the keyboard layout is set to "en" as a default. If you want you can change these settings now. Just do the following:
$ su $ vi /etc/X11/XF86Config-4
Use the search function of Vim (type "/" after that "InputDevice") to find the following sections:
Section "InputDevice" Identifier "Generic Keyboard"
Change the values:
XkbModel="pcXXX" XkbLayout="XX"
to the model and layout of your country. (if you are from germany for example "pc105" and "de") More information about XFree86 keyboard configuration can be obtained here: XFree86 Documentation (http://www.xfree86.org/current/kbd.4.html)
Now we are going to change the display resolution. We're still in /etc/X11/XF86Config-4 Look for this line:
Section "Screen"
Here you can change the "640x480" values to "800x600" or "1024x768".
After you're finished press ":" and type "wq", now press ENTER to exit and save the file.
Don't forget to change the geometry setting of your Freevo Media Center, otherwise the resolution will be wrong when watching DVDs.
$ vi /etc/freevo/freevo.conf
Change "geometry=640x480" into "geometry=800x600" (or "1024x768")
Mounting the Xbox HDD partitions
See the old wiki entry (http://xbox-linux.sourceforge.net/cgi-bin/moin.cgi/PartitionsAndNames) for the partition numbers and names. Be aware that both F and G are not default partitions but usually only available with a modified BIOS. Support in Linux is therefore only for convenience and might not work as expected.
Nevertheless it might be a good idea to mount the other partitions of the Xbox HDD, just in case you want to use a different kernel or listen to your saved soundtracks while using Linux.
As the cache partitions do not usually contain valuable data, you might as well leave them out. If you put in F and G, make sure they exist. For most users, putting the line for hda50 in will suffice.
$ su $ cd /mnt $ mkdir C E F G X Y Z $ vi /etc/fstab
If the fstab table looks a little bit confusing just resize the terminal window and you will get a nice view of the table. In order to mount the partitions at boot time you have to make the according entries in fstab.
/dev/hda50 /mnt/E fatx defaults,user,umask=000 0 0 /dev/hda51 /mnt/C fatx defaults,user,umask=000 0 0 /dev/hda52 /mnt/X fatx defaults,user,umask=000 0 0 /dev/hda53 /mnt/Y fatx defaults,user,umask=000 0 0 /dev/hda54 /mnt/Z fatx defaults,user,umask=000 0 0 /dev/hda55 /mnt/F fatx defaults,user,umask=000 0 0 /dev/hda56 /mnt/G fatx defaults,user,umask=000 0 0
Exit the file now with ":wq" and type "mount -a" to mount the partitions. To verify the success of the mounting operation have a look at /etc/mtab
$ less /etc/mtab (type "q" to exit)
If everything went well you should be able to find each partition (earlier stated in fstab) in this file. Your recorded soundtracks should be available under:
/mnt/E/TDATA/fffe0000/music
The recorded music has the *.wma format, the Microsoft format for compressed audio. Xine or MPlayer will play these files properly.
Enabling digital audio output
It is recommended only to follow this part of the HOWTO if you are an experienced Linux user. The system might not boot up after doing the modifications. |
If digital audio output isn't working out of the box with Alsa, you need to recompile Alsa with the patch available in the xbox-linux CVS. In order to do this, you will need the source-code of the kernel. This could cause some trouble, since the kernel source is not available as a package for install. One way to solve this issue is to compile a kernel for the Xbox yourself.
Finding out the kernel version. You can
determine the running kernel version by typing:
$ uname -r |
Kernel compiling
A good HOWTO is located here: Xbox kernel compiling (http://xbox-linux.sourceforge.net/cgi-bin/moin.cgi/KernelCompiling)
Software and Hardware used in this this section of the HOWTO:
- Xebian 1.1.0 (installed on gamesave partition)
- gcc 3.3.4
- kernel 2.4.27-xbox
- Alsa driver 1.0.8-xbox
- Xbox 1.4 series PAL with MechInstaller exploit
A few important notes about this HOWTO:
- Have a look at the README for the Xbox kernel patches (http://cvs.sourceforge.net/viewcvs.py/xbox-linux/kernel/Documentation/README.xbox?rev=1.11&view=log)
- Select the version of the README according to the patch you selected
- Be aware that the latest release might not work, the patches in the CVS are always under developement. Use a tagged release if you don't feel secure.
- I had a hard time compiling the intel8x0 kernel-module. For some reason it did not work with the default kernel-config provided by the cvs. I guess it had to do something with the i2c-modules. Try using this config file:
Nevertheless the HOWTO is very detailed and should guide you through the process of compiling the new kernel without major problems.
Compiling the ALSA kernel-module
$ su
Download the corresponding Alsa driver:
$ cd /usr/src $ mkdir kernel_modules && cd kernel_modules $ wget ALSA driver 1.0.8 tarball (ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.8.tar.bz2)
Unpack the tarball:
I ran into a problem here with Xebian 1.1.0 the bzip2-tools were simply missing. To install the tools type: "apt-get install bzip2" |
$ tar xjf alsa-driver-1.0.8.tar.bz2 $ cd alsa-driver-1.0.8
Download the patch and have a look at the README here: alsaxbox CVS folder (http://cvs.sourceforge.net/viewcvs.py/xbox-linux/alsaxbox/)
Download the patch to your ALSA driver directory and apply the patch:
patch -p1 < alsa-driver-1.0.8.xbox.patch
Now configure the source:
$ ./configure --with-cards=intel8x0
Now you can run make:
$ make
If you are using a 2.4.2x kernel you may get the following error:
In file included from ../alsa-kernel/core/memalloc.c:27, from memalloc.c:28: /lib/modules/2.4.27-xbox/build/include/linux/proc_fs.h:213: redefinition of `PDE' /XebianLocal/root/alsa-driver-0.9.1/include/adriver.h:111: `PDE' previously defined here
To fix this run:
$ vi include/adriver.h
Type "111" and after that "Shift+G". this will take you to line 111. Delete the whole "if" part by typing "7dd", which will delete the following 7 lines. The lines which are to be removed are:
if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 4) #include <linux/fs.h> static inline struct proc_dir_entry *PDE(const struct inode *inode) { return (struct proc_dir_entry *) inode->u.generic_ip; } #endif
Run "make" again after completing the modification. If the driver has been compiled successfully install it:
$ make install
In case you still have the old driver running rmmod it:
$ rmmod snd-intel8x0
Now you can run the new driver with modprobe:
$ modprobe snd-intel8x0 xbox=1 (the "xbox=1" options forces the module to recognize the Xbox audio-chip)
NB: With dist 1.1.4, I could not get the alsa kernel-module to compile.
Dolby DTS/5.1 does work with the SP/DIF output however. The following workaround
is not the cleanest but it works:
$ rm /dev/dsp $ ln -s /dev/sound/adsp /dev/dsp
And then set xine as follows:
"audio driver to use" to OSS "OSS Audio device name" to /dev/dsp "Speaker arrangement" to Passthru
and bingo, you have wondermous surround sound coming from your receiver.
The re-linking of /dev/dsp has to be done after every reboot by your preferred method such as a sudo or /etc/init.d/localconfig. Not the most elegant method, but after several days of banging my head on the keyboard I'm willing to settle with this. -Jake
Configuring Xine
Ok, so you got this far, now wouldn't it be nice to have Xine properly configured for watching DVDs with digital audio output? This is how you do it:
Start Xine, right click and chose "Settings" - "Setup". In the GUI tab change the value of "Configuration experience level" to "Expert" or "Master".
First of all you have to change the used device for DVD playback.
- Go to the "Input" tab and look for the field "device used for DVD playback".
- Use "/dev/cdrom" and don't forget to modify the language and
- region settings according to your country. Click "Apply" to save the settings.
Now click on the tab "audio" and do the following adjustments:
- speaker arrangement - "Pass Through"
- audio driver to use - "alsa"
The Xbox should now be able to send a suitable digital audio stream to your external receiver.
You might also find that Xine works well, but doesn't play back DVDs very smoothly - the video judders or stutters. The solution for this is to turn on DMA (Direct Memory Access) for the DVD drive. To do this, edit the file (as root):
/etc/init.d/localconfig
And add the following line to the bottom:
/sbin/hdparm -d 1 /dev/cdrom
And reboot! If you want to see the immediate effects, the line above can be used in a terminal window.
Logitech Cordless Desktop
If you're using a wireless keyboard mouse combination you could run into some trouble with the mouse when using Xebian releases prior to 1.1.0 Your mouse will only be able to move in y-direction. This is because of a conflict with the kernel module "usbmouse" loaded by the hotplug service. A quick workaround is to unload this module:
$ rmmod usbmouse
After performing this action you have to reload the XServer by pressing "CTRL - ATL - BACKSPACE". Dont forget to edit /etc/X11/XF86Config-4.
Identifier "Mouse" Driver "mouse" Option "Protocol" "Auto" Option "ZAxisMapping" "4 5" Option "Device" "/dev/mice" EndSection
DO NOT copy and paste the listing above, this will make your X-Server crash. Only adjust the values where necessary and save the file.
In order to unload the modules permanently you will have to include "usbmouse" in the blacklist of the hotplug service. To do this open the file /etc/hotplug/blacklist and add "usbmouse".
$ vi /etc/hotplug/blacklist
Add these lines to the file:
# usbmouse module workaround usbmouse
That's all, your mouse should be working now properly.
Xebian 1.1.0 and mce
Problems with the set permissions for several devices and folders might occur when logging in as mce. If this is the case use the "live" login instead. |
If you want to use your Xbox for a just a Mediacenter instead of running a desktop style linux, you might want to consider logging in as user: mce (if you did not remove the user login)
Now you probably want this to autologin, so first thing you want to do is change the autologin from "live" to "mce":
$ su $ vi /etc/inittab
Now you are going to want to find the line with the autologin enabled, so press "/" and then type "autologin" followed by enter, and change the line from:
1:12345:respawn:/sbin/mingetty --noclear --autologin live tty1
to:
1:12345:respawn:/sbin/mingetty --noclear --autologin mce tty1
Now when you restart the X-Server (by pressing CTRL+ALT+DEL), you will automaticly be logged in as "mce". And since you are going to be using "mce", let's take a look what actually happens. If you open /home/mce/.xinitrc you will see two lines: the first says "exec /usr/bin/ratpoison &" and the second says "exec /usr/bin/freevo"
This is where I ran into a problem. After logging in as "mce" and the startup of freevo, the buttons of the Xbox controller did not work. So I logged back in as "live" and changed my window-manager to ratpoison, and BAM, no joystick control. I'm not sure if this is a ratpoison config error, or if the problem is somewhere else, but back in /home/mce/.xinitrc I changed:
exec /usr/bin/ratpoison &
to:
exec /usr/bin/fluxbox &
Now when "mce" logs in, everything works fine.
NOTE: You might want to use the D-pad when navigating freevo's menu instead of the thumbstick. If you do not like using freevo for your Mediacenter, try changing "exec /usr/bin/freevo" to "exec /usr/bin/mplayer" or something else along those lines.
Miscellaneous advanced topics
More about Xebian boot CD images and booting in general
Once installed, Xebian can be booted in several ways, most of which do not require using a separate boot CD:
- If you have Cromwell (http://en.wikipedia.org/wiki/Cromwell_%28computing%29) on your mod chip (or TSOP), it can boot Xebian directly from the HDD. (In other words, a separate boot CD is not needed in this case, and you can just ignore the boot CD images.)
- If you're using a software-based mod (such as MechInstaller), it may be possible to modify the Xbox Dashboard through software exploits so that it will include a "Linux" menu option in place of the "Xbox Live" option. (Again, a separate boot CD is not needed.)
- If you're using a mod chip with an alternative firmware which allows running unsigned Xbox XBE executables, it is also possible to directly replace the Microsoft Dashboard XBE executable with a Linux bootloader XBE executable. (You guessed it: this, too, eliminates the need for a separate boot CD.)
- Last but not least, there are alternative XBE-based dashboards. These will generally all allow adding Linux bootloader option in their menus. (Boot CD is not needed: if there is no CD or DVD in the DVD drive at boot time, the Xbox will boot into the alternative dashboard and display a menu with the "Linux" option which you added there by editing configuration files.)
In conclusion: the boot CD images are only needed if you do not wish to use Cromwell, and, at the same time, do not want to mess about with the original XBE-based dashboard files on the "C:" FATX partition in any way.
Booting ordinary PCs with the Xebian Live CD (for FATX support)
It is even possible to boot the Xebian live CD on an ordinary PC. This capability might come handy if you're soft-modding the Xbox and need to save some files on a memory card (or equivalent) in FATX format, or access a hot-swapped Xbox HDD and its FATX partitions. (The Xebian distribution comes with a patched kernel that, among other Xbox-specific things, supports the FATX filesystem (http://en.wikipedia.org/wiki/FATX).)
If this option sounds interesting to you, be aware that there is a hidden complication: Currently, the only available FATX-enabled version of the Linux kernel is 2.4. The Xebian CD, however, contains both a 2.4 kernel (which supports FATX) and a 2.6 kernel (which doesn't). The FATX-enabled 2.4 kernel is used automatically on a real Xbox, but if you're booting the Xebian CD on an ordinary PC, the boot loader defaults to the kernel version 2.6, which doesn't know anything about FATX. You can manually force the Xebian CD to boot using the 2.4 kernel by entering "24" on the GRUB command line.
Further information
- Xebian Xbox-Linux Documentation
- The general idea behind Xbox hard disk partitioning for Linux (http://sourceforge.net/mailarchive/message.php?msg_id=3570719)
- The size of the original Xbox hard disk (http://article.gmane.org/gmane.linux.ports.xbox.devel/3345)
- How to get clear-looking text and graphics out of Xbox-Linux (http://article.gmane.org/gmane.linux.ports.xbox.devel/3024)
- The original installation guide for the very first versions of Ed's Debian (http://www.xbox-linux.org/docs/installdebian.html)
- Update to the latest version of ndiswrapper (needed for some wireless USB adapters) (http://xbox-linux.org/wiki/Xebian_ndiswrapper_HOWTO)