|This tutorial will show you how to log into ITG's Debian Linux install, as well as how to transfer files directly from computer to computer, over a simple network. This allows you to transfer data much more quickly and run programs directly on the BoXoR, and do it remotely.
We take no responsibility for any damage caused by you, self-inflicted or otherwise. Follow these steps at your own risk.
Materials (before setup)
-USB keyboard (PS/2 works if you have access to the BoXoR)
-USB drive (at least 256 MB)
-External VGA monitor and cable (if upgrade)
-Slax (just follow the instructions for USB installation)
Materials (after setup)
-Laptop (with an Ethernet port)
-Router (with at least two wired client ports)
-Ethernet cables (2)
-PuTTY and WinSCP (Windows)
-ssh and scp (Linux)
Setup (cabinet side)
This disables the password on the root account so you can log in easily. Just keep in mind that anyone with physical access to the Ethernet port can also do this, so be careful.
First, plug in the USB drive and USB keyboard in the front hub. It really shouldn't matter which goes where. If using an upgrade cabinet, plug a VGA monitor into the VGA output on the back of the cabinet for a viewable picture.
Unplug the machine and plug it back in. While it's loading, press F11 to get into the boot device list, and select the USB drive. (This may be a different button for upgrades. Read the loading screen and it should tell you.)
Once Slax loads, select "Slax Text Mode". When prompted for a username and password, enter "root" and "toor". Go to /mnt/hda2/etc/ and edit passwd.
There is a line that looks like this:
Remove the x, so the line looks like this:
Be very sure this is correct! Otherwise, you may run into problems and ITG may become unbootable. (You can just fix it in Slax, but it's still annoying.)
Once you're done and sure it's correct, hit F2 to save and F10 to exit.
Now, that router you have? Connect it to the BoXoR with one of the cables, and make sure the router is plugged in and receiving power. Type "reboot", and once Slax is finished, unplug your USB drive. As the machine boots up, it will automatically get an IP address from the router. Congratulations - the machine's fully set up.
Setup (laptop side)
Windows: download PuTTY and WinSCP from the above links, and keep them easily available.
Linux: you probably already have ssh and scp. If not, grab "openssh-client" or "openssh" from your package manager. If you don't have a package manager, you poor sod, then check out http://www.openssh.com/ and get it manually.
Plug your laptop into the router with the second Ethernet cable and get an IP address. If your router has a config page you can access, check to see what DHCP clients are listed. If not, and you can get to ITG's service menu, use the System Diagnostics page to get the right IP.
Now that you have the right IP, it's time to log into the machine.
Windows: open up PuTTY, enter the machine's IP under "Host Name (or IP Address)", and press "Open". Enter the username "root" and enter a blank password (just press Enter).
Linux: type "ssh root@(machine-IP)" and just press Enter when prompted for the password.
You should now be at a prompt saying "root@groove$~:", which means you're in! If it returns an "Access denied" error, the root password wasn't disabled. Otherwise, check your connections and make sure the machine has a connection. (You may need to restart it again).
From here, you can use PuTTY/ssh and WinSCP/scp to connect to the shell and copy files to the machine directly. If you know your Linux, this should be no trouble. If not, here are some commands that'll help to know:
cd - changes directories
ls -lh - lists files in the current directory, with file sizes
cp - copies a file from one location to another
cp -a - copies a directory from one location to another
rm - removes a file
rm -rf - removes a directory and its contents
mkdir - makes a directory with the given name
df -h - check the space left on every disk in the system
du -sh - check the space taken by the given file/directory
export - set a BASH variable (e.g. export DISPLAY=":0" to set the X server)
killall - ends all processes matching the given name
touch - updates a file's timestamp, can be used to create a blank file
mount /folder/ -o remount,rw - remounts a partition at the given mountpoint read-write (/itgdata/ or /stats/)
mount /folder/ -o remount,ro - same as above, but read-only
Keep in mind Linux is case-sensitive, spaces and other special characters must be escaped or quoted ( Two\ \(Words\) or "Two (Words)" ), and Tab auto-completes names of directories and files.
Special files for ITG
All of these can be created with "touch".
/tmp/no-crash-reboot - disable auto-reboot on crash or process kill
/tmp/no-start-game - starts the X server, doesn't start ITG
/tmp/no-start-x - does not start the X server, does run initial scripts
Now what do I do with it?
You can use this setup as a shortcut to transfer extra game files quickly and easily, test things out on the ITG operating system, or really, about anything.
As an example session, let's transfer an OpenITG executable over and run it.
We start off by mounting the root directory ("/") read-write, so we use
mount / -o remount,rw
We now use scp to transfer "openitg" to /root/.
scp openitg root@(machine-IP):/root/ (Linux)
Windows shouldn't really need too much help - it's graphical.
We want to kill ITG so we can run our own executable, but remember it will crash and reboot if we forget to touch /tmp/no-crash-reboot, or auto-restart if we don't touch /tmp/no-start-game.
If we have any custom data in /itgdata/, let's mount it read-write so OpenITG can generate a cache there.
mount /itgdata/ -o remount,rw
Now, let's actually run it - we need to set $DISPLAY to point to which X server to load graphical programs from, so we use export to do it.
OpenITG should now be visibly booting. Congratulations; you've mastered the basics of remotely controlling ITG's Linux install.