Archive for December, 2010

PlayStation 3 HDD Upgrade

Thursday, December 30th, 2010

I recently got Gran Turismo 5 for my PS3 and it helpfully offered to install bits of itself to the hard disk to speed things up. I think it claimed about 10GB was needed and at the time I just accepted it. Then I got thinking, along with this I’ve blindly installed a fair bit of downloadable content for GTA IV and Dragon Age: Origins and so far nothing has told me the hard disk is full but I wondered how close I was.

A quick spot of archaeology found the box and apparently I had been a tight-arse and only purchased the 40GB model and the system settings indicated I had just over 3GB left so the next decent-sized DLC would’ve bitten me.

Thankfully I had recently upgraded my MacBook Pro with a whopping 750GB hard disk so I had the original 160GB gathering dust, plenty big enough. Sony make it really easy to upgrade the hard disk with clear instructions, all I needed to do first was perform a full backup to some external USB storage prior to swapping the hard disks over. I warn you now, this takes ages. The backup process claimed to back up 27GB (where’s my other 10GB gone?) and that took around an hour. Maybe I’m just expecting too much out of USB2?

Most of this is obvious stuff, but I remembered there was some brouhaha about some content such as game save data being non-transferable and I knew Dragon Age was one such game. I assume this is to prevent trading save games to unlock trophies as part of some sort of willy waving contest but this has the knock on effect of being unable to transfer the data if you replace your PS3 for some reason. While I was waiting for the backup to finish I considered what might be happening:

  • Does the process skip non-transferable data?
  • Does it back it up and then not restore it?
  • Does it back it up, restore it and then prevent you from loading it within the game?
  • Does a PS3 with a different hard disk count as a different system?

I assumed it wouldn’t be so silly to include the hard disk in the system profile but upon restoring the first thing I would do is check which save game data was restored and if it still worked or not, keeping the original 40GB hard disk safe so I could always downgrade again and reconsider.

Upon swapping the hardware, the PS3 correctly reformatted the hard disk which still had the OS X partitioning present and then I started the restore process which took even longer than the initial backup, I think it took about an hour and a half.

The process seems to have worked and restored everything, my Dragon Age game saves still seem to load with no problems. Weirdly the PS3 now reports that I’ve used 47GB on the new hard disk, whereas I had only used around 34GB on the old one accounting for the stupid capacity rounding hard disk manufacturers love to use, so either there’s quite the rounding error going on or the PS3 reserves a percentage of the disk for its own purposes.

This blog is IPv6-enabled

Sunday, December 5th, 2010

I’ve been quite keen on getting IPv6 connectivity to my hosts, although I’m currently lacking either a home internet package or hosted server where there is native connectivity. Thankfully there are enough free tunnel providers available which work fine as a workaround.

I’m using SixXS for two tunnels; one to my home network and another to the VPS provided by Linode which amongst other things hosts this blog.

SixXS operate a system of credits whereby tasks such as creating tunnels, obtaining subnets and setting up reverse DNS delegation costs varying amounts of credits and the only way to earn credits is to keep your tunnel up and running on a week-by-week basis. In the interests of promoting reliable and stable connectivity this is a Good Thing.

Now, what must have happened about a year ago was I created the two tunnels, but because SixXS deliberately don’t give you enough credits to be able to request subnets at the same time, you have to wait a week or two to earn sufficient credits to be able to do that. So I got my home network sorted first as that was more important and then likely got distracted by something shiny and forgot to sort out a subnet for the server.

Now, you don’t necessarily need a subnet when you have just the one host at the end a tunnel, you can just use the IPv6 address allocated to the local endpoint of the tunnel. However, you can’t change the reverse DNS of that address, meaning it will be stuck called something like cl-123.pop-01.us.sixxs.net. If you’re planning on running a service which can be picky about the reverse DNS, (SMTP is a good example), then it’s probably best to get a subnet so you have full control over it.

By this point, requesting a subnet isn’t a problem credits-wise as the tunnels have been up for over a year. My existing tunnel configuration stored under /etc/sysconfig/network-scripts/ifcfg-sit1 looked something like this:

1
2
3
4
5
6
7
8
9
10
DEVICE=sit1
BOOTPROTO=none
ONBOOT=yes
IPV6INIT=yes
IPV6_TUNNELNAME=SixXS
IPV6TUNNELIPV4=1.2.3.4
IPV6TUNNELIPV4LOCAL=5.6.7.8
IPV6ADDR=2001:dead:beef:7a::2/64
IPV6_MTU=1280
TYPE=sit

Once the subnet has been allocated and routed to your tunnel, it’s simply a case of picking an address from that and altering the configuration like so:

1
2
3
4
5
6
7
8
9
10
11
DEVICE=sit1
BOOTPROTO=none
ONBOOT=yes
IPV6INIT=yes
IPV6_TUNNELNAME=SixXS
IPV6TUNNELIPV4=1.2.3.4
IPV6TUNNELIPV4LOCAL=5.6.7.8
IPV6ADDR=2001:dead:beef:7a::2/64
IPV6ADDR_SECONDARIES="2001:feed:beef::1/128"
IPV6_MTU=1280
TYPE=sit

Note the IPV6ADDR_SECONDARIES addition. Now your host should be accessible through both addresses and thanks to #199862 any outbound connections initiated from your host should use the subnet address rather than the tunnel address. You can test this with ip(8) and some known IPv6-connected hosts.

# host -t aaaa www.sixxs.net
www.sixxs.net is an alias for nginx.sixxs.net.
nginx.sixxs.net has IPv6 address 2001:1af8:1:f006::6
nginx.sixxs.net has IPv6 address 2001:838:2:1::30:67
nginx.sixxs.net has IPv6 address 2001:960:800::2
# ip -6 route get 2001:1af8:1:f006::6
2001:1af8:1:f006::6 via 2001:1af8:1:f006::6 dev sit1  src 2001:feed:beef::1  metric 0 
    cache  mtu 1280 advmss 1220 hoplimit 4294967295
# host -t aaaa ipv6.google.com
ipv6.google.com is an alias for ipv6.l.google.com.
ipv6.l.google.com has IPv6 address 2001:4860:800f::63
# ip -6 route get 2001:4860:800f::63
2001:4860:800f::63 via 2001:4860:800f::63 dev sit1  src 2001:feed:beef::1  metric 0 
    cache  mtu 1280 advmss 1220 hoplimit 4294967295

Trying again for the remote endpoint address of the tunnel gets a different result:

# ip -6 route get 2001:dead:beef:7a::1
2001:dead:beef:7a::1 via :: dev sit1  src 2001:dead:beef:7a::2  metric 256  expires 21315606sec mtu 1280 advmss 1220 hoplimit 4294967295

The kernel decides that in this case using the local address of the tunnel is a better choice, which I think is due to RFC 3484 and how Linux chooses a source address. If that expiry counter ever hits zero and the behaviour changes, I’ll let you know…

DivX playback on OS X

Sunday, December 5th, 2010

I normally install the DivX software to get the support enabled in QuickTime Player via the bundled plugin.

Recently a couple of DivX-encoded movies have confused QuickTime Player such that I get the sound, but no picture although they seem to work fine in the standalone DivX Player. I’d rather not have to use multiple video playback apps so this rather smells of plugin fail.

The DivX Preferences pane forces System Preferences to relaunch in 32-bit mode, so I tried starting QuickTime Player in 32-bit mode to see if that might help, but no joy.

While searching to see what other users have done, I stumbled across Perian which is a LGPL-licenced QuickTime component that supports DivX amongst a bunch of other formats.

Installing Perian got the troublesome DivX videos working properly in QuickTime Player, and its System Preferences pane works in native 64-bit mode so it’s also slightly less annoying in that respect.