Archive for May, 2008

Valve to port Source games to Linux

From Phoronix (http://www.phoronix.com/scan.php?page=article&item=source_linux&num=1):

“There have been rumors since last year that Valve may be serious about porting Source games to Linux after Valve Software began seeking a senior software engineer with the responsibility of porting Windows-based games to the Linux platform. Valve Software has yet to officially announce Linux clients for any of its software, but at Phoronix we have received information confirming that Valve is indeed porting its very popular Source engine to the Linux platform.”

Fun with Amazon S3 in Ubuntu Hardy

Project website: https://fedorahosted.org/s3fs

There are a few different projects calling themselves “s3fs”, but I have used this one with a lot of success. It is written in python and uses fuse, making it very easy to use on the desktop.

Prerequisites

  1. Amazon Web Services Account – http://aws.amazon.com
  2. sudo aptitude install python-fuse python-boto git-core
  3. git clone git://git.fedorahosted.org/s3fs s3fs

Handy things
One thing that isn’t required, but is very handy, is s3cmd:
sudo aptitude install s3cmd

If you opted to install s3cmd, run s3cmd --configure and enter your amazon account details. From there you can run commands like s3cmd ls and s3cmd la to see items stored on your account and verify s3fs is working as expected.

Using s3fs
The first thing we need to do is put our access key and our secret key into the environment variables. This could be dangerous if your box is compromised as people could take your keys, but there isn’t much that isn’t dangerous if it’s compromised anyway. Ideally you can make a small bash script with your keys in it for when you launch s3fs and just chmod that 600 for your user, or make it prompt you using the bash ‘read’ command.

For playing around, just throw it in your environment (it will show up in your history, but if you enter a space before these commands it wont):

export AWS_ACCESS_KEY_ID="YOUR_KEY_ID_HERE"
export AWS_SECRET_ACCESS_KEY="YOUR_SECRET_KEY_HERE"

Run s3fs
To run s3fs just change to the directory, and chmod +x if it isn’t already executable:

cd s3fs/src
chmod +x s3fs
./s3fs --help

Create a bucket for your files
We need to create a “bucket” which is like a folder to store our files in:
s3fs -C -c ubuntushareddrive

I made up ubuntushareddrive, your bucket name needs to be a globally unique name for all of amazon web services, so you might want to add some numbers at the end of it etc.

After that, we need to “format” our s3fs bucket:
s3fs -C -f ubuntushareddrive

From there, we can mount it and are good to go:
mkdir ~/amazon_drive
s3fs -o bucket=ubuntushareddrive ~/amazon_drive/

For questions on this process, please leave comments on the blog first. If you find a bug, there is a trac page at https://fedorahosted.org/s3fs

VirtualBox 1.6 Rocks

Installed VirtualBox 1.6, and it has been very slick thus far. I created a Windows XP guest with a dynamically growing disk:

Virtualbox screen

In the new version we get the slick new Sun screen when booting a guest:

Sun intro screen

After the install, I installed the “VirtualBox Guest Addition” and rebooted. I went into the menu and selected “Seamless Mode”:

Seamless Mode

From there it actually worked completely as expected, which was very cool. I have been seeing the Mac people with parallels and it is great to have something equivalent now:

Seamless mode

You can download packages for both i386 and AMD64 for Hardy at http://www.virtualbox.org/wiki/Downloads

ZFS rollbacks

So yesterday, VMWare tools decided to mess up X config under OpenSolaris. So I did a ‘zfs list’ and saw that OpenSolaris took a full snapshot of my system at install time. To revert to the installed state, I simply issued a ‘zfs rollback’ command and bam, vmware stuff was gone. Does anyone know if there are similar plans for any distribution to emulate this behavior via lvm snapshots?

New OpenSolaris website

I noticed a lot of the ruby / rails / mac kids were using OpenSolaris on their servers. They just launched a new website at http://www.opensolaris.com which looks very nice. Huge improvement. Installing that in VirtualBox (just installed 1.6 which went very well, no VMWare driver fussyness) now.

Would be nice to see them make a Ubuntu like wiki with howto’s, their documentation system with the html tree on the left is so 1996.

Hardy tip of the day: Go into System -> Preferences -> Sessions and uncheck Evolution Alarm Notifier. That is a known bug and will peg your CPU to 100%.

Connecting to Avocent DSR4020 IP-to-KVM switch

To connect to the switch, take a null modem cable (both ends female, 9 pins) and plug one into the back of it and one into your computer. In this case I used a USB-to-serial connector, so my device name is /dev/ttyUSB0. If you used a serial port it would probably be /dev/ttyS0 or /dev/ttyS1. To connect, you need to use a hyperterminal type software. Run “sudo apt-get install minicom” then run “sudo minicom -s”. Go into the settings and tell it to be 9600 8n1. Exit setup and it should connect automatically. Tested on Hardy May 5 2008.

Resize Windows XP Partition in VMWARE

Prerequisites: VMWARE, a Windows XP image, a Ubuntu iso file

  1. Turn off Windows XP image if it is on
  2. Open up a terminal
  3. Change the directory to where your Virtual Machine is located
  4. Resize the VMWare disk (In this case it was 5GB, I want it to be 12GB): vmware-vdiskmanager -x 12GB Windows\ XP\ Professional.vmdk
  5. Open up VMWare and for the CD drive, pick your Ubuntu iso file
  6. Boot VMWare, hit Esc and choose CDROM at bios prompt
  7. Boot Ubuntu, get to desktop
  8. Open up a terminal, type sudo -i
  9. Type passwd ubuntu, then set a password for the ubuntu user
  10. Run the command ‘gparted’
  11. Select your windows partition and click resize
  12. Drag it to the desired value, then click apply
  13. GParted will probably ask for the ubuntu user’s password from the step a few steps ago
  14. Once finished, reboot

Windows may need to reboot twice, let it run its chkdsk. Done.