Archive for August, 2005


Thinkpad BIOS Upgrade

Wednesday, August 24th, 2005

If I’m ever to upgrade the RAM in my laptop I need to update the BIOS because the current one (2.01) only supports 512MB SODIMMS. As it so happens I need to update the embedded controller program as well. Since the Linux upgrade disks are still stuck in the past and I have a Windows box I figured I’d just use it to create the disks. In my mind I pictured this simple process of creating the disks, booting up my laptop, running the programs and I’m done. It wasn’t quite that simple.

  1. First problem was the update programs don’t like being running from a directory with spaces in it. If you do run them in such a directory you get this useful error message:
    Usage : OS2 /P <full path > /C <original CommandLine>
    Since I was too lazy to type the full path I copied them to C:\ so the path would be short and ran it again. This time it just worked. Having no desire to learn how IBM constructed the program to only run in certain directories I left it be.
  2. Next problem is that I only have a box of old floppy disks. I had forgotten the joys of media that can rot. The first disk was rejected by the program even though I managed to format it with mtools in Linux yesterday. It liked the next disk and copied over the files.
  3. The Thinkpad is fussier about the disks it accepts and said it wasn’t a system disk. I could mount it in Linux and see the files but Windows also couldn’t read the disk. I began to wonder if this upgrade is such a good idea. I went through the rest of the floppies and the second last one is accepted and the Thinkpad boots it!

Thankfully the rest of the process went smoothly, nothing worse than a dead PC because of an interruption to a BIOS upgrade. When upgrading the BIOS there were two options, 1. Upgrade system programs and 2. Change model number only. I updated the system programs but left the model number alone.

Booting up again confirms the embedded controller is now at 1.06 and the BIOS is at 2.08! I resetted the BIOS to the defaults and restored my settings. Linux boots up fine and as far as I can tell, nothing’s changed. Now I just to acquire some RAM.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Thinkpad BIOS Upgrade digg.com digg it!  |  reddit reddit!

What does String#length do?

Monday, August 22nd, 2005

I just came across John O’Conner’s ‘How long is your String?‘ post. The gist of the post is that String#length in Java doesn’t always return the number of characters in your string, it depends on the character set you’re using. If you’re just writing an English app, you’re fine, but if you plan to i18n your app you have another thing to worry about.

There are plenty of places in my current project where I use string.length() (e.g. making sure a user name and password is long enough, etc.) but now to be sure it needs to be replaced by:

String str = ....; int len = str.codePointCount(0, str.length());

Of course user name and password lengths might not make sense in a non-alphabetic language anyway.

At least they keep the definition of String#length consistent, which in case you never bothered to read the Javadoc (like me) is:

Returns the length of this string. The length is equal to the number of 16-bit Unicode characters in the string.

So you can work out the size of the data fairly easily, e.g. to make sure the data is not too big for a database field. And if your database is using the same size for characters you don’t have to do any calculations. But I can see some pretty gnarly bugs coming out of that, so it’s probably best to work in bytes, i.e. you have to do something like:

String str = ....; int len = str.getBytes().length;

If you interested in reading more about character sets, Tim Bray has a pretty good article: Characters vs. Bytes.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit What does String#length do? digg.com digg it!  |  reddit reddit!

The Thinkpad’s back

Tuesday, August 16th, 2005

IBM turned it around much quicker than I expected. I dropped it off last Thursday and got it back on Tuesday. That’s a five day turnaround including the weekend, impressive.

A quick boot up test shows all 1GB of RAM, but the BIOS version is only 2.01. That either means they fixed the old board (doubtful) or replaced it with a old model board that’s been patched to work. Some reports I’ve read say that if you have a patched board the memory slot cover will have a slight bulge, but my doesn’t. I’ll have to investiage further to see what fix they did. But it does mean I can’t drop in more RAM without a BIOS upgrade. The Linux upgrade disk is currently only at 2.02, not 2.08, I’ll have to see if that can be hacked. I also need a floppy drive, but I think I found one on eBay for £6.35, so no great loss there.

The other good news is my hard disk is intact, no painful restore for me!

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit The Thinkpad’s back digg.com digg it!  |  reddit reddit!

Backing up a Gentoo installation

Thursday, August 11th, 2005

Before sending my laptop off to IBM I needed to back everything up. I run Gentoo Linux on my Thinkpad and given the amount of time it takes to do an install from scratch, I’d rather avoid having to do it all again if the guys at IBM decide to wipe my disk. Thankfully I’m not the only one. A chap on the Gentoo Forums has written a script that will create a stage 4 tarball of your existing setup. The post with the script can be found here:

http://forums.gentoo.org/viewtopic-t-312817.html

For those of you who don’t use Gentoo, the initial part of the installation is broken up into 3 stages. They setup things like the disk partitions, network settings, etc. More details can be found in the Gentoo Handbook. The end of stage 3 is basically where you start installing all your app software, e.g. X, KDE, Evolution, etc.

After editing a few variables in the script, it ran without a hitch. After verifying the contents of the tar ball I packaged up my Thinkpad for its trip back to IBM. I’m half curious to find out how smoothly the restore process goes, but I’d much rather just have my hard disk intact.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Backing up a Gentoo installation digg.com digg it!  |  reddit reddit!

Upgrades here I come

Wednesday, August 10th, 2005

I gave IBM a call today regarding the dead memory slot. I was worried at first because their support website is being rebranded to Levono and was 500′ing on pretty much every page. I thought they might try to fob me off and claim they don’t handle repairs anymore. Eventually I found IBM’s UK technical support number.

It was the simplist support call I’ve had to make in a long time. They recognized the problem and told me to get the laptop to them and they’ll replace the motherboard. The standard procedure is to drop it off with TNT somewhere in Battersea, since that’s nowhere near my office I’m going to call them in the morning to see if they’ll pick it up. The guys at IBM warned me they’ll probably charge me for that service.

Only gripes are that it’ll take 10 days and they don’t guarantee the contents of your hard disk will be there when you get it back. But seeing how they only need to get into the BIOS to check how much memory is being detected, I’m hoping they’ll leave it alone.

So now begins the painfully process of backing everything up. I’m going to see if I can backup the entire hard disk image because either everything’s going to be there or not. Maybe it’s time to research a hard disk upgrade too…

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Upgrades here I come digg.com digg it!  |  reddit reddit!

hostap it is

Wednesday, August 10th, 2005

I got back home and attempted to get my wireless network working again (it broke down when I switched ISPs and was forced to use a different ADSL modem). I switched the router to act as a wireless gateway and live on a separate subnet. This meant it could act as the DHCP server. The modem would serve DHCP addresses over ethernet but not through the wireless router, which was the problem I was having before. Around the same time I upgraded my kernel to 2.6.x and the wireless drivers stopped working, and only have recently come back to life.

Anyway all that was fairly straightforward, back to the drivers. The ‘hostap’ driver connected to my Thinkpad to the network without any hassles (still had the old config). The ‘orinoco’ driver seemed to have troubles with the security setup. Rather than waste any more time I decided to drop it and just use the ‘hostap’ driver.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit hostap it is digg.com digg it!  |  reddit reddit!

Souping up my Thinkpad T30

Sunday, August 7th, 2005

My T30 suffers from the dead memory slot problem. I never bothered to try to get it fixed because I bought it second hand and the warranty issues would be a nightmare. Plus the hassle of backing everything up and not being with a laptop for a couple of weeks wasn’t worth it.

The old fix was to either put some sort of spacers on the motherboard if the second slot hadn’t fried yet, or if it had replace the motherboard. There was a chance the slot would fry again. Now it looks like there’s a new revision of the motherboard that doesn’t need spacers, so you memory slots will happily work ’til the end of time, maybe. Another bonus is it comes with the latest bios and apparently support 1GB memory slots. Having 2 gigs of memory in this thing would definitely be a good thingTM.

I also found out that you can upgrade the hard disks on these things to something bigger and faster. I currently have my eye on a Hitachi Travelstar 7K100. 100GB of 7200 rpm goodness! The total cost of upgrades would be under £400 + motherboard replacement costs (if I can’t wrangle it for free). That would definitely stave off the T43p urges I’ve been having recently!

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Souping up my Thinkpad T30 digg.com digg it!  |  reddit reddit!

hostap driver working again

Sunday, August 7th, 2005

Without realising it I had switched back to the hostap driver because I had wlan0 set as my default network setup instead of eth1. I don’t remember doing anything to get it to work. It must have been when I upgraded the kernel to 2.6.12.

Some preliminary tests show that I get a better signal with the orinoco driver so it’s probably worth changing to that one permanently. Both setups appear to have something slightly wrong with them at the moment, and I’m sure all I need to do to make the orinoco talk as wlan0 is to change my /etc/modules.d/wlan file.

The error I get with the orinoco driver is:

/etc/init.d/net.eth1: line 683: interfacevariable: command not found /etc/init.d/net.eth1: line 466: interfacevariable: command not found

The error I get with the hostap driver is:

Warning: Driver for device wlan0 recommend version 18 of Wireless Extension, but has been compiled with version 17, therefore some driver features may not be available...

Neither stops the driver from working, but the first one looks like an error in the startup script, the second one looks a bit more serious.

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit hostap driver working again digg.com digg it!  |  reddit reddit!

Scratch that FastCGI IPC bit

Saturday, August 6th, 2005

In amongst what I did in the last post I did a few other things. One was installing the ‘fcgi’ gem and trying to not use ‘fcgi_hander’ and require the gem instead. This didn’t work because I left in the ‘RailsFCGIHandler.process!’ bit and didn’t copy over the old Dispatcher.process routine.

It was installing the ‘fcgi’ gem that fixed the Apache problem, nothing to do with the configuration. The very first line of

/usr/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/fcgi_handler.rb

is

require ‘fcgi’

which is a bit of a give away. Odd that the I don’t remember seeing this error message:

[Sat Aug 06 17:49:36 2005] [warn] FastCGI: server "/.../rails-app/public/dispatch.fcgi" restarted (pid 14287) /usr/lib/ruby/siteruby/1.8/rubygems/customrequire.rb:21:in require__': No such file to load -- fcgi (MissingSourceFile) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:inrequire’ from /usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/activesupport/dependencies.rb:200:in require' from /usr/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/fcgi_handler.rb:1 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:inrequire‘ from /usr/lib/ruby/siteruby/1.8/rubygems/custom_require.rb:27:in require' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:20 0:inrequire’ from /…/rails-app/public/dispatch.fcgi:22

A quick check on DreamHost (gem list –local | grep fgci) shows they haven’t got it installed either. Good thing I didn’t submit that ticket yet!

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Scratch that FastCGI IPC bit digg.com digg it!  |  reddit reddit!

Upgrading to Rails 0.13.1 pains

Saturday, August 6th, 2005

Dreamhost has upgraded to Rails 0.13.1, so I figured I should too. The actual application upgrade was simple enough, the main tricky part of figuring out which files I should just ditch and replace with new copies. ‘config/environment.rb’ was probably the only one.

I did the upgrade locally and it worked fine on WEBrick. Things didn’t go as smoothly when I upgraded it on the server, first there were stupid things like forgetting to make ‘production’ the default Rails environment again (overwriting environment.rb will do that). But the more serious problem of the site timing out. I came across this my Apache error log:

[Sat Aug 6 08:51:48 2005] [error] [client x.x.x.x] FastCGI: comm with (dynamic) server "/home/xxx/yyy/public/dispatch.fcgi" aborted: (first read) idle timeout (240 sec) [Sat Aug 6 08:51:48 2005] [error] [client x.x.x.x] FastCGI: incomplete headers (0 bytes) received from server "/home/xxx/yyy/public/dispatch.fcgi"

Not a good sign, and not obvious what’s causing the problem. At this point I figured I better put the old version back (copied the backup over rather than any fancy CVS tricks). To avoid future downtime I setup another domain to act as a staging server. This means I can test upgrades on an identical setup as the live server. But of course DNS updates take time so I didn’t have access to it straight away.

Rather than wait, I figured I’d just install Apache/FastCGI locally. Should be fairly straightforward, but these things never are. I followed this guide:

http://wiki.rubyonrails.com/rails/show/HowtoInstallOnGentooWithApache

Straightforward enough but I kept getting 403 errors when I tried to access the site. I thought it was some weird Apache access error and spent forever looking at the Deny and Allow settings in the config files. After a lot of wasted time I realised while the app directory was set to 755, my home directory was set to 700, doh!

So once that was fixed I could access the site and get the same timeout problem as I did on the live copy. Googling the FastCGI error message turned up a lot of red herrings but I eventually came across a post saying it might be a permissions problem with the interprocess communication file (IPC) that FastCGI uses. I quick check in my commonapache2.conf file showed this wasn’t set anywhere, so I threw this in the end: <ifmodule modfastcgi.c> FastCgiIpcDir /tmp/fcgiipc FastCgiServer /…/rails-app/public/dispatch.fcgi -initial-env RAILS_ENV=production -processes 15 -idle-timeout 60 </ifmodule>

Voila! It now loaded but crashed with a MySQL error:

HY000Host ‘x.x.x.x’ is not allowed to connect to this MySQL server

which was very confusing since ‘x.x.x.x’ was my external IP, not the IP of my laptop. I first thought MySQL must be setup to only accept connections from localhost. But digging around the config files didn’t turn up anything that looked like per-host access/deny. This is because connections from different hosts are setup on a per user basis, not a per server basis. This makes sense, but is different from other servers I configured, so it took a while to find this out. With the new fancy user setup it still failed with the same message. After a lot of head banging I realised it’s connecting to the production database not the development one! Hacking my database.yml proved this to be correct.

I finally had a working Apache/FastCGI setup, and confirmed a fix is setting up the FastCGI IPC file. It looks like the root of the problem is the switch to RailsFCGIHandler in dispatch.fcgi, which no longer works with the old Apache setup. But of course it’s set in the Apache config file, which I have no control over on DreamHost, time to raise a ticket!

Spread the word: Technorati related  |  del.icio.us bookmark it!  |  submit Upgrading to Rails 0.13.1 pains digg.com digg it!  |  reddit reddit!

ati-tv software ABBYY FineReader 8.0 Professional Multilanguage
ipod nana software ABBYY FineReader 8.0 Professional Multilanguage
easy fax software ABBYY FineReader Professional Edition 9.0 with Djvu Addon
encoder coding software Ableton Live 6.0.9
analytical system software ACD Systems Combo Pack
employee scheduling software Acronis Disk Director Server 10.0
eraise fundraising software Acronis Disk Director Suite 10.0
openeye software Acronis Disk Editor v6.0.360
gateway limited software Acronis Drive Cleanser v6.0 Build 383
tungsten software download Acronis Migrate Easy Deluxe v1.0.0.43
physics software Acronis & Paragon Universal Boot CD USB 2009 1.0
avatar server software Acronis & Paragon Universal Boot CD USB 2009 1.0
imaging software driver Acronis & Paragon Universal Boot CD USB 2009 1.0
software raid performance Acronis PartitionExpert 2003
legislative trackinig software Acronis Privacy Expert Suite 7.0
software listings Acronis Privacy Expert Suite 7.0
art software program Acronis Recovery Expert Deluxe
adams software forms Acronis True Image 7.0
free reservations software Acronis True Image Echo Server for Windows 9.5
panda antiviruse software Acronis True Image Enterprise Server 9.1.3666
microsoft excel software Acronis True Image Home 11.0
tape duplication software Acronis True Image Workstation 9.1.3887
free dayplanner software ActionScript 3.0 in Flash CS3 Professional Essential Training
raft software ActiveState Komodo IDE 4.2.0
software crises ActiveState Perl Dev Kit Pro 7
jq-210 download software Adobe Acrobat 7 Professional for Mac
audit software tracking Adobe Acrobat 7 Professional for Mac
smartist software Adobe Acrobat 7.0 Professional
callender software Adobe Acrobat 7.0 Professional
currency conversion software Adobe Acrobat 8.0 Professional
n95 remove software Adobe Acrobat 8.0 Professional
anderson software internet Adobe Acrobat 8.0 Professional
genealogy publishing software Adobe Acrobat 8.0 Professional for Mac
article distribution software Adobe Acrobat 8.0 Professional for Mac
map maker software Adobe Acrobat 9 Pro Extended
decisionbar software Adobe Acrobat 9 Pro Extended
timekeeping system software Adobe Acrobat 9 Pro Extended
knowledge mapping software Adobe Acrobat V 6.0 Professional PC
writing style software Adobe Acrobat V 6.0 Professional PC
management product software Adobe After Effects 6.5 for Mac
military packaging software Adobe After Effects 6.5 for Mac
knockout software Adobe After Effects 6.5 for Mac
mantel test software Adobe After Effects 7.0 Standard
pst repair software Adobe After Effects 7.0 Standard
pcr software customers Adobe After Effects 7.0 Standard
loopholes software testing Adobe After Effects CS3
ebay software tools Adobe After Effects CS3
volleyball statistic software Adobe After Effects CS3
autoquote software Adobe Atmosphere 1.0
medical documentation software Adobe Audition 2.0
software distrubitor Adobe Audition 2.0
6600 software program Adobe Audition 3.0
buy financial software Adobe Contribute CS3
apartment purchasing software Adobe Contribute CS3
define software application Adobe Creative Suite 2 Premium for Mac
autocad software review Adobe Creative Suite 2 Premium for Mac
pctools software Adobe Creative Suite 2 Premium for Mac
webchat software Adobe Creative Suite 2 Premium for Windows
book software store Adobe Creative Suite 2 Premium for Windows
software remote access Adobe Creative Suite 2 Premium for Windows
aor scanner software Adobe Creative Suite 2 Premium for Windows
software design article Adobe Creative Suite 3 Design Premium for Mac
microstudio 4.001 software Adobe Creative Suite 3 Design Premium for Mac
netscape 8 software Adobe Creative Suite 3 Design Premium for Mac
biblesoft software update Adobe Creative Suite 3 Design Premium for Mac
linux frontbridge software Adobe Creative Suite 3 Design Premium for Mac
code repository software Adobe Creative Suite 3 Design Premium for Win
acceleration software program Adobe Creative Suite 3 Design Premium for Win
clinical database software Adobe Creative Suite 3 Design Premium for Win
midi studio software Adobe Creative Suite 3 Design Premium for Win
aqura software Adobe Creative Suite 3 Master Collection for Mac
ezdata software Adobe Creative Suite 3 Master Collection for Mac
brightstore backup software Adobe Creative Suite 3 Master Collection for Mac
tk20 software Adobe Creative Suite 3 Master Collection for Mac
sequence analysis software Adobe Creative Suite 3 Master Collection for Mac
deployable spy software Adobe Creative Suite 3 Master Collection for Win
dprofiler software Adobe Creative Suite 3 Master Collection for Win
atm switch software Adobe Creative Suite 3 Master Collection for Win
hyperion software operations Adobe Creative Suite 3 Master Collection for Win
voice synthesis software Adobe Creative Suite 3 Master Collection for Win
iomega ghost software Adobe Creative Suite 3 Master Collection for Win
ups calculation software Adobe Creative Suite for Mac
oracle software Adobe Creative Suite for Mac
discount cad software Adobe Creative Suite for Mac
audio software forum Adobe Creative Suite for Mac
architectural renovation software Adobe Creative Suite 3 Master Collection for Win + Microsoft Office 2007 Enterprise
iphone 1.0.2 software Adobe Dreamweaver CS3
edsoft software Adobe Dreamweaver CS3
swing analysis software Adobe Dreamweaver CS3 for Mac
flowsheet software Adobe Encore CS3
lunix old software Adobe Encore CS3
software download drums Adobe Encore CS3
ficiton software Adobe Encore DVD 2.0
ebay software bidding Adobe Encore DVD 2.0
src software incorporated Adobe Encore DVD 2.0
amateur radio software Adobe Fireworks CS3
coin collectors software Adobe Fireworks CS3 for Mac
software package Adobe Flash CS3 Professional
convention software Adobe Flash CS3 Professional
picture software free Adobe Flash CS3 Professional for Mac
software circuit design Adobe Flash CS3 Professional for Mac
lenticular software crack Adobe Flash CS4
journal software engineering Adobe Flash CS4
webpage editor software Adobe Flash CS4
airframe business software Adobe Flex v.3.0.2
delmia software Adobe Flex v.3.0.2
freehand graphics software Adobe Font Folio 11
northrop resume software Adobe Font Folio 11
diabetes software pdas Adobe FrameMaker 7.0
istante software inc Adobe FrameMaker 7.0
vigilance software Adobe FrameMaker 8.0
software kinder preschool Adobe FrameMaker 8.0
dex drive software Adobe FrameMaker 9.0
de elementos software Adobe FrameMaker 9.0
software inspections Adobe FrameMaker 9.0
free cdrw software Adobe GoLive CS V 7.0 PC
ftp p2p software Adobe GoLive CS V 7.0 PC
transmit software Adobe GoLive CS2
becker data software Adobe GoLive CS2
fta firmware software Adobe Illustrator CS V 11.0 PC
liquids marketing software Adobe Illustrator CS V 11.0 PC
motorola v-180 software Adobe Illustrator CS2
explore anywhere software Adobe Illustrator CS3
outsourcing software solution Adobe InDesign CS V 3.0 PC
wntipcfg software Adobe InDesign CS V 3.0 PC
opengl software program Adobe InDesign CS2
nokia 6102i software Adobe InDesign CS2
free coloring software Adobe InDesign CS3
opp blackjack software Adobe InDesign CS3
astronomie software free Adobe InDesign CS4
monitoring email software Adobe InDesign CS4
development proposal software Adobe InDesign CS4
software cpu underclocking Adobe PageMaker 7.0.1
feko software Adobe Photoshop Album V 2.0
educational software seattle Adobe Photoshop Album V 2.0
learning measurement software Adobe Photoshop CS for Mac
flir software Adobe Photoshop CS for Mac
gps tracks software Adobe Photoshop CS v.8.0
free donation software Adobe Photoshop CS v.8.0
software updating freeware Adobe Photoshop CS2 for Mac
mountbridge software Adobe Photoshop CS2 for Mac
scream software seismic Adobe Photoshop CS2 V 9.0
software requirements plan Adobe Photoshop CS2 V 9.0
mpeg4 slideshow software Adobe Photoshop CS2 V 9.0
french genealogy software Adobe Photoshop CS3: Enhancing Digital Photographs
free software imac Adobe Photoshop CS3: Enhancing Digital Photographs
graphics benchmarking software Adobe Photoshop CS3 Extended
firewall software features Adobe Photoshop CS3 Extended
automatic prayer software Adobe Photoshop CS3 Extended
pine software examples Adobe Photoshop CS3 Extended for Mac