How-To Install Ubuntu, Steam & TF2 under VirtualBox on Windows to get Linux Tux Promo
So Steam is finally on Linux, Valve has announced that if you launch Team Fortress 2 between February 14th 2013 and March 1st 2013 on Linux you will receive a unique Linux Tux in-game TF2 item.
If you are interested in getting Tux but do not want to install a new operating system then here is a how-to guide for you. Using VirtualBox it is possible to safely install Ubuntu inside your current Windows install and run Ubuntu in a virtual environment. To save time we are going to install a pre-made image of Ubuntu 12.10. If you wish can also use VirtualBox to install Linux from an installation iso, it is good practice, but takes more time and is beyond the scope of this guide. After installing everything we will run TF2 to acquire the Linux Tux promotional item, unfortunately it appears that TF2 doesn’t appear work to under VirtualBox for the moment, however you can still obtain Tux by launching TF2 for a few minutes before it crashes.
Update: Excellent video tutorial of this guide has been created by failureandersenboi, big thanks to him for recording all the steps in an easy to follow video. A couple of notes before you watch, LXDE installation is optional and it maybe required to properly rename the .gcf files to make each first letter of each word capital. Refer to the text version of this manual for more information about each step, or check the comments if you run into problems. Thanks again to failureandersenboi for making this video.
Step 1: Get Ubuntu. Go to http://virtualboxes.org/images/ubuntu/ and download Ubuntu 12.10 x86 VirtualBox Image, the file should be called: ubuntu-12.10-desktop-i386.7z you will require 7zip or WinRAR to uncompress the 7z archive file. The VirtualBox image is 613 MB compressed and 3.0 GB uncompressed. After you have downloaded the file, uncompress it somewhere. It should contain 2 files: ubuntu-12.10-desktop-i386.vbox & ubuntu-12.10-desktop-i386.vdi, move them in to a folder somewhere on your hard drive and remember the location. You can also remove the compressed 7z archive, it is no longer required.
Step 2: Get VirtualBox. Go to https://www.virtualbox.org/wiki/Downloads and download VirtualBox, click [x86/amd64] under VirtualBox 4.2.6 for Windows hosts. In my case the file is “VirtualBox-4.2.6-82870-Win.exe”, after the download is complete simply start the install and follow the default install procedure. You do not need to change anything, just click next during the installation. At some point during the Network Interfaces install you will get a few pop-ups about certain devices that want to be installed, just click install on all of them.
Step 3: Configure VirtualBox. Click New, a Create Virtual Machine window will show up. Fill out the first screen based on the screenshot below and click Next.
I only have 3GB of RAM so I will only offer the virtual machine 1.5GB, but if you can spare more it would be beneficial, do not go past the red zone or your main operating system may run out of ram.
For Hard Drive, select Use an existing virtual hard drive file and locate the .vdi file you downloaded/ uncompressed earlier and click Create.
Right click on Ubuntu 12.10 and select settings. Under Display, Video Tab move the slider for Video Memory to as far as you can. In my case the max is 128 MB for an ATI HD4870 512MB video card. Also make sure to select Enable 3D Acceleration.
Recommended Step: If you have TF2 installed you can add the Steam Folder to Shared Folders Tab to avoid redownloading most of the major TF2 GCF files. Click OK to exit the settings.
Optional but Recommended Step: The 20GB limit on the VirtualBox .vdi image may not be enough space, so I recommend increasing the size of the partition first in Windows by issuing the following commands from command prompt (modify the paths if they are different). To access the cmd click start and in either run or inside the search field type cmd a terminal like application will open, after that type out the 2 commands below.
cd “C:\Program Files\Oracle\VirtualBox\”
then issue the second command:
VBoxManage modifyhd "C:\ubuntu-12.10-desktop-i386.vdi" --resize 40000
This will resize the vdi disk from 20GB to 40GB.
Then use a GParted LiveCD iso: http://gparted.sourceforge.net/download.php which I mounted from within VirtualBox under the Settings > Storage > CD/DVD Drive. Then boot under the CD. You can click enter on any of the questions GParted will ask you during boot. Once the GParted boots use the graphical partition manger to resize the partitions.
resize extended to fill all of the unallocated space
resize linux-swap to go to the far right of the disk, but keep it 754 MB
resize extended to go to the far right as far as you can
resize ext4 to fill remaining unallocated space
You will have a couple of 1 MB unallocated clusters remaining, not much can be done about that, click Apply to finish. After the process is complete click Exit and choose Shutdown, the virtual GParted disk should unmount/eject automatically.
Step 4: Start Ubuntu, select Ubuntu 12.10 and click the Start arrow, this will start Ubuntu in a new window. It may take a while to load, so wait. When the system loads you will be in the login screen, login with (username/password): ubuntu/reverse
Congratulations you now have a working Ubuntu 12.10 system installed as a virtual machine under Windows. I noticed the keyboard layout is set to Italian under this virtual image, so you just click the top Ubuntu start launcher button and type keyboard, find keyboard settings and add English (US) instead. Here is a video in case you are stuck on changing the keyboard settings.
Optional Step: The default Ubuntu desktop under Unity is very slow for me, so I am going do a system update first and then install LXDE instead. You can keep Ubuntu as it is, if it works well under VirtualBox, but if the system is lagging like it is for me I recommend you switch to LXDE. To update the system open the terminal, by using the Ubuntu start launcher and searching for terminal.
The command to update the system is:
sudo apt-get update
The command to install LXDE is:
sudo apt-get install lxde
You can then logout and relogin under LXDE for a faster desktop experience.
Step 5: Install Steam, go to: http://store.steampowered.com/about/ and download steam.deb, by default it will be in /Home/Downloads folder if you are using Firefox, simply run and click install.
Recommended Step: If already have TF2 installed on your Windows install, and you did the automount option mentioned earlier you can access your VirtualBox shared folder. But before you can open it you need to run the following command: (if you don’t you will get access denied):
sudo usermod -G vboxsf -a ubuntu
Please not if you are using a different username other than ubuntu you need to change the last line of this command to your username > sudo usermod -G vboxsf -a yourusername
Now logout and relogin and you should find your Windows steam folder under /media/sf_Steam
Copy the following .gcf files to /home/ubuntu/.steam/steam/SteamApps/
Note: .steam folder is hidden, enable hidden folders to see it! (Press CTRL + H or Show Hidden Files under View)
Source 2007 Shared Materials.gcf
Source 2007 Shared Models.gcf
Source 2007 Shared Sounds.gcf
Team Fortress 2 Client Content.gcf
Team Fortress 2 Content.gcf
Team Fortress 2 Materials.gcf
Important: On Windows these files will all be lowercase, when you are done copying them you will need to rename them to have each first letter of the world to be uppercase as shown above. For example, Windows will have source materials.gcf, Linux should have it renamed to Source Materials.gcf
Start Steam and install TF2, if you copied the files like mentioned above your install will be minimal compared to a full install.
Step 6: Starting TF2
You can start TF2 now, the game will probably not work. You will get a black screen and possibly hear background music. However you should receive the Tux item regardless.
You can also try running TF2 from the terminal, by typing in the following command:
steam -applaunch 440 -novid -textmode -nosound -noipx -nopreload -nojoy -sw -maxplayers 2 +sv_lan 1 +map "itemtest"
Textmode doesn’t appear to work completely either after a few minutes it will hang, but both methods will work to acquire the promotional item. Good luck.
If this guide worked for you or if you managed to get Team Fortress 2 to work under Linux or VirtualBox please share your experience. Thank you for reading.