Tuesday, 30 April 2013

The Reliable Drive & The Missing Windows

I started my journey into open-source in 2008 after the hard drive in my Windows XP machine died. Little did I know at the time that pursuing my interest in Linux would ultimately lead me to a career in IT! Nonetheless, here I sit in my workshop waiting for the telephone installation and marketing materials before I can make my first million.

Whilst sorting through some bits and pieces that I thought might come in useful for my new venture, I stumbled across that old hard drive and found myself wondering whether I could salvage any of the data. I confess that I thought it unlikely, I was certain that the drive had suffered a physical failure and wouldn't even spin up, but I thought trying might make for an interesting diversion while waiting for suppliers and customers (not necessarily in that order). Imagine my surprise then when I plugged it into my workshop pc and Ubuntu recognized it instantly.

However, whilst I could see the drive in Nautilus, I couldn't mount the file system; Ubuntu complained that Windows had not shut down properly and was corrupt. Nonetheless, a promising start!

I put the XP installation disk into the optical drive and selected the repair option from the menu. In XP, this option drops you to a command line; something Microsoft calls the Recovery Console1. From here I tried:

  1. fixmbr
  2. fixboot
with no success.

Following advice from the Ubuntu error message, I then tried chkdsk /f. Chkdsk is a utility which checks the status of the disk for errors and the f switch attempts to repair any problems the utility finds. However, although the utility ran, it failed with errors after a couple of hours and I still couldn't access any data. A second attempt also failed.

It was then that I recalled a vague reference to problems with chkdsk running on an XP SP2 installation using and XP SP1 installation disk (sorry, I can't find the reference now). My original installation was an OEM install by DELL, an XP Professional SP1a OS. Fortunately, my laptop came with XP Professional SP2, so I thought I'd give the installation disk a try.

It took several hours, but chkdsk reported that it had fixed errors on the disk. I tried booting to XP but it hung on the splash screen and, as yet, I've not been able to boot from the disk. But, I can access all of the files from Ubuntu! I've found several photographs that weren't included in my backups and that I'd thought had gone forever, so I'm pretty chuffed.

The question now is what to do with the disk. Clearly, the drive must be returned to the original PC if I'm to run XP and I can still try:

  • fixmbr
  • copy d:\i386\ntldr
  • copy d:\i386\ntdetect.com
  • bootcfg /rebuild
if I want to get XP running, but my Dimension 8400 has been running Ubuntu for five years; why would I want to regress to XP? The fact is that I achieved what I set out to achieve: access to data I thought lost.

The irony is that, had I not simply replaced my PC when the original XP installation failed, I might never have investigated Linux.

Sources & References:

Notes

  1. See Meyers 2012 pp.820-823

Friday, 26 April 2013

It's been coming for a while and I've dropped one or two hints over the last weeks but on next week I rejoin the world of work doing something that I've always wanted: fixing computers.

Komphix officially opens its doors to the public on Monday 29th April 2013. I hope that anyone that reads this blog (and there are one-or-two) forgive the rather gratuitous advertising and wish me luck in my new venture!

You can find out what's on offer at the new website: feel free to link ;)

Sources & Resources:


Thursday, 25 April 2013

13.04 is Here

Ubuntu 13.04 LTS is released today!

If it really is designed for lightweight devices, it might be worth trying on the workshop machine!

Sources & Resources:

The Reliable Choice & The Missing Engineer

It's probably better not to go into too much detail; suffice to say that yesterday I spent over seven hours waiting at the workshop for a telephone engineer that never appeared. I'm now told that it will be July before I get my telephone and broadband installed - now that's what I call customer service (not).

However, I can access a wireless service from the workshop using a domestic service and I have been getting an intermittent connection using a Belkin USB Network adpater that managed around 36Kb/s. It worked, but it is a painfully slow solution and the constant drop-outs did nothing to repair my temper. The solution was to install a wireless PCI in my refurbished PC: a little research indicated that I would have fewer problems if I chose a device using any of the following chipsets: Ralink (2500/RT2400), Realteck RTL8280, or Atheros (AR9170). I picked up a TP-Link TL-WN751ND adapter from my local Maplin and paid heavily (about twice the online price of c.£10.00) for my impatience.

Easy to fit (of course) and I even took some time to re-route the front umbilicals. The good news is that the adapter works out of the box on my mongrel Ubuntu 12.04 setup and delivers 72Mb/s (exactly twice the speed of the Belkin). I have experienced one drop-out since installation, but it does appear to be a significantly more stable connection and this might be the solution that gets me out of trouble.

So, my trusty mobile and new TP-Link Wireless N PCI adapter it is, at least until I can get my phone line installed. The reliable choice? I don't know, I'll have to live with it for a while; but, so far it seems like a good choice.

Sources & References:


Tuesday, 23 April 2013

Seeing Clearly

My refurbished PC is up and running but I wanted to share my screen using a VGA switch. This had a disastrous effect on Ubuntu's appearance as the OS didn't seem to be able to detect the screen's native resolution through the switch although it had no problems when I plugged the cable directly into the video card.

There's a fair few solutions on the web, but I couldn't seem to make any work, so I cobbled together a fix which, although not particularly elegant, does work (for me). Simply put, I automate a command at startup that adds the desired resolution and forces Ubuntu to adopt it as the default.
There are a couple issues with my solution:
  • The script runs at startup not at boot, so I'm stuck with a low-res login screen.
  • The script (initially) runs too early giving me some weird video effects until the resolution had been reset.
  • This will only work for my login
As I'm the only user, I don't have to worry about multiple fixes. Moreover, I've fixed the second issue and resolved to live with the first. Here's how I solved the problem:

First of all, ascertain the monitor's native resolution. I just Googled mine, but if you have the manual, the information is probably in there. My resolution is 1280x1024 with a refresh rate of 60Hz. Now create the resolution in Ubuntu. Open a terminal and type:

sudo cvt 1280 1024 60

Change the values to suit your monitor (horizontal, vertical, and the refresh rate). The output of this command will look similar to that below.

# 1280x1024 59.89 Hz (CVT 1.31M4) hsync: 63.67 kHz; pclk: 109.00 MHz
Modeline "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync


We're interested in the second line (the one starting Modeline): we'll be using this information in our script later.

Next, determine the Output Port Name (aka monitor designation). In your terminal, type:

sudo xrandr -q

The output of this command gives you information about your monitor and how it's connected to the PC. The output will depend on the video driver in use; for my analogue connection, the port name is VGA-0. If you're uncertain which designation is correct, look here (under Output Port Names) to see which is the most likely.
Now prepare the script that will run at startup. Open a text editor such as Gedit with:
sudo gedit /home/username/.resfix
Then:
#!/bin/bash
      # Fix screen resolution at boot via VGA switch
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
xrandr --addmode VGA-0 1280x1024_60.00
xrandr --output VGA-0 --mode 1280x1024_60.00


Change the values (in red) to suit and then save and close your file. Next, make the file executable. In a terminal:

sudo chmod a+x /home/username/.resfix

Now add the script to the startup routine. The easiest way to do this is via the shutdown button - just select Startup Applications... from the dropdown menu. In the Startup Applications Preferences dialog, click Add. Now complete the Edit Startup Program:
  • Name: anything you want!
  • Command: /home/username/.resfix
  • Comment: something useful!
One last thing to do and that's to delay the script so that it minimizes the weired video. In a terminal:

sudo gedit /home/username/.config/autostart/.resfix.desktop

At the end of the file, add the following:

X-GNOME-Autostart-Delay=15

The number is the time in seconds that you want to delay your script: change yours to suit. Reboot for your changes to take effect.

Sources &References:

Sunday, 21 April 2013

I Wasn't Expecting That

You recall the generic hard drive that I ordered for my refurbishment project?

Well, it turned up on Thursday and it turned out to be a Western Digital device (WD1600AVJS)! Now I wasn't expecting that.

Sources & References:

Wallpaper of the Month


This is Llyn Y Cwn (SH 637 584) taken yesterday. You can just about see Moel Eilio on the horizon (centre).

I had a fabulous day on the Glyerau, starting with the North Ridge of Tryfan (including North Tower), onto Dexter Gully (I kid you not!) on Bristly Ridge, Castell Y Gwynt (just for a little exercise), and bagged Y Garn just to finish off. The weather was glorious and I am always happiest when I'm in the Ogwen Valley.

Sources & References:

  • None

Raring to Go?

Canonical releases 13.04LTS (Raring Ringtail) on 25th April 2013. Joey-Elijah Sneddon (of OMG! Ubuntu!) gives a nice summary of what we can expect from the latest release.

I'll try it on the 6400 to see if Canonical has fixed the virtual file system issues and then think about upgrading my desktop and file server. However, there's no urgency, support for 12.04 runs until April 2017.

Sources & References:

Tuesday, 16 April 2013

Mending & Making Do

I'm in the process of refurbishing a spare pc for my new workshop. It's only going to be used for driver downloads, Google, and lightweight stuff such as email which is just as well: this puppy is ancient.

But, and here's the thing, it already runs Ubuntu 12.04 without breaking a sweat!

The Motherboard is an ASrock P4i65G so replacing the 40GB IDE hard drive is no problem because the board supports SATA. So, I've chosen the cheapest hard drive I could find: a 160GB generic device from Amazon for the paltry sum of £23.99 with free shipping.

I'm also upgrading the RAM from it's current 512MB (yes, you did read that right! Two un-matched 128MB sticks that can only be working as SIMM) to the maximum allowed on the board, 2GB DIMM. Again, nothing fancy and as cheap as chips: 2 x 1GB generic memory sticks by Komputerbay (whoever they are).

I needed a SATA cable (obviously!) and a Molex/SATA power adapter: all told, the total was less than £60.00.

Refit time is around fifteen minutes and installing Ubuntu will take an hour or so with update - that's pretty sweet.

Sources & References:

Thursday, 11 April 2013

WiFi Speed Tip

I love my little appartment, but I've been thinking for a while now that I need to add a wireless access point to my network in order to improve WiFi reception in my lounge. After all, I don't want to be sat in my home office all the time!

However, whilst reading December's back issue of Maximum PC magazine, I was reminded the there are cheaper options to try before getting out your credit card. Ok, so it's no huge revelation that you can change your WiFi channel, but sometimes the obvious just passes you by: inSSIDer is a utility designed for Windows (and Mac1) but you can also download it for Android from Google Play.

So, I downloaded it to my Samsung Galaxy Advance, sat in my lounge and looked for the best channel to use. The performance improvement was substantial, so I may spend more time on my couch from now on!

Notes:

  1. There is a version for Linux, but reports about its efficacy are mixed. I just found it easier to load onto my mobile phone and analyze my network that way.

Sources & References:

Wednesday, 10 April 2013

Value Writ Large

For both personal and professional reasons I've been reacquainting myself with the various Windows operating systems recently and I chose Mike Meyers' tome for no other reason than it offered broad coverage of XP, Vista, and 7. However, this book proved to be far more than a Windows instruction manual and it has become one of the few books that, when I finished it, I immediately started re-reading!

I have previously been guilty of complaining that computer books are over-priced but this is clearly an exception. With a rrp of £40.99, each page (excluding Appendices & index) costs just 2.8 pence. Given the information density, illustration quality, and the fact that you are unlikely to pay the list price, this represents superb value for money.

Myers keeps the language accessible and eschews the gratuitous use of intensifiers that can make reading (and understanding) technical literature such a chore. This makes this an enjoyable (yes, enjoyable) read! Criticism is limited to Myers occasionally forgetting that the world stretches beyond the borders of the USA and a little too much advertising for his Company. Nonetheless, even if you have no intention of taking the CompTIA A+ exams, this an outstanding introduction to computing for aspiring techs or enthusiastic amateurs alike and I have no hesitation in rating it a five star publication.