Skip to main content

Dear HP & Microsoft - you're doing it wrong

So I got a new computer last week, of course after a day or so decided that I might want to do some work on it in which case I'd would prefer to have Ubuntu installed. I've never had too much trouble setting up a dual boot systems in the past; notable setups I've had include Gentoo/OSX, Ubuntu/XP and Ubuntu/Mint/XP/7.

So I got a brand new HP Pavilion with Windows 7 Home Premium pre-installed. It was nicely set up, had pretty much the latest drivers and if I was just wanting to live in a Windows 7 box things would have been sweet. I realize that most people fit in this category, but still not impressed with what follows. As laptops tend to these days the machine didn't come with any optical media for drivers or operating systems, instead there was a recovery partition taking up a 25GB hidden partition of my hard drive. This is fine. Perhaps an option to burn an installer DVD when you first turn it on would be a good option though.

I booted from a Ubuntu live USB and resized the Windows partition and installed Ubuntu 11.04. I missed the fact that Windows wasn't residing on a normal NTFS partition, I found out later that it was a "dynamic disk", resizing seemed to throw Windows in a violent way. Ubuntu installed the bootloader grub2 and listed Windows 7, Windows Recovery Environment and of course itself. I tried booting into Windows and it blue screened on me, same for safe mode and every option I could try. I booted into Ubuntu (which of course worked) and read forums and blogs to learn what had happened. Eventually I found that I should be able to recover the full partition structure with TestDisk, I couldn't really write a new Partition structure while running an OS from the partition I wanted to edit so I booted up Ubuntu live again and ran TestDisk to restore the original partition structure - effectively changing the index and deleting my existing Ubuntu installation in order to try get back into Windows 7. Sadly that didn't work, except to remove ubuntu and grub. The HP bios software has a link to "System Recovery" so I tried booting into that, for some reason it didn't work - I got to a black screen came up suggesting I insert my Windows Installation media and choose system repair. So I reinstalled Ubuntu in order to do further research and also to give me grub pointing at the Recovery Partition. So a rather large ordeal to get to the point of being able to boot into the Recovery partition! It started looking really good - Windows logo, HP stuff... So I get to the HP recovery menu - it has options for a factory setting reset and a minimized windows install. Not needed time to ponder that choice I opted for the minimal software install. The installer made in very clear that I would lose all my data and I would get a slightly less bloated Windows install than how I received the laptop - Great! I clicked through all the fluff it eventually got started. It got to the stage "Format the windows partition", looking like a champ. At 34% of the way through this crucial step though it failed with a horrible message "Recovery Manager Failed ERROR CODE = 0xEFFFFF08" oh joy.

Cue the reboot, yup you guessed it the system has been re-borked. I got into the recovery manager again, used grub command line from my Ubuntu USB something like:
chainloader (hd0,msdos5)+1
boot
Did the trick - back to square negative 1. This time I tried the other option - reset to factory condition. Can you believe that it got to 34% and threw the same error again. I wasted my time by trying both of these again before trying to alter the conditions. I got gparted running and tried to set the whole drive up nice for the recovery manager - I obviously left the recovery partition alone thinking it would eventually be convinced to do its job - I tried deleting all partitions then running the recovery tool => fail, I tried creating a 100MB NTFS partition called boot followed by a massive NTFS partition called system as it was when I got it => fail, I tried with just one large NTFS partition => fail, I tried with a logical partition with the boot and system partitions again => fail...

Eventually I came to the conclusion that who ever programmed the "Recovery" manager was probably a script kiddie with a mail order degree. Admitting defeat I went into the store where I got the laptop just days ago, I thought I was onto a winner after finding someone who actually knew what a partition was. Sadly after relating my tale of woe his best advice was try the recovery manager again. I said I'd tried quite a few times and that I was fairly confident that I'd covered that one. He said it would be impossible to get a DVD from the store without paying the $699 that a standalone Windows license costs. I asked what they could do and he said I could leave the laptop with them for a week or two and they would get it fixed. Brilliant, I really want to be without a computer for another few weeks (my existing one was stolen after the Christchurch earthquakes)

After I made it clear that I wasn't keen for that option he suggested downloading Windows 7 off the internet. I asked if he had a link because I'd had a quick look on HP and on Microsoft's websites for such a download but only found my way to their stores for purchasing Windows. The advice I got from the store was to download an ISO from thepiratebay or similar torrent sites. Since I purchased the laptop I  told him that resorting to illegal measures could wait until I have run out of other options. I enquired about using my friends Windows 7 Ultimate DVD to reinstall Windows on my laptop and the shop assistant said that should work fine and that he should have suggested something like that as his first idea.

I left the shop full of hope, thinking I'd get back to a Windows desktop with little or no further agony. Oh I wish it had been that simple.

So my friend gave me a DVD ISO which he told me had a folder of activation cracks and serial numbers included - I burnt the ISO to a DVD from my handy live USB operating system hoping to use my LEGITIMATE serial number from the bottom of my brand new laptop. I booted from the DVD and went through the install process - it didn't give me any options regarding version - it was just an Ultimate DVD and it wasn't until it had installed and rebooted that it asked for my serial number. I awkwardly read the number of the bottom of my laptop and triple checked it. After clicking next it took a long time to come to the conclusion that my key was valid but not matched to this Windows SLP. Starting to get a touch feed up by this stage I reinstalled Ubuntu and tried to forget about the Portal 2 game that I'd bought to play on my new high end laptop. After a few hours of sulking I decided to try again.

With a bit of googling I found a project to gather the OEM specific scripts and keys that go onto laptops, I downloaded the HP zip and mounted the Windows 7 iso in a writeable mode from Ubuntu. I copied all the content across and burnt my new, modified to look like an OEM DVD. This unfortunately didn't help at all and I got to the same point.

I got another Windows 7 ISO from another friend - this one was a retail "Windows 7 Professional" disk, but he said it was a universal installer - the checksum SHA-1 matched what was listed on Microsoft.com so I was much more confident that being a fully legit installer it would help me install the operating system. So I burnt it to a new DVD, booted the installer and got the option of Windows Professional 32 bit or 64 bit but no other options. Once again I didn't bother with the install because it clearly wasn't going to install the right version of Windows 7. I read online that in the Win7 DVD a file called ei.cfg within the sources folder was the only thing responsible for what version the DVD installed and that deleting the file. I can't remember if I tried deleting the file, but I do remember installing WINE in ubuntu and running a binary patch on the iso file to change its version to Windows 7 Home Premium.

I was running out of blank DVDs so I thought I'd do the same as I've done for the last few years with Ubuntu and install from a USB stick. I formatted a stick in fat32, ticked the boot flag and copied the ISO's contents to the USB disk. Attempting to boot from it got to a black screen complaining about something. I used grub2 to chainload into the usb, and got a different error - this one was complaining about the media not being "bootable" and asking me to insert my installation disk. I tried a few things from grub with loopback devices and mapping drives to try fool the thing but eventually decided that was just wasting time so I went and got more DVDs. I burnt my patched ISO and installed Windows 7 Home Premium and thank goodness it accepted my serial number.

Despite Ubuntu working with my laptops graphics, wireless, bluetooth and lan out of the box Windows 7 couldn't manage more than a low resolution graphics driver, bluetooth and no LAN and no wireless. I had to download drivers from HP and transfer them via USB before I could connect to my home network with either cable or wifi.

I'm writing this now from Windows 7, and I have internet. The thing is I'm not sure how long it will last - this copy of windows isn't activated because it says my product key is invalid for activation:

Thankfully I called the number and entered in my 48 digit installation ID and then entered in the 48 digit confirmation ID. Don't know why this transfer of digits couldn't have been done online but I'm glad it was activated. Thanks Microsoft for making this about as painful as it could be.

Popular posts from this blog

Bluetooth with Python 3.3

Since about version 3.3 Python supports Bluetooth sockets natively. To put this to the test I got hold of an iRacer from sparkfun . To send to New Zealand the cost was $60. The toy has an on-board Bluetooth radio that supports the RFCOMM transport protocol. The drive  protocol is dead easy, you send single byte instructions when a direction or speed change is required. The bytes are broken into two nibbles:  0xXY  where X is the direction and Y is the speed. For example the byte 0x16 means forwards at mid-speed. I was surprised to note the car continues carrying out the last given demand! I let pairing get dealt with by the operating system. The code to create a  Car object that is drivable over Bluetooth is very straight forward in pure Python: import socket import time class BluetoothCar : def __init__ ( self , mac_address = "00:12:05:09:98:36" ): self . socket = socket . socket ( socket . AF_BLUETOOTH , socket . SOCK_STREAM , socket .

Matplotlib in Django

The official django tutorial is very good, it stops short of displaying data with matplotlib - which could be very handy for dsp or automated testing. This is an extension to the tutorial. So first you must do the official tutorial! Complete the tutorial (as of writing this up to part 4). Adding an image to a view To start with we will take a static image from the hard drive and display it on the polls index page. Usually if it really is a static image this would be managed by the webserver eg apache. For introduction purposes we will get django to serve the static image. To do this we first need to change the template. Change the template At the moment poll_list.html probably looks something like this: <h1>Django test app - Polls</h1> {% if object_list %} <ul> {% for object in object_list %} <li><a href="/polls/{{object.id}}">{{ object.question }}</a></li> {% endfor %} </ul> {% else %} <p>No polls

Python and Gmail with IMAP

Today I had to automatically access my Gmail inbox from Python. I needed the ability to get an unread email count, the subjects of those unread emails and then download them. I found a Gmail.py library on sourceforge, but it actually opened the normal gmail webpage and site scraped the info. I wanted something much faster, luckily gmail can now be accessed with both pop and imap. After a tiny amount of research I decided imap was the better albiet slightly more difficult protocol. Enabling imap in gmail is straight forward, it was under labs. The address for gmail's imap server is: imap.gmail.com:993 Python has a library module called imaplib , we will make heavy use of that to access our emails. I'm going to assume that we have already defined two globals - username and password. To connect and login to the gmail server and select the inbox we can do: import imaplib imap_server = imaplib . IMAP4_SSL ( "imap.gmail.com" , 993 ) imap_server . login ( use