Swapping Windows product keys.

When you re-install a Windows XP based laptop then the licensing is easy as just about every laptop that is sold will have a legitimate Windows sticker on its bottom. Trouble is that you might not have the right install CD.

To use that laptop sticker you need the OEM install disk. If you use a retail disk then the key will be rejected.

However you get the Windows XP installed you can get the correct OEM laptop key into Windows by running the program provided by Microsoft from,

http://windows.microsoft.com/en-US/windows/help/genuine/product-key

This program will update the product key and correctly set your product ID to match the key i.e. if it is a big-name brand then your key (and probably the BIOS) is decoded by Microsoft and the MPC (Microsoft product code) will be set to (probably) “76477” i.e. the Royalty OEM and the Channel ID will be set to “OEM” if you add a legitimate OEM key from the base of the laptop.

This also seem to correctly validate Windows.

 

 

 

Old Acer 1360 Laptop hot hot hot….

Reinstalling a very old laptop (Aspire 1360) with its Windows XP Home and it halts just like a power shutdown. Trouble was that when trying an Ubuntu install then that worked. Odd.

Redid the WinXP install and it failed – retried the Ubuntu install and finally got an error message that shot off the screen but it was useful – overtemperature (80 Deg C) shutting down. The ACER BIOS (v1.09) doesn’t actually show the hardware sensors – gee that’s useful.

Interestingly I had also tried to start a Window Vista install and I got a “STOP: c000021a (Fatal System Error)” Error

I’d already cleaned out a whole ecosystem of colonies of “dust bunnies” from this machine but looks like something else has a problem. So took off the plastic cover with the feature buttons on on the top of the laptop to see if there was anything else and then tried the heatsink screws – one seemed looser than the others.

So far vacuum, tighten heatsink screws, remove dust and cat hair and swapped around memory chip positions seems to have done the trick on the install. I now have it back as a Windows XP with dual-boot to Ubuntu 11.04.

 

 

ACER 1360 BIOS 1.15 Model ID check error

I’m recovering a heat-damaged Acer Aspire 1360 and I wanted to update the BIOS. I went to the Acer web site and found the 1.15 version. This didn’t install but failed with a “Model ID check error”.

I re-downloaded the file from a different Acer site (UK and US) but same problem. I then tried the Acer FTP site,

ftp://ftp.acer-euro.com/notebook/aspire_1360/

and sure enough I found the problem.

The old BIOS files had two models in them, the 1520 and the 1360 but the version 1.15 only has the Acer Aspire 1520 files.

So AFAIKS you can only flash to version 1.11 of the BIOS (this gives 64 bit support).

 

Patching Pandora FMS

Sometimes you need to patch the Pandora FMS. To do this download the patch file (it’ll come from Sourceforge).

Untar it in a suitable location e.g.

cd sources
wget <the patchfile URL>
tar xvfz pandora_console_3.2.1_March_Patch.tar.gz
cp -i -R pandora_console/* /path/to/httpdocs/pandora_console/

and then confirm each change if it makes sense. Repeat for the pandora_server though that is at a different location e.g.,

cp -i -R  pandora_server/* /usr/share/pandora_server/

The console changes will have an effect immediately as that is just PHP scripts but the server needs to have the following,

/etc/init.d/pandora_server restart

 

Windows Laptops – finding disk space

Buy a new laptop and you’ll get a minimum of 320 to 500 Gigabytes but machines that are 2 to 3 years old will only be  a fraction of this and over time, with years of Windows updates and new and upgraded software, your once-shiny Laptop disk is now full.

The main free and Open Source application that we get people to run when they complain about lack of disk space is the WinDirStat program (Windows only).

This is easy to install, and it “quickly” builds up an awesome at-a-glance view of your whole disk space usage. *The quickly is subjective – a 5 year old Laptop with a Celeron and 40 Gbyte disk drive with 450,000 files and 55,000 directories takes 27 minutes to display.

WinStatDir - highlighting a file

Once it has this display then you can easily identify the large files and directories and then make a call on if this can be removed. Click on the pretty display and the directory listing will jump to the relevant item. You can then right-mouse on this and perform operations such as Open an Explorer window or a command prompt.

We can certainly recommend this for Windows PC laptop users who don’t have as many options in adding more disk space as say a  Windows desktop user will have. Laptop disk drives were generally smaller, more expensive and harder to swap out.

 

P2P and IPv6

Curious I was looking at the connections from a GNU/Linux machine running a BitTorrent (Transmission) client and I noticed about 50% of the connections were to IPv6 peers for a particular tracker.

The IPs were a mixture of freenet (probably due to the very simple gogoc package use – this is the Gateway6 client that was in a package called gw6c or tspc)  plus others but the most were Freenet.

Why is this ? Well with the gogoc package then you get an anonymous freenet IPv6 address for your client machine without configuring a thing. From a corporate point of view this does add an extra layer of complexity to managing internet traffic to and from your LANs. You may block P2P traffic but P2P over IPv6 tunnels may be leaking through.

Using host file changes to migrate a site

The simplest way of migrating a web site from one IP to another and testing it before changing your DNS is to just change a local test PC host file.

It varies by operating system but if you change the host file and make the new IP address point at e.g. www.example.com then you can install your new content management system and add the content at your leisure by just referring to it by its normal URL.  Everyone else in the Internet gets the old site on the old IP but you (and only you) gets the new site on the new IP.

Upload your content, edit and test it as usual.

You can also test POP3 and SMTP in this same way by editing your test PC hosts file to point at the new IP address for the POP3 and SMTP addresses e.g. pop3.example.com or even webmail.example.com.

When you are ready then simply change the DNS (@) A (and AAAA) records to the new IP addresses.

Do this in two steps,

1) switch the www and similar Web site related IP addresses but keep the webmail and MX records on the OLD IP address. If the web site works as expected (remember to remove any “test” entries in your test PC hosts files) then…

2) at a suitably idle time change the Webmail and MX records. Now test the incoming and outgoing email works. On any test machines make sure that a ping to the relevant record e.g. mail.example.com or pop3.example.com returns the expected IP address.

If it is fine then after a suitably long delay you can decommission the old web site. Do this as follows,

a) backup all databases – mark them as the OLD SITE
b) backup all web site content (media etc) – mark them as the OLD SITE
c) backup any other OS specific configuration files – mark them as the OLD SITE
d) delete the old site. How you do this will vary (delete containers on VPS or reformat a server disk on standalone machines or delete the files via FTP or ssh) but never leave it hanging around.

 

Software languages and cross-border trade in the EU

One of the freedoms of the citizens of the EU is the principle that goods and services can flow from EU to EU state without undue impediments.

Businesses in the EU are on both sides of this principle; on one side are those that actively engage in this cross-border flow and on the other side are those that actively discourage this cross-border flow.

With software and computing hardware that relies on the software, then the most crippling impediment to this EU principle is restricting the displayed language that the product or service runs.

The canonical example of this is Laptops and Desktops intended for the retail market. For the corporate market then these computers are generally out-of-the-box multi-language or the language can be easily switched at will. For the retail market i.e. the citizens of the  EU for whom this freedom of goods and services was intended to address, this ability to switch the language or at least select (one-time) the display language of the computer’s operating system is generally not possible (or the citizen incurs an additional cost).

Certainly if the manufacturer does not have a language then it cannot be presented, but if they do have the language available in one EU country then this language should be made available in all EU countries at the point-of-purchase with no additional cost.

This should be the minimum to uphold the principle of the freedom of goods and services by not adding an undue restriction to the ability of the citizen to purchase a product in one EU country for use in another EU country.

Install stuck at “setup is preparing your computer for first use”…

I found an odd fix to a problem on a new client PC. I was re-Installing Windows 7 SP1 on a new Acer laptop so as to change the install language (why aren’t OEMs in the EU mandated that they must offer all available Eurozone languages for their retail products if they already have that language as a first-time selection ?)  and I got the forever hung at “setup is preparing your computer for first use” problem.

If you search the Internet for an answer to this then there is nothing that is very clear as to what you can do when you are sitting in front of  a machine that works perfectly, will install but for the last few steps of the installation, fails to complete.

AFAIKS the cause is slipstreamed installers either stalling or failing and the Windows first use program is just spinning its wheels waiting for them to exit.

What I did at the “setup is preparing your computer for first use” screen was twofold:

1) I clicked SHIFT+F10 to get a command prompt, then typed in devmgmt.msc to get the device manager. It will have the unknown or devices without drivers expanded. I disabled some but I also found that you can install drivers too. If you have all your manufacturer drivers on a USB stick then just right-mouse and select update driver and then browse to the root of your USB stick e.g. E:\ and have it search subdirectories and it should find the right driver for that device.

—-and at the same time I..

2)   typed in taskmgr.exe to get the Task Manager and in  the processes list I killed any running msiexec.exe processes and cmd.exe command prompts if they looked like they were hung i.e. no CPU and the disk light on the Laptop wasn’t really running. This step 2) is the most important step as it seemed to allow the first use setup to step on.

The install then quickly finished the “setup is preparing your computer for first use” stage and I got the username, hostname and so-on questions.

The SHIFT+F10 trick and using the devmgmr.msc and taskmgr.exe works at any stage from the “setup is preparing your computer for first use” display onwards because Windows is actually running only services haven’t started and the hostname and account details haven’t been created.

Hope this helps – it worked for me.

Choosing WordPress

You’ll probably recognise that this and others that we use are WordPress based blogs. Why have we settled on this CMS ?

It is just easy to use. You don’t get many shocks or surprises with the layout of your posts (i.e. your articles). Sure, it hasn’t the sheer quantity of functionality of our other favourite, Joomla, but if you just want to be able to get your message onto the Internet without a steep learning curve nor with onerous support requirements then you can’t go wrong with WordPress.

If you want to create many users and have a much more complex set of permissions then you need to look towards something like Joomla. In the end it will depend upon your requirements. If those are not clear then you could end up with the right solution but it’s fixing the wrong problem !

Pandora FMS database first day of use

When you are initially creating the Pandora FMS 3.2.1 on a hosting system then you may hit two problems,

Open_basedir restrictions stop the install script (version 3.2.1) from seeing if the Graphviz binary exists (/usr/bin/twopi ) which is probably there because to get the Pandora FMS installed then Graphviz is a dependency. This shows up as an error on the list of dependencies for the FMS installer web page but if you know that you have the file (/usr/bin/twopi ) then you can click the skip to next step button.

When Pandora FMS creates/updates the pandora MySQL username then it changes the password but unless the RELOAD privilege is on the administration MySQL account then this script fails but it has created the config file. If you are creating the MySQL users via Plesk then this RELOAD privilege is not set. The install fails and you have an empty database. All is not lost – in the pandora_console directory there are two SQL files pandoradb.sql and pandoradb_data.sql. FTP these to your local PC, then use Plesk to create the pandora database and pandora user. Then use the mysqladmin (from within Plesk) to import these two files (it picks them from your local PC). Import both files in turn.

Now edit the /etc/pandora/pandora_server.conf file and set the password that the install created for the pandora MySQL account. Restart the Pandora FMS server ( sudo /etc/init.d/pandora_server restart )

Pandora FMS should now work (the default account is admin and the password is pandora). Obviously on internet-facing Pandora FMS consoles then that is the first thing you change !

 

Telnet to web server testing

Simple TCP based connectivity testing of a web site e.g. via Pandora FMS or Telnet is possible but Apache and IIS work differently.

With Apache you can (using telnet as the example) connect to the host on port 80 then type in GET / HTTP/1.0 and hit return twice and you will get a HTTP/1.1 200 OK message

You won’t on IIS but you will get a HTTP/1.1 400 Bad Request message. To get the 200 message from IIS you need to send,

HEAD / HTTP/1.1^M
Host: www.yourdomain.name^M
^M

where the ^M is the return or enter key.

 

IPv6 Testing

Just provisioned an IPv6 address on this server. I’d initially tried using an IP6 over IP4 tunnel but this server uses venet virtual interfaces and they don’t seem to be very friendly with the sit interface (nor tun). After managing to lock myself out of the server (had to edit the /etc/network/interface and interface.template to remove my changes and then reload) I went with the Host Europe allocated IP address. I kind of wanted my own range (i.e. /64 from Hurricane Electric) but then I also want the server to run as dual-stack IPv6 so I’ll live with the hosting provided address for the moment.

You need to have Plesk version 10.2.0. If you have added the IPv6 on top of an existing installation then you will have to go into each of the subscriptions for the domains that you want IPv6 support and select Change Host Settings and then pick the IPv6 address. It is your hosting provider that issues you the IPv6 address through their provisioning system.

In your DNS provider you need to add a name that points to the IPv6 address (an AAAA record). I have used ipv6 thus ipv6.openmutual.org can now be connected to from a IPv6 client.

Pandora FMS migration

We’ve been running this for around 6 months on a local test server. We’re currently in the process of migrating clients and servers to logging to our openmutual.org server.

We have built up a number of modules to monitor certain interesting items on eJabberd and Asterisk. Currently looking at status for Freeswitch (which is what we use locally to handle internal calls).

WordPress media uploads first day of use

On a new server you may find that you cannot upload images and it fails with an error,

Unable to create directory /var/www/path/to/your/httpdocs/wp-content/uploads/2011/06. Is its parent directory writable by the server?

This is because of permissions in that the apache web server can’t write to the wp-content/uploads folder.

The wp-content/uploads folder is defined by default in WordPress under the Settings -> Media and doesn’t need to change but you have to get the web server to be able to write to this location on the first day of use.

If you are using Filezilla or similar FTP Client you must set the file permissions of  /wp-content to 777 then go into your post again and add the image. This should work now and if you look at the wp-content directory you will see a new uploads directory with the file permissions of 777 and owner and group will be the apache web server. Set the /wp-content back to 755.

You don’t need to do anything else. It will keep working from now on.

Obviously the issue of setting 777 on a directory when we’re usually told to not do this raises alarm bells so is this an issue ? On shared hosting it could be an issue. A malicious user on another account could get Apache to upload content to this directory and then hotlink to this content in SPAM emails or bogus web sites but if this is a server or virtual server that you control all the shared accounts then there is no real problem.

A good shared hosting company should have setup the Apache mod_suexec and suPHP module for the virtual host that you are using on the shared account system and you won’t have access to that.