Wednesday, August 18, 2010

How to update the Bios on a HP Desktop running Linux

Ok so I'm on some training where we have HP DX7400 PCs with 6GB Ram. Only problem is that the OS (SLES 11) only seems to see 3GB. First check was to make sure it was a 64bit OS which was fine. Then like I've found before the HP machine needed a BIOS update to see the 6GB at an OS level.

So here's what I did to get it sorted:

1) Download BIOS update from HP website.
2) Run BIOS update software on separate Windows PC to extract files. (You should also be able to do this under Wine)
3) Make as USB Boot disk as per ( and also include the awdflash.exe and bios file when you do this by copying them into /tmp/fs-root
4) Then just boot of the USB and run awdflash with the bios file and your OS should now be able to see all 6GB ram.

No mess no fuss. This is the second HP PC type I've found that does this, I'm starting to wonder if HP don't want you upgrading these machines with so much memory. I'm sure they'd much prefer you to buy a server with 6GB Ram as opposed to upgrading your desktop PC.

Tuesday, August 17, 2010

CodeIgniter remove index.php from URL

Ok I needed to make a note of this cause there are hundreds of posts on this and this is my one to add to the mix on how I got it to work.
This was on my Ubuntu desktop where I'd setup CodeIgniter.

1)  Add .htaccess file to /var/www with the following content:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

2) Check ModRewriter is enabled:

cat /etc/apache2/mods-enabled/rewrite.load
LoadModule rewrite_module /usr/lib/apache2/modules/

3) Make sure AllowOverride is set to all

This file: /etc/apache2/sites-enabled/000-default
Should have section like:

                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all

4) Then restart apache if you made changes to apache config

And then you should be able to access site without the index.php in the URL.

NiCe :-)

Monday, August 16, 2010

Another Monday in Jozi

Well it was off to work again this morning. Lucky me I ride against the traffic most of the way. I saw two mini bus taxis heading into oncoming traffic to try and avoid the traffic on their side of the road. I guess you can say this is pretty normal for South Africa, but hey, always fun to see when they come head-to-head with a huge BMX 5 series and have no where to go.

I also glad to report that this past weekends round of 'knock-downs' was successful with a light pole in Randburg been completely taken down. Like always it did not look pretty and not anything like a little bumper bashing with the pole. I really should start collecting photos, maybe then people will think twice before drinking and driving. What can I say is drunk people love to knock down traffic lights, light poles and just about anything close to the road in Jozi. I've decide to call this weekend activity in Jozi 'knock-downs' because it seem to be as regular as clockwork, you can look out every Monday morning for the aftermath.

And wow as I read the news I hear about another Taxi accident:

37 hurt in mangled taxis

 "Johannesburg - Thirty-seven people were injured in two separate taxi accidents in Johannesburg on Monday morning, emergency services said.

Spokesperson Percy Morokane said the first accident occurred at 05:30 along the Golden Highway.

"The taxi was travelling from Orange Farm, to the Jo'burg CBD when the driver lost control of the vehicle, and it overturned," he said.

Eleven people were injured, five seriously.

The second accident occurred at the corner of Joubert and Empire roads, in Parktown.
Two taxis collided, leaving 26 people injured, 15 of them, seriously.

"The period between sunrise and sunset, is always a gap for accidents such as these to occur. Motorists must be extra aware during these hours," he said."


Monday, August 2, 2010

Ubuntu Problem with LG Flatron L222WS

Picked this one up a while ago, but thought I might just make a note of it now.

It also seems to have been logged as bug for Ubuntu:

This is what I did to resolve:

1st I need an xorg.cof file:

sudo service gdm stop
sudo Xorg -configure

Then we edit it and add the lines in bold:

Section "Monitor"
    #DisplaySize      470   300    # mm
    Identifier   "Monitor0"
    VendorName   "GSM"
    ModelName    "L222W"
    HorizSync    28.0 - 83.0
    VertRefresh  56.0 - 75.0
    Option        "DPMS"
    Modeline "1680x1050 at 60.0" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 +hsync -vsync
    Option "PreferredMode" "1680x1050 at 60.0"


Then start X again

sudo service gdm start

Update: 16/1/2011

This did work for my old Video card, now I've upgraded to ATI HD 5770 it did not seem to do the trick.

This line did however work:

Virtual    1680    1050
Modes        "1680x1050@60"    "1600x1024@60"    "1440x900@60"    "1280x800@60"    "1280x720@60"    "1280x768@60"    "800x600@60"    "800x600@56"

Source :