Xbox Linux Tips and Tricks

From xboxdevwiki
Revision as of 22:48, 2 July 2022 by VannevarKush (talk | contribs) (Adding some basic tips and tricks)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

128MB RAM Upgrade

Yep, it helps here too. Any modern Linux distro that isn't built for lightweight hardware is probably going to assume there is a lot more memory available than the Xbox has. The more memory and the more non-lightweight services in use, the more swapping is going to happen. With 64MB of RAM a lot of swapping is going to take place during any memory-intensive operation, slowing the Linux to a crawl. So the 128MB of RAM can give Linux some more breathing room. More minimal distros may be able to run fine with a (very) lightweight desktop with 64MB. The Gentoo LiveCD command line environments worked fine until compiling. But even operations like extracting files take forever and could be done faster with less disk access with more RAM.

hdb as Swap

Swapping to the same drive as data is being read from is far from ideal. If instead of a DVD drive, a hard drive is connected hdb, it could be used exclusively (or primarily) for swap. An unlocked stock Xbox hard drive could be used for this (back it up first!) but better performance will be obtained with an SSD. Small SSDs are not very expensive, and if it's just used for swapping, it can be easily replaced if it dies. (and do you really plan to use it for swap all day every day? It would only incur wear on the storage while running Xbox Linux). Does Linux have any sort of write levelling support for swap?

USB Stick as Swap

When booting from a liveCD, if you you don't want to alter data on hda but swap is needed to increase available memory, a USB stick can be mounted as swap. This can be added early in the startup script if needed, in the initrd. This is very slow but can work for bootstrapping things to the point of being able to create swap on a hard drive.

Hard Drive on hdb as a Bootable CD

This was tested with a Gentoo minimal install CD. A partition was created on hdb using a PC, and formatted with vfat. The partition was set as the cd root in the boot options in linuxboot.cfg (it didn't need to change if the hard drive was fomratted as a single partition. If it needs to change, e.g. to /dev/hdb1 instead of /dev/hdb, the linuxboot.cfg, kernel, and initrd from the CD can be copied to the appropriate locations your hard drive, modified, and launched from there if you want to modify them without burning a new CD.)

This may not work for all live CDs. It didn't work with historical GentooX. If it doesn't work, modification of the startup script is probably required to mount from hdb more generically instead of doing something CD or ISO oriented.

The hard drive can be formatted with multiple partitions, one for the CD files, and swap can also be set up there, so as to have swap available without needing to modify hda or use a USB stick.

Using the Extra 2GB on a 10GB FATX Hard Drive

Not all stock Xbox hard drives are 8GB, some are 10GB. Look up your model number if you're not sure. If you have a spare 10GB stock hard drive sitting around, back it up. Then small native Linux builds can be installed to the 2GB at the end of the drive (remember to have swap), and that area of the drive can also be used for experimentation. Or, install a (small) historical Xbox Linux build to that hard drive.

Using xbox7887's serial board

(put in necessary kernel config options)