Wednesday, February 15, 2012

Resizing Partitions on a Windows 7/Vista Boot Drive

I used to find it possible to comfortably fit a Windows XP installation onto a volume as small as 20GB; the minimum specs even suggest 1.5GB would be sufficient, but I always allowed for some growth over the life of an install. With the release of Windows Vista, the minimum space required for the OS rose to 55GB; which is substantially larger! However, should you install Windows Vista (or 7, for that matter) onto such a small volume, you will quickly run into capacity issues; as I found with my first installs of the OS.

Now, my usual solution to a system suffering from this issue would be to re-partition the drive and re-install the OS. However, recently I found myself in a situation where I did not have the time to dedicate to a full system rebuild, so I decided to try and resize the existing partitions.

The system in question had two partitions on the drive; the system partition (C:), which was far too small, and the data partition (D:), which had an abundance of free space. This boiled the solution down to two steps:

  1. Shrink the second volume (D:) by moving the start of the partition further towards the end of the disk.
  2. Extend the first volume (C:) into the newly created space.

Despite Windows having it's own disk management tool, which supports both shrinking and growing volumes, I was unable to use this tool for the entire process for two reasons:

  • It only supports shrinking by moving the end of the partition. This would mean that shrinking the 2nd partition (D:) would result in the free space being at the end of the drive.
  • The Windows tool can only extend a regular partition into contiguous space; meaning that any space freed at the end of the drive would be useless, given the above limitation.

Fortunately, there are an abundance of 3rd party tools out there that are able to resize and move on partitions, as well as perform other useful operations. Partition Magic (discontinued) and Acronis Disk Director are popular commercial applications, for example. However, being an open-source aficionado, it's hardly appropriate that I use such proprietary solutions! Instead, I opted to use GParted, which is a GUI that sits on top of the parted command line utility. It's available to download as a bootable ISO image; perfect for manipulating a system's boot drive.

Although I was confident that GParted would be able to shrink the second partition, I had read several accounts online that suggest it wasn't the best tool for resizing Windows Vista/7 system partitions. While it appeared possible, it would be necessary to perform a repair of the operating system using the original installation media. This was something I wanted to avoid if possible, so I ended up using a combination of GParted and the Windows Disk Management tool.

The Resize: Step-by-Step

So, once I had downloaded the GParted ISO and burnt to a spare blank CD-ROM, I loaded it into the machine's optical drive and started my hybrid process:

  1. (Re)booted from the GParted CD-ROM.
  2. Used the GParted tool to configure a shrink/resize operation to be carried out on the second partition (D:) that would move the start of the partition further along the drive.
  3. Checked and confirmed the operations required to achieve the desired results, before instructing GParted to carry out the resize.
  4. Waited an hour or two until GParted had finished.
  5. Rebooted into Windows Vista (and checked to ensure the contents of drive D: were accessible).
  6. Used the Windows Disk Management tool to grow the system partition into the newly available space.

To perform a cursory check of the system, I rebooted the machine, forcing a run of chkdsk to ensure file system consistency on both partitions. I was very happy to see the checks run without any issues and the system boot successfully; I saved myself a lot of work re-installing the operating system.

Sunday, January 22, 2012

Froyo Hands in the Air (Android on the O2 Joggler)!

A few months back, I finally managed to dedicated some time to investigate running Android on my O2 joggler. I've had the device for some time now, but I had it running Ubuntu Netbook Remix (UNR) 9.10 after following instructions I found on the JogglerWiki site. However, while the Ubuntu installation was OK (and pretty cool!) it wasn't perfect:

  • The Joggler only has 512MB of RAM, which isn't a lot for a machine running a full desktop operating system, but I thought the Ubuntu NetBook Remix would be suited to the low-spec environment. Instead, I found the UNR application launcher (which is actually quite good for touch-capable displays) consumed a great deal of that memory. As there wasn't much memory available for other applications, I ended up creating a swap file, leading me onto the next point:
  • Running UNR off a USB thumb drive was very slow. I suspect this is due to the media's relatively slow write speed, especially for smaller amounts of data. This meant that any time the OS needed to page data to the swap file the whole system ground to a halt.
  • Despite the application launcher having large icons and seemingly being designed with touch-screens in mind, I found the interface difficult to navigate. This appeared to be because touching the display emulates a mouse pointer being moved around the screen, which unfortunately became very inaccurate and targeting smaller menu items was incredibly difficult.
  • The on screen keyboard that I had available to me was pretty poor as well; it always seemed to take up the entire screen, which meant typing anything of a substantial length was tiresome.

So, even though I ended up with a very customisable OS that I could use for multiple purposes, I found myself longing for a truly touch-oriented system. This is what lead me to attempting an install of Android onto the Joggler. In researching the install process, I found several useful resources:

The only issue I had was getting Android to boot, which was caused by my insistence in manually creating my own partition scheme, instead of using the available image file. My reasoning for doing so was so I could properly use the entire capacity of the thumb drive. The mistake I made was opting to create a GPT partition scheme; the Joggler has an EFI BIOS, so this was a fair assumption to make that it would be supported and bootable. However, when I downloaded and examined the blank disk image, I noticed it uses an MSDOS partition scheme instead of GPT. Once I created an MSDOS partition scheme on my thumb drive, I had no problem booting at all!

In summary, the steps I took to boot Froyo were:

  1. Created a new MSDOS partition scheme on the thumb drive using fdisk. As there were only three partitions required, I opted to make them all "primary", as opposed to having an "extended" partition to contain the 2nd and 3rd:

    1. the first partiton I defined started at the beginning of the drive and 1024 MB in size. I changed the partition ID to "fat32".
    2. the 2nd partition was 1024 MB and of type "Linux"
    3. The final partition filled the remaining space and of type "fat32"

  2. Wrote the changes out to the thumb drive.
  3. Proceeded to format each partition as required (examples below assume USB drive is /dev/sdc):

    1. mkfs -t vfat -n ANDROID /dev/sdc1
    2. mkfs -t ext2 -L Data /dev/sdc2
    3. mkfs -t vfat -n SD /dev/sdc3

  4. Mounted the "ANDROID" file system at /mnt.
  5. Extracted the Froyo tar under this mount-point.
  6. In order to have the install use English language, I had to modify the grub.cfg in the root of the ANDROID partition; changing the LANG=zh to LANG=en.
  7. Extract the Google Apps archive under this mount point as well, in order to install the apps later on (optional).
  8. Unmounted the file system and ejected the thumb drive.
  9. Inserted the thumb drive into the Joggler and powered the device on.
  10. Used the supplied file manager to install the Google Apps in the following order:

    1. GoogleServicesFramework.apk
    2. OneTimeInitializer.apk
    3. SetupWizard.apk
    4. Talk.apk
    5. Vending.apk
    6. Gmail.apk
    7. Maps.apk

  11. Configured the device with a Google account to use with the Market and Mail applications.

After using the Joggler for a while, I began to notice a few problems with the Android installation:

  • Poor application compatibility; most of the apps in the market don't seem to be compatible with the device. However, I did manage to get Last.fm installed by backing up the application from my phone using App Monster and making this available on my network to download via HTTP on the Joggler, where I could install it manually.
  • The virtual home button stopped working after a while.
  • Clock needs to be manually corrected after (re)booting the device.
  • No Google calendar integration in the build and with the current selection of apps.
  • After a long session listening to music via Last.fm, the wireless connection seems to die; the interface shows an "Error" status in the system configuration menus. This can only be resolved by rebooting the device.

Overall, however, I would say the Android experience on the device is pretty good, in particular the following:

  • Android on my joggler!!!
  • Hardware graphics acceleration appears to be working
  • On screen keyboard a big improvement over UNR.
  • Widgets allow the creation of highly customised home screens, reducing the need to navigate into various apps to view their content.

Originally, I wasn't sure about what exactly I'd be using the Joggler for; it was more an experiment to see what was possible with the device. However, since installing Android, it is now resident in my kitchen at home and provides a way to listen to music, catch up on news, the weather and look up recipes online. To provide the necessary functionality, I've installed some additional apps:

  • Weather app
  • BBC app
  • Last.fm

I'm hoping that, over time, the application compatibility will improve, allowing me to install applications like Last FM. In the meantime I've downloaded the Android source code in an effort to compile the OS myself; I would like to see if I could get Ice Cream Sandwich running on the device! The main barriers seem to be integrating the appropriate drivers into the kernel in order for the touch-screen to be recognised.

Thursday, December 22, 2011

Sugru to the Rescue


A colleague of mine recently brought his personal laptop, a Dell XPS L702X, to work due to an unfortunate incident involving his son, the machine and it's power adaptor. The result of which was that the port at the back of the device had been dislodged from it's intended position, preventing the power supply being connected.

Dell provide decent documentation online for their products, which was lucky as it turns out that the L702X isn't the simplest of devices to dismantle. It was necessary to remove the module cover, optical drive, palm rest assembly, keyboard and display before I could get at the port!


Once I could see what had happened to the port, I found that the metal mount holding it in place had sheared off:


This meant simply re-mounting the port wan't an option. I was able to push the port back into place, but even gently pushing against it through the chassis caused it to dislodge again.


Fortunately, I had recently been introduced to a new product called Sugru. It's a putty-like material that hardens when taken out of it's packet; much better than my original idea of using Blu-Tak! My colleague happened to have some in the office, and we were able to use it to stick the port down to the chassis and wedge some behind it to further secure it:


Obviously, we'll have to see how it stands up to the test of time, but judging by some of the uses people have found for the product, I'm confident it should hold up.

Thursday, December 8, 2011

Gaming Build: The Obsidian Oblong

A collegue of mine was in the market for a new gaming machine; having moved to the UK, he had left his heavier belongings back at home. We discussed several options, before deciding that he would order all the parts and have them delivered to our office, where I could assemble them.


His budget was around the GBP 1000.00 mark, however we had to factor in a display and periperals into the equation, as he was literally starting from scratch. I originally picked out a 27" display (an Iiyama ProLite E2773HDS), which would have eaten into around GBP 240.00 of the budget, but he ended up buying a second hand display off another colleague for around GBP 130.00. The rest of the components were decided by a small commitee consisting of myself, my colleague and one of his friends from home. First, I produced a Google Spreadsheet with the components I would choose given the budget, before sharing the document with my colleage and his friend so they could make any suggestions or replacements to the build. The final build consisted of the following hardware:




Motherboard - Asus P8Z68-V LX


The only feature this Z68 board seemed to be lacking was SLI support. However, given the graphics card we eventually settled on, it was decided that a new card would be purchased instead of implementing SLI when the time came to upgrade.

CPU - Intel Core i5 2500K 3.30GHz


While not a flagship Intel product, this processor offers amazing value for money, especially as we opted for the OEM part. Going for model with the "K" designation meant that it would be possible to unlock a little more performance by over-clocking the CPU should the need arise.

RAM - Crucial Ballistix Elite 8GB (2x4GB) DDR3 PC3-14900C9 1866MHz Dual Channel Kit


A pair of 4GB high performance DIMMs, which were installed onto the board in a dual-channel configuration.

Graphics Card - Asus GeForce GTX 570 DirectCU II 1280MB GDDR5 PCI-E


Originally, we had decided on an Asus GeForce GTX 560Ti card, which was bundled with copies of Battlefield 3 and Batman: Arkham City. Instead, we ended up going with the 570 because by the time the parts were actually offered the 560Ti only shipped with Battlefield 3, while the 570 was actually on offer. I almost came to regret this decision as the graphics card was so large, I only just managed to fit it into the case!



CPU Cooler - Arctic Cooling Freezer 7 Pro Rev 2 CPU Cooler


As an OEM CPU was purchased, it didn't ship with a stock cooler, so we needed to buy one separately. Besides, if we did decide to go ahead and over-clock the CPU, we'd need something that would cope with the increased CPU temperatures.

PSU - Corsair Builder Series CX 600W V2 '80 Plus' Power Supply


Because we weren't building a dual (or even tri, or quad) GPU system, there wasn't any need to go with a high-output PSU, hence the choice to go with a 600W model.

Hard Drive - Western Digital Caviar Blue 1TB SATA 6Gb/s 32MB Cache WD10EALX


Choosing a storage device was one of the biggest shocks: I had intended to recommend a fast 2TB model, however, because of the recent floods in Thailand (where most of the HDD manufacturing facilities are), hard drive prices have doubled! This prompted me to stick with a 1TB model, which still cost over GBP 100.00! The original drive I susggested was a Seagate 1TB model, but personal preference resulted in the Western Digital device being selected instead; each to his own!

Optical Drive - Samsung SH-S222AB/BEBE 22x DVD±RW SATA ReWriter


Using the optical drive on my machines has become such a rarity, that I completely forgot to add one to the original spec! Fortunately, I picked this up before I had to start the build, so we added this model to the order.

Case - Antec 300 Three Hundred Ultimate Gaming Case


Considering how cheap this case was (GBP 49.99), I was surprised at how easy it was to fit in all the system's components. On top of that, it was supplied with a bag of thumb-screws for tool-less installation of hardware, and a couple of cable-ties to help keep the finished system that little bit tidier.



Keyboard - Razer Arctosa Keyboard


It's not often I have to include a keyboard into a build; most people just recycle their old peripherals, but we were starting from scratch so I opted for this Razer keyboard. In my opinion, the design of the keyboard strikes a good balance between flash and functional.

Mouse - Razer DeathAdder Respawn 3500 DPI Xtreme Precision



An ideal companion for a Razer keyboard; the DeathAdder mouse. I have one of these myself and I am very happy!

The Build

First, I installed the CPU onto the board and then the cooler. I had already installed a Freezer 7 Pro in my own system and was pleasantly surprised with how easy it was to install. It turns out that the cooler is actually even easier to install in an Intel-based system. I've scanned the instructions and uploaded them here, but the basic steps were:
  1. Placed the cooler mount over the socket, lining up the four corners with the mounting holes in the board.
  2. Pushed the four mounting pins through the holes in each corner until they "clicked" into place.

  3. Removed the fan from the heat sink.
  4. Positioned the cooler over the CPU, lining up the two holes on the mounting bracket with the corresponding holes in the mount itself.
  5. Screwed both sides in securely.
  6. Re-attached the fan to the heat sink.
The only potential problem I found with this cooler and motherboard combination is that the heat-sink actually prevents the installation of RAM into the slot closest to the CPU block. This will make upgrading the memory in the system slightly more difficult and expensive, as the optimal upgrade path is to replace the two existing DIMMS with higher capacity modules, instead of installing additional modules in the free slots.
Once I had the CPU, memory and cooler installed, placing the assembly into the case was simple. Connecting the front-panel I/O, case switches and LEDs wasn't too troublesome either, which is the part I usually find most frustrating when building a new system.

After that, I fitted the PSU and powered the system on; the system was built around a Sandy Bridge CPU, which meant I was able to check I'd correctly seated the processor and memory before I continued installing the rest of the components.

The final steps I took were to connect the hard drive, optical drive and then the GPU. Because of it's length, I ended up having to move the HDD lower in the case so I could squeeze in the GPU.


Overall, the entire build only took me around 2 hours to complete, which was far less time that I had originally expected! After another hour, the OS was installed and patched and the machine was ready... And I had one happy customer!

Tuesday, November 8, 2011

Continual Update of GFWL


Over the last couple of days, I've been plagued by Windows 7 continually prompting me to install Games for Windows Live 3.5 via Windows Update. I noticed the update was available over the weekend and I followed the usual Windows Update process to install the patch, but upon completion I was instantly prompted to install it again!

I actually ran through this a couple of times, both times the OS instantly reported the same GFWL update being available to install. The update history even showed the patch being installed multiple times... Anyway, a quick search online found a post describing a similar issue, but this time for for GFWL 3.0, instead of 3.5.

The solution, as it turns out was to completely remove Games For Windows Live from the PC and re-install. I accomplished this by following these steps:
  1. Navigated to "Programs and Features" in Control Panel.
  2. Located and uninstalled the application "Microsoft Games for Windows - LIVE"
  3. Located and uninstalled the application "Microsoft Games for Windows - LIVE Redistributable"
  4. Rebooted the computer (not strictly necessary, I wasn't prompted to, but I wanted to ensure no remnants of the GFWL client or application remained in memory)
  5. Downloaded and installed the latest Games for Windows Live client from the GFWL site.
After carrying out these steps, I went back to Windows Update and refreshed and found that the GFWL update disappeared from my list of available important updates!

Tuesday, November 1, 2011

Asinine AV "Alerts"

Being the "go-to" guy for most of my friends and family when they have a problem with their computer, I have seen some machines in terrible states. On the odd occasion I've had to open up the computer, they are usually filled with dust that clogs fans, heat sinks and exhaust ports. However, most of the time, the problem is software based, specifically the operating system.

Given the amount of malware that exists in the wild, it seems almost inevitable that the average consumer will eventually fall prey to some form of malicious software, whether delivered via a link in an email from a "friend", clicking a tempting ad on a torrent site, or even simply being unfortunate enough to navigate to a page containing an xss exploit. Some of the pop-ups masquerading as messages generated by the OS can be very convincing as well and scare users into clicking them by suggesting that their machine is "at risk".

While I despair at the number of ways a user can be trick into infecting their machine, I also find myself frustrated at the anti-virus companies themselves, for I have found they too can be responsible for helping a user compromise their machine. I'm talking about the stream of alerts and warnings that are generated by free security products, designed to coax a user away from the free product and onto a subscription-based version.

Obviously, it's in the AV companies interest to have more customers paying for their security tools and suites, so I understand the motive for embedding such messages into a free product. However, in my experience, once an AV suite's free trial expires the user will rarely fork out money to continue with the subscription. This is also an issue for free trials of AV suites that are bundled with machines. Essentially, the user continually ignores the warnings that their free trial has expired, which prevents them from downloading any additonal virus signatures or upgrades. The longer the user leaves it, the greater the risk of infection as their AV suite becomes more out of date.

I think what I find most disturbing about this trend is the wording used in these messages seem geared towards scaring users into upgrading. With phrases like "your PC is not fully protected" being presented to the user, alongside exclamation point warning signs, it's easy to become convinced that your machine is unsafe. This seems rather too close to the same tactics employed by FakeAV virus writers.

In my opinion, I think AV vendors should take two courses of action:
  1. If they are going to advertise their subscription-based product in the free application, then they should make it clearer that this is an advert and warn the user that agreeing to switch product will eventually require them to part with some money.
  2. If an upgrade does occur, it shouldn't have to be a manual process to re-install the free version of the product. Instead of preventing the software from receiving new virus definitions and attempting to warn the user if the danger, wouldn't it be easier to disable the components that make it a paid-for product?
I regularly recommend (and install) free security products, but I find it difficult explaining to people what alerts they should pay attention to and those they should ignore. As it stands currently, I tend towards ZoneAlarm (free edition) for the firewall and recently I switched my allegiance from AVG to Antivir, because of two events (coincidently, the same two events that spurred me onto getting this post published):

The first was a system tray alert from AVG informing me that it had protected me from over 400 threats this month, which I found rather alarming; both myself and my partner are careful users of the web and both of us tend to discuss any strange incidents that may occur during our day-to-day computer usage. I was fairly sure that with over 400 threats having been eliminated over the past month, there should have been some alerts from the AV software, and so I checked the application's event log to see when the system had been protected - nothing. There were no virus alerts that I could see, nor were there any viruses in the "Vault"; a quarantine area for suspicious files.

The final straw was during an upgrade to AVG Free 2012, I was prompted by the following dialog box to choose which version of the application to install:


First, if I had wanted to opt for the "full" version, I would have downloaded the relevant installer/paid for the product! However, I decided to investigate their claim that "you can always switch to basic protection later", in case it actually met my expectations as set out above. As I suspected; the only course of action was to completely un-install and re-install! I'm now keeping my fingers crossed that I don't have a similar experience with Antivir; otherwise I'll have to find another AV product to switch to!

Sunday, October 9, 2011

Caspian Border Screen Caps


Ever since I pre-ordered Battlefield 3 several months ago I've been looking forward to the 64 player maps with the wide array of vehicles to choose from. I rarely played smaller maps in Battlefield 2 and larger-scale action is what attracted me to ARMA 2. I've been playing a bit of the Beta over the last couple of weeks and while I really enjoyed Operation Metro, I was ecstatic when Dice and EA announced that they'd be opening up the Caspian Border map for the final weekend; it's what Battlefield is all about for me. Not only that, but I've since found that I tend to come out of rounds on the Conquest map with a higher score! I had been very worried about how my PC would handle the game, but it seems to perform well while at the same time look amazing. Interestingly though, the game has only been averaging around 20 frames-per-second. However, I think the issues are more down to lag; I saw several people complaining in-game about the same thing. Here's a few screen grabs that I took while playing Caspian Border: