XFedora HOWTO
From Xbox-Linux
elletoer Written by Laurence A. Lee at www.not404.com
Based on "How to Install SuSE Linux 8 on your Xbox (http://www.xbox-linux.org/docs/suse8.html)" by Michael Steil.
| Table of contents |
|
5.1 Partitioning the Disk |
UPDATE NOTICE (2005-July)
Missing image
XFedora4.jpg
Image:XFedora4.jpg
Much of what you see on this HOWTO is maintained here for historical and archival reference. Xbox Fedora is now distributed on an integrated Boot/Install/Rescue CDROM image or as a pre-installed loopback file that you can FTP to your Xbox, which automatically applies (or includes) the tweaks outlined below. See the XFedora Support Area (http://www.not404.com/cgi-bin/trac.fcgi/wiki/XFedora4) for details.
Installing XFedora as a pre-installed Loopback-FS
Installing XFedora as a loopback install has a few advantages. It's simple and easy, it still lets you use your Xbox for games, and all you need to do to install it is copy it over by FTP. You need around 2 gigabytes of free space on both your Xbox and on your computer, and a way to copy files from your computer to your Xbox (FTP, a DVD, etc).
First download "Pre-Installed Loopback-FS Files for Test 3" from Not404's site (http://legacy.not404.com/cgi-bin/trac.fcgi/wiki/XFedora4) and unpack. Copy the files over to your Xbox to E:\debian. You can not install this anywhere else as this is hard-coded. When it is finished transferring, run the default.xbe in E:\debian to start linux.
Note: I haven't tested this yet, but in theory it should work.
Introduction
Hello, welcome to the Xbox Fedora (XFedora) Howto. Here, you'll find all the necessary reference materials to get your Xbox running Fedora Core. This is still a work in progress, and many talented developers are making great strides in enhancing the Xbox Fedora experience. What's presented here is a basic installation guide which works great for most people who aren't afraid to open up their Xboxes.
In principle, we'll do a cross-install -- i.e. we connect the Xbox hard disk to the PC, install Fedora Core 3 onto it, make some modifications after the installation, plug it into the Xbox, and burn a boot CDROM for the xbox. Before you start, it is strongly recommended to backup your Xbox hard disk, as described on the Xbox Linux site.
Non-Invasive Installation Methods (Known Works in Progress)
OK, before some of you freak out here, there *are* alternative installation methods in the works. They're actively discussed on the Xbox Fedora support forum (http://www.not404.com/cgi-bin/trac.fcgi/wiki/XFedora4), which is our informal gathering place for Xbox Fedora users and developers. Some of the installation methods being worked on include:
- An nfs-root solution, primarily for use as a diskless MythTV system.
- A loopback filesystem (typically a large ext2fs file stored on E: mounted as "root")
- An Xbox patched installation/rescue bootdisk -- by adding Xbox specific screens to the Anaconda installer.
So, if you're faint of heart, please check out the forums to see when these non-invasive methods are ready for testing.
Cross-Installing Fedora Core 3
-Install Fedora Core 3 as you would normally, but STOP when you get to the Partitioning Screen. Fedora Core 3 will suggest Auto-Partitioning or Disk Druid. Unfortunately, neither option gives fine control over where new partitions should start. Instead, go into the emergency shell: press Ctrl-Alt-F2 and run fdisk /dev/hdX (X being the drive you're installing to).
Partitioning the Disk
Always back up your data before modifying your disk! You have been warned.
For Xbox Original HDD
If you want to preserve the Gaming Area, the original documentation says to start at track 15534. (that's right after the last Xbox partition)
Tip: An easier shortcut is to create a temporary "Partition 3" starting at Sector 1, and use "+8G" to temporarily reserve the first 8 Gigs that would be used by the Xbox Gaming Area. Now you can create a 128M swap on /dev/hdX1 starting at the sector where your temporary Partition 3 left off, and allocate the rest as /dev/hdX2. When you're done, delete your temporary "Partition 3" and save the new partition table.
For your root file system on /dev/hdX2, Ext3fs is preferred. Note that the Fedora Core installer can safely write a PC-like partition table, since the first sector of the Xbox hard disk is unused. Save the new partition map, and do a Ctrl-Alt-F1 (Ctrl-Alt-F7 in the Graphical Installer) to go back to the installer screen. Select "disk druid", and make the necessary adjustments to have disk druid use the newly created partitions. From here, you can continue the Fedora Core 3 installation as normal.
For Upgraded HHD (>10GB)
- USED SPECIFICALLY FOR KEEPING GAME SPACE AND INSTALLING LINUX*
If you've installed a new hard drive that has Evox, XBMC, or any amount of disk space used, you need to do a little homework. First backup the somewhere *required* and reformat it using an Evox Boot disk or raw FTP commands. Then do the above steps. However, you have much more freedom in terms of disk size. If you want to reserve more for gamespace, calculate out how many sectors or cylindars you need to get howeve many GBs you want and then start partitioning there. If you want more space for linux, find out how much you can spare for your gamespace and partition accordingly. Then you can install linux *do this first, fatx doesn't recognize the swap and ext3 partitions and will write them over if there is nothing written in them* and then ftp the backup of your C,E,F, and/or G drives back onto the xbox.
Patching the Installation
When the installer is complete, you will either need to pop back into the emergency shell, or restart the PC in "rescue mode" (preferred). When you restart in rescue mode, do a "chroot /mnt/sysinit" to use the XFedora installation as the new root directory. Now it's time to install the post-installation patches.
First, the Kernel Update: Grab a copy of the XFedora Kernel RPM from the xbox-linux SourceForge Repository (http://sourceforge.net/project/showfiles.php?group_id=54192&package_id=141823). Install it by running "rpm --install kernel-<fedora_kernel_version>.xbox.i686.rpm".
Next, the XWindows (Xorg) Update: If you aren't ever planning on running X, just edit /etc/inittab and change the sysinit level from "5" to "3". Otherwise, grab a copy of the XFedora Xorg binaries from the xbox-linux SourceForge Repository (http://sourceforge.net/project/showfiles.php?group_id=54192&package_id=141823). Unpack it (tar -xvjpf XFedora-XOrg.tar.bz2). Go into the patch directory and run "./install.sh" -- it'll replace the relevant files with Xbox patched versions.
Finally, the Boot CDROM Image: Grab a copy of the XFedora Boot CDROM Image from the xbox-linux SourceForge Repository (http://sourceforge.net/project/showfiles.php?group_id=54192&package_id=141823). It must match the kernel version you've installed above, because it includes the corresponding initrd.img. If you laid your partitions out differently, you'll need to unpack the CDROM contents and rebuild it with your own settings. Alternatively, advanced users can upload the boot-iso files for use with Cromwell or your dashboard.
Installing the Drive
At this point, you're all done. Install the hard-drive back into the Xbox, and fire it up.
Maintaining Fedora Core
The XFedora Kernel is built from the official Fedora Core kernel sources, combined with Xbox specific hardware patches. We've tried our best to keep the kernel very stripped down, so that it isn't NEARLY as saturated with extraneous modules as a stock Fedora Core 3 kernel. This is great to keep things small, but this makes life difficult when you want something that wasn't already compiled as a module. Feel free to recompile your own kernel or modules to better suit your needs. See below for kernel building instructions.
To maintain your Fedora Core installation, you might want to install FreshRPM's apt for rpm (http://apt.freshrpms.net). Otherwise, the up2date and yum updaters that come out of the box work fine. Be careful about kernel and X updates. :-)
Xbox Sound Fixes
/etc/modprobe.conf Tuning
- options snd-intel8x0 xbox=1
- options snd-pcm-oss adsp_map=2
Other Notes
WIP: here its a more detailed guide on how to patch the kernel and build it for fedoracore. Compiling your own kernel
Creating a Custom Boot Disk
- Mount the XFedora Boot ISO, and copy the files into a new directory called xfedora_boot
- Update the linuxboot.cfg file as appropriate for your configuration.
- mkisofs -r -J -udf -o xfedora_boot.iso ./xfedora_boot
Making a Kernel RPM (kernel.org without Fedora-Added Patches)
- download the XBox-Linux patches from the SourceForge site.
- download the corresponding kernel.org kernel.
- copy the XBox-Linux patches OVER the unpacked kernel.org distribution.
- cp kernel.config .config
- make oldconfig
- make menuconfig (to tweak settings. For console access, I highly recommend enabling the OHCI USB driver and the USBHID driver in the kernel, instead of as modules)
- make clean ; make rpm
Making a Kernel RPM (with Fedora-Added Patches)
To construct the full set of sources, you'll need to get the latest Kernel Source RPM. Checkyou favorite SRPMS mirror, or do an up2date --get-source kernel.
Next, get the XFedora Kernel Patch from the xbox-linux SourceForge Repository (http://sourceforge.net/project/showfiles.php?group_id=54192&package_id=141823). Change directories to /usr/src/redhat, and unpack the XFedora Kernel Patch. It'll drop new files into SOURCES and SPECS.
To Unpack Sources Only: rpmbuild -bp --target=i686 SPECS/kernel-2.6.xbox.spec
At this point, you can go into the BUILD/kernel-2.6.10/linux-2.6.10 directory, and copy the xbox config file from /usr/src/redhat/SOURCES to .config and do a make oldconfig ; make menuconfig. Tune your settings and save your new config. Copy the updated .config back to /usr/src/redhat/SOURCES. Now you can (re)build everything:
To Build Everything: rpmbuild -ba --target=i686 SPECS/kernel-2.6.xbox.spec
Can This Work with Other RPM-Based Distributions?
I see no reason why it wouldn't work, as long as the two distributions keep the same directory structures. (At least they should keep their kernel files and modules in the same place). I haven't tried, but I'd be interested in hearing about your experiences.
Error questions and appended answers.
Questions should be directed to this page's Talk page and not appended to this document itself.

