15August2008

Installing Debian on QEMU

Posted by Robert under: all posts; cool; linux; software; wisdom.

Since I decommissioned my home server in favour of an NSLU2 (a NAS), I’ve found myself without a Linux machine to much about with or develop on while on the go (well, whenever I can’t use my laptop). So instead I’ll be using a virtual machine by running QEMU from my USB drive. Since my old server ran Debian, and since I haven’t checked it out in a while other than using it’s offspring Ubuntu.

Note: I would recommend getting this set up running on a folder on your hard drive, then copying it to your USB drive if you intend to do that. It will probably be faster, and it will save you trouble if your disk image isn’t large enough.

To get a QEMU binary for Windows, you can download from here, although this is no longer outdated and uses the 0.9.0 release. Unzip it wherever.

Open up a command prompt. cd to the QEMU directory. Create two disk images by running:

qemu-image create -f qcow2 debian.img 1024M .

qemu-image create -f qcow2 home.img 1024M .

This creates two 1024Mb sized qcow images for you to work with - one for your system and applications, and one for your home directory(ies). Obviously you can change the name and size to suit. My USB drive is 4Gb - if you have something smaller like 2Gb, use 768M for debian.img and 512M for home.img. If you have a 1Gb drive, you could try smaller sizes, but you’d probably have more luck trying something like DSL (Damn Small Linux) or puppylinux. I originally tried this with a cumulative 512M for the root and swap partitions, and it wasn’t large enough.

Grab a Debian CD image. I would recommend one of the netinst images. I’m using the Lenny Beta 2 image (here, or the .torrent), but you can use a stable image, or one of the weekly / daily snapshots. Put the image in the same directory as QEMU.

Create a file debian.bat, with the command:

qemu.exe -net user,vlan=1 -net nic,model=rtl8139,vlan=1 -L . -m 128 -hda debian.img -hdb home.img -cdrom debian-LennyBeta2-i386-netinst.iso -boot d -soundhw all -localtime

You can change the -m option for more or less virtual RAM, you can leave out the model=rtl8139 to use the default ne2k driver (I just like Realteks, even virtual ones ;-)), and obviously change the -cdrom option if you use a different image. You can also use Kqemu, but I’m not going to go into that.

Additionally, you can use the command -M isapc (ISA network card), but for that you will have to remove the model=rtl8139; and before using the installer, press [TAB] and add noacpi nolacpi to the installer startup options, otherwise QEMU will crash.

Debian can then be installed as normal. I didn’t install anything that depends on X as I don’t want a graphical system, thought QEMU should handle it fine if you do. I used the partition manager to create a swap partition of about 128 megs. Mount your second ‘hard drive’ (home.img) under “/home”. if you don’t do this now you can do it later by editing /etc/fstab.

(My second disk image / hard drive is mounted as:

/dev/hdb1 	 /home   	 ext3   	 errors=remount-ro   	 0   	 1

)

Depending on the CPU of your host machine, whether or not you are using Kqemu, and the speed of your internet connection it will take anywhere from 10 minutes to two hours to install.

Once installed you can apt-get install build-essential, or apt-get install nethack, or apt-get install python, or whatever floats your boat. Or, if you’re like me, you can faff about trying to enlarge your partitions because they aren’t big enough.

0 

24July2008

Installing / Replacing Flash Plugin in Firefox Portable

Posted by Robert under: all posts; software.

I was recently playing a game called Spin the Black Circle, a gravity-based game where you manoevre a ball through a series of hazards by rotating the environment the ball is in. It’s kind of Crystal Maze-y, without Patrick O’Brien playing a harmonica at you. Anyway, I went to play it on my Firefox portable install, and the game got stuck in a neverending rapid loop on the menu. So I figure upgrading the flash plugin was the way to go - I’d been using the same one since an early FF 2 portable install.

The install procedure was fairly straightfoward:

  1. Get NPSWF32.dll and (optionally I think) flashplayer.xpt (I have these in a zip file)
  2. Extract to FirefoxPortable/App/firefox/plugins
  3. Delete any old NPSWF32.dll s
  4. Enjoy!

That fixed the looping in the menu of the game. For reference, I think my old version was either 7 or 8.

0 

18June2008

Team Fortress 2 Pyro Update

Posted by Kenny under: all posts; games; pc games; valve games.

To go along with the Medic update released a while back, Valve are now releasing the Pyro version. Not only is the release time shockingly soon after the medic update, they seem to have learned from that, and changed a few things.

Firstly though, the other stuff. This update also includes 2 new maps, cp_fastlane and ctf_turbine. I haven’t played fastlane but have played turbine - it is a good compact map which should provide quite a competitive experience. Although you could play both these maps previously, now they are officially released, now you will at least be able to find servers running them!

Also, the pyro is getting a treat to the vanilla flamethrower. The alt-fire will now “blow back” shit. People and projectiles namely. This could prove really interesting and I can’t wait to see how it will work. Blowing people off ledges, blowing crazy melee pyros away or a soldier while you make your escape, it should improve the survivability of the pyro greesatly.

The unlocks - first there is the flare gun to replace the shotgun, which basically launches a ball of fire to set stuff alight. Looks quite cool, and a nice contrast to the high damage close range shotgun, some long range, relatively low damage fire. Next there is the backburner, which is basically like a normal flamethrower, but with 100% crit chance on the back of enemies, and 50+ health. I am assuming the “blow back” stuff is going to be really awesome…otherwise there is a no brainer between this and the regular flamethrower. Lastly is the axetinguisher, a lovely axe that provides 100% crits on burning enemies, but is weaker against none on-fire enemies. These look like some nice unlocks that shouldn’t skew the balance too much…

Achievements - not going to list them, jsut comment. To me they look, in general, easier to get than the medic ones, as well as not being so ridiculous (3 uber scout kills anyone?). However, they will probably take longer. This suits me fine, just means I will have more to come back to over the next few weeks/months!

Another important point to note is that out of the 35 achievements, you don’t need all 35 to unlock everything, you need 15,20 then 25 for the 3 unlocks. This means you don’t have to do the really long or silly ones if you can’t/don’t want to but you still get to play with the new toys!

Overall, this looks like a really good update, and I can’t wait to get into all the pyro madness!

Oh, also, free weekend this weekend, so get anyone you know not already playing, playing, and also Meet the Sniper video has been released…and it may well be the best so far.

4 

18June2008

Spore Creature Creator

Posted by Kenny under: all posts; battlefield 2; games; pc games; spore.

Long time no blog, but bored now. The Spore Creature Creator Demo has been released to the wild. It is a trial which contains 25% of the goodness in the full creature creator which you will be able to purchase for $10. Seems like a bitchingly good way to make money to me, a lot of people will purchase this now and then the full game later in the year when it is finally released. I was a bit skeptical about buying it, it is just the creator after all, but after playing with it for a bit I am quite tempted!

It is great fun just starting randomly playing the spine, getting a weird shape then finding the best places for arms, legs, eyes, mouths and weapons. Then you can colour it in in loads of ways to suit it’s character. Then you can easily share your creation with others as the preview thumbnail png actually contains the info for the creature, so all you need is the png and you can play with the creature at your will!

Here are my creations so far:

None of them are particularly creative, it is just me mucking around at the moment. Searching the Internet you will find thousands of creations, some brilliant, some shit, and some childishly rude (refrained myself so far…). Give it a go and see what you can come up with.

0 

11May2008

TF2 - ‘Lost connection to server’ Solved

Posted by Robert under: all posts; pc games; valve games; wisdom.

Even though I have exams coming up, I still manage to squeeze in the odd round or ten of Team Fortress 2. I blame Valve for releasing the medic achievements recently.

(7 to go! One of them is ‘Family Practice’, so I need some more Steam friends to deploy an ubercharge on, hint hint. Also, for all the spies out there: FYI I am a medic - please call for me sometime eh?)

Anyway, I had been playing for a while, but had developed a problem connecting to servers. The problem was that most of the time I would get into the game, take a few steps, then it would freeze. A second later I would get the red “Connection to server lost. Disconnect in 29…28… seconds”. Sometimes I would only get to “retrieving server info” or “sending client data”, and sometimes I could play for as long as 30 or more seconds before I got ghostbusted (yes, netrek jargon). I’m sure I even got a kill after being disconnected.

Trying to rejoin would give me a “This Steam ID is in use on the server”, while my friends saw many “BertieB(1) has connected”. And I saw a lot of “Disconnected from server. Reason:” … connection to server lost… this steam ID is already in use…

This is not unique problem. Fortunately the fix is fairly straightforward.

You need to open some ports on your router:

TCP 27030 - 27039
UDP 1200
UDP 2700 - 27015

For people with a BeBox (a Speedtouh 780 WL I think, so it should work for similar Speedtouches, like those with BT internet) you can simply log into the router (at http://192.168.1.254), go to Toolbox -> Game & Application Sharing -> Assign a game or application to a local network device -> Half-life 2. Easy!

This may not solve the problem for everyone, but it did for me and others. Good luk!

7 

29April2008

Broadcom 4318 Working Under Ubuntu Hardy Heron 8.04 (Ndiswrapper)

Posted by Robert under: all posts; hardware; linux; tech; wisdom.

In my dad’s PC is a wireless card - a Linksys WRT54GS I think. Anyway it uses the Broadcom BCM 4318 chipset, as seen by a quick lspci:

richard@hades:~$ lspci | grep roadc
00:0a.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g]
802.11g Wireless LAN Controller (rev 02)

Unfortunately the new b43 / b43-fwcutter package (installed from / by ‘restricted drivers’) stopped this working. I’m not sure why exactly; it’s possibly because it was designed for a later chipset (I’ve heard 04 for one of the chipsets), but in any case this is moot. It doesn’t work at the moment. This affects PCI cards, some internal laptop wireless cards, and some removable wireless cards.

Now, the card worked under Gutsy using ndiswrapper. So, that’s what I tried to get this working. There is a post at the Ubuntu forums that details how to do this. I’m going to briefly reproduce the procedure here because quite a lot of people are interested in getting their card woking, but thanks to Mazza558 for the info.

1) Remove the b43-fwcutter package
sudo aptitude remove b43-fwcutter

2) Reinstall ndiswrapper

a)
sudo apt-get install ndisgtk

b) Download and install wireless driver
WMP54GS Driver
or
wget http://roberthallam.com/wmp54gs.tgz
tar -xzf wmp54gs.tgz
ndiswrapper -i wirelessdriver/WMP54GS.inf

3) Create bash script to fix wireless
sudo gedit /etc/init.d/wirelessfix.sh
Into the file, put:
#!/bin/bash

modprobe -r b44
modprobe -r b43
modprobe -r b43legacy
modprobe -r ssb
modprobe -r ndiswrapper
modprobe ndiswrapper
modprobe b44

Save it, then change the permissions to 755:
cd /etc/init.d/ && sudo chmod 755 wirelessfix.sh

And finally execute:
sudo update-rc.d wirelessfix.sh defaults

And then you can reboot and have working wireless, or just (as root) execute the commands you put into the wirelessfix.sh file.

NB: To get a root bash prompt in Ubuntu, execute:

sudo bash

Enjoy your wireless, on whatever card card you have!

Update: Ed points out quite rightly that can be somewhat hard to update using an internet connection if you don’t have a working wireless card. A situation not unlike what good is a phone call… if you’re unable to speak? In any case, you have a number of options, some of which may or may not be possible:

  1. Plug a cable into your ethernet port
  2. Use an old Ubuntu 7.10 Gutsy Gibbon CD to update from. This should Just Work, that is you put it in the CD drive and you will be asked if you want to use it as a repository source (or similar). If not, the
    deb-cd
    command is your friend
  3. Download the .deb files manually elsewhere. Get both ndiswrapper-common and ndiswrapper-utils-1.9 (links to mirrors, not direct). Note that ndiswrapper-utils-1.9 has a couple dependencies like perl which you should have, but may not. Save them to a USB flash drive or whatever. Then use dpkg to install the deb files. Or:
    [insert USB drive and cd to it]
    wget
    http://mirrors.kernel.org/ubuntu/pool/main/n/ndiswrapper/ndiswrapper-common_1.50-1ubuntu1_all.deb
    wget
    http://mirrors.kernel.org/ubuntu/pool/main/n/ndiswrapper/ndiswrapper-utils-1.9_1.50-1ubuntu1_i386.deb

    [move USB drive to target machine, open a terminal and cd to the drive]
    dpkg -i ndiswrapper-common_1.50-1ubuntu1_all.deb
    dpkg -i ndiswrapper-utils-1.9_1.50-1ubuntu1_i386.deb

And you should be good to go, even if you are without an internet connection!

22 

12March2008

Coffee

Posted by Robert under: all posts; life.

I’ve started drinking coffee. Now, I’m not referring to the Nescafé instant dried pish that I consumed more for its ability to provide warmth and caffeine rather than actual enjoyment. No, I’m referring to the overpriced, £2.50-a-pop large wet cappuccino. And it’s heaven. Before, coffee was just a liquid providing things that could have been supplied in the form of a small pill two pills and some Deep Heat™. Now it’s an event I eagerly look forward to with anticipation. It may be decadent and may be relatively expensive, but as long as I enjoy my coffee time, I’ll keep chugging those beans!

0 

25February2008

Visualising The YouTube Pakistan Outage

Posted by Robert under: all posts; cool.

There is a good post by bluesky74656 detailing how you you can get a pretty cool representation of the BGP routing mess that took out YouTube for anywhere up to 2/3 for the world. I’ve reproduced the post here:

Head over to this site. It visualizes the BGP routes between different AS’s. Click ‘Start BGPlay’. The prefix in which YouTube lives is 208.65.153.0/24. Set the start time for about 24 Feb 2008 10:00, and the end time for about 25 Feb 2008 03:00 (times are UTC). Start the simulation.

You’ll see a bunch of ASNs. Two have red circles around them. You can get their name by clicking on the number. On the left is YouTube, and on the right is Pakistan Telcom. Click play and watch what happens.

For those too lazy to actually watch this: All the routes destined for YouTube head towards Pakistan Telcom instead. Then, midway through, you see PCCW get wise and shut down those routes, and everyone slowly starts finding the actual YouTube. It’s pretty neat to watch.

0 

21February2008

Soup Crimp

Posted by Robert under: all posts; cool.

Soup, Soup-a-tasty
Soup, soup-a-spicy

Carrot and coriander; chili chowder!
Crouton, crouton - crunchy friends in a liquid broth

I am gaspachio - oh! - I am a summersoup - mm!

Miso, miso - fighting in the Dojo
Miso, miso - oriental prince in the land of soup!

Plain Crimp:

On YouTube

The Scene (from “Fountain of Youth”):

Also on YouTube

0 

15February2008

Stewart and Colbert Vs O’Brien

Posted by Robert under: all posts.

Kinda funny, kinda whimsical. Good for a couple of laffs.

0