Using Gentoo Linux for the XBox to share drives (v0.1)

1. Determining if this will work for you. 2. Gathering the tools needed. 3. Installing Linux. 4. Setting up Linux. 5. Installing and configuring Samba. 6. Conclusion.

Determining if this will work for you.

The first thing you need to do is determine if this tutorial applies to you. Before starting it is assumed you have the following:

* A modded XBox capable of running unsigned binaries, and a dashboard with FTP capabilities. * An XBox E Drive with 2.25 gigabytes free. * A Windows, Linux, OSX or other computer OS capable of mounting/accessing SMB (Windows) shares. * A home network with either a PC-based server or residental gateway running a DHCP server. * A high-speed connection, since the XBox-Linux download is 122 Megabytes in size. * An already-installed, configured and working FTP client capable of uploading to the XBox.

It is also required that you read and at least comprehend this entire how-to before starting. Also, it is advisable to read each step fully before you execute it. Do not issue the commands in the later portions of the how-to without reading the sentences that follow it.

Gentoo Linux On Xbox
Gentoo Linux On Xbox

Gathering the tools needed.

Please download the following:

* Gentoox Linux for the Xbox: here[] * PuTTY SSH Client for Windows: here[] (Required for Windows only. Linux and OSX have built-in SSH clients, which can be accessed from a console.) * An un-raring utility. Windows, Linux and OSX versions can be had here:

Save putty.exe in a folder for easy access, create a shortcut for it, whatever you like. Linux users should be familiar with their SSH client. OSX users can open a console and run the command ssh to get a good look at what it offers.

Set up your unrar utility according to the directions that come with it. Should be as easy as installing any other utility on your system.

Installing Linux

When the Gentoox download finishes, open it up with your un-rar-ing utility of choice. It was only a 122 meg download, but it’s going to blow up when you extract it to over 2 gigs. This is because it is a fully-featured version of linux, with over a gig of free disk space in the virtual partition “rootfs”. So, make sure you have enough room on whatever disk you’re going to expand it to, to temporarily hold the files. When done expanding, you can delete the original .rar file. There should now be 6 files: gentooxx.xbe, initrd,gz, linuxboot.cfg, rootfs, swapfs, and vmlinuz. Rename gentooxx.xbe to default.xbe for simplicity’s sake.

Open up your FTP client, connect to the XBox, and copy all of those files to the root of the E drive. This is VERY important. They cannot go anywhere else, it’s as simple as that. It’s only 6 files, and the clutter is minimal. This will take a few minutes, even at the best of FTP speeds, so go take a break. Go to the bathroom so that later when you’re in some big MMORPG raid with your eFriends you won’t have to crap behind your bed.

When it’s done you will need to add it as a menu item in whatever dashboard you are using. The method will be specific to each dash, so consult its documentation on how to do so. An example line for EvoX would be to place Item “GentooX Linux”, “e:default.xbe” somewhere in the [Menu] section. Reboot your Xbox and choose GentooX Linux (or whatever you called it) from the menu. Linux should boot in under 30 seconds.

Setting up Linux

Once linux has booted, your screen should display a line that looks like WELCOME to Gentoox – ported to the Xbox by ShALLaX and below it should appear your IP address. This address look somewhat familiar to you. If it doesnt resemble or or whatever IP addressing scheme your network is using, then there was a problem that prevented your XBox from getting an IP address. Seek help. If all went well, go back to your PC and pop open your ssh client. In Windows, open puTTY and enter in the IP address from your XBox’s screen into the Host Name (or IP address) field, change the port to 22 and enter “My XBox” in the Saved Sessions field. Click Save once and then double click the “My XBox” entry that just appeared in the list below. On Linux or OSX, open a console and issue the command ssh -l root replacing with the IP address from the XBox’s display.

You then should be prompted, in all OSes, to either click OK or type yes in order to accept the security key from the XBox (this will happen only once). Do so, and you should be faced with a login prompt. The default username is root and default password is xbox. Enter those details as needed, and you will then be facing a scary prompt that should look like Pro root #.

The first command to issue is hostname newname only replace newname with whatever you’d like the hostname for your XBox to be. It should be short (normally less than 13 chars) and not contain anything other than letters, nubmers and the dash. A vaild example is hostname x-box while an invalid example is hostname %super xbox!!1~. Now issue the command emerge sync This command gathers data from the internet about what software packages are available for Gentoo and will take a few minutes to complete. Do not close the SSH client! When the screen stops scrolling and you are presented with another prompt, move on to the next step…

Installing and configuring Samba

Issue the command nohup emerge samba & followed by tail -f nohup.out if you would like to monitor the progress. It would be best to do this sometime when you’re not going to need the XBox for a couple hours, since it takes a while to download and compile Samba. Overnight is a good choice, or before leaving the house for the day. Don’t worry about leaving the XBox on for long periods, it’s just a PC. I have had mine on for days straight with no ill-effects. You may close your SSH client during this process, just follow the steps above on how to reconnect. If you do log out, you’ll have to issue the tail -f nohup.out command to resume monitoring the progress. When it has completed, reboot your xbox by issuing the command reboot and closing your SSH client.

Load up GentooX Linux again and when it has booted reconnect with your SSH client. Issue the following command pico -w /etc/samba/smb.conf and a text-mode editor will appear. Feel free to expand the console/puTTY window to full screen for easier editing. What follows are a list of lines that will need to be changed, and explinations of what to change them to. You can use the arrow keys and the page up/page down keys to navigate the document. If any of them have a semi-colon (;) or hash (#) at the begining, remove it.

* workgroup = Remove what exists after the equals sign and replace it with the name of your workgroup. This info can be found different ways in different versions of Windows. Seek help from other tutorials if you need help finding this piece of information. * netbios name = Remove what exists after the equals sign and replace it with the same string you used as your host name above. * server string = Remove what exists after the equals sign and replace it with my xbox or some other short description. * guest account = Remove what exists after the equals sign and replace it with root * security = Remove what exists after the equals sign and replace it with share * local master = Change to no * domain master = Change to no * preferred master = Change to no

Now scroll down to the very bottom using the Page Down key. Enter the following line for line, exactly as you see it here. If using PuTTY, you should be able to copy it and then paste it by right-clicking anywhere in the PuTTY window.

[fatx] comment = scratch dir path = /mnt/fatx public = yes writable = yes browseable = yes

You may change the last line to browseable = no if you would not like the folder to show up to people just casually browsing your network. You will have to use the manual “Run box” method below to access your share. This is what I do to keep snooping network members from accidentally screwing something up.

When you have completed this hit the CTRL key and the “X” key, then Y and then the enter key to save your work. You will then be returned to the now-familiar command prompt. Issue the following command: rc-update add samba default which will make it so that Samba will run every time you start Linux up. Issue reboot one last time, close PuTTY or your other ssh client, then on the XBox load Linux up again. Once fully loaded, you should be able to access the share either through Network Neighborhood, smbmount, or the OSX network connection. If your XBox does not show up in your nethood, try manually accessing it with entering into the Run box hostnamefatx or replacing the hostname or IP address with the actual values for your XBox.

Once you have accessed the share you will see three folders, one for each drive in the XBox. You can browse, drag and drop files/folders, and even edit config files right on the drives, rather than having to download, edit and then upload afterwards.

To leave linux when you’re done, you can either just turn off your XBox (not really recommended) or log in via SSH again and just issue the reboot command. This shouldn’t be too annoying, since you’ll be at your PC making changes to the XBox’s drives anyways. And just powering it down can cause BadThings to happen that could foul up your whole setup (but not, to my knowledge, harm the data on the C, D or F drives.


If everything went as planned, and there were no errors along the way, you should now have a much easier way of uploading and configuring your software on the XBox. There is the added inconvienence of having to load up additional software (rather than just leaving it in the dashboard) but it’s only a few seconds, and the ease of having it as a shared drive is great. The limits about filenames are still in effect (42 characters, no commas, semi-colons, etc…) and if you attempt to copy a file over that breaks those rules, you’ll get a file-handle error, but it won’t do any harm. Just rename the offending file, and try again.

Nota Bene for Linux security dorks who were offended by my setting the Samba guest account to root: There’s a bug in the implementation of the fatx driver that makes this necessary, I’m not doing it out of laziness.