Peter's Blog

Redefining the Impossible

Items filed under windows


Somebody at work was fiddling with the fuse box and took out all the servers in the IT room. I rebooted them all but our main file server wouldn't boot, the hard disk partition was fried.

I used a knoppix CD (excellent tool for any pc that won't boot from its hard disk) to delete the corrupt partition and then reinstalled Windows 2k server on it. Experience has taught me that there is little point in trying to repair windows installations. Fortunately this file server is set up with two disks, one for the OS and another for the data. This is a nice arrangement as if either disk dies, that's approximately half the work required to get the thing back up. I only had to reinstall Windows.

Things were back online by lunchtime, the only problem being that one of the computers in the building was unable to access the new shared file system: mine! Vista strikes again (this is one reason why I am using Vista, to iron out these sillies). It wouldn't connect to the file share without prompting for user name and password and it wouldn't accept any that I gave (apart from those for a local account on the PC, it wouldn't accept domain account details).

I decided the problem may be that in my haste to get the files online and people working, I omitting to install the latest service packs on the server. I ran the setup for service pack 4 and then remotely rebooted the server from home early this morning while nobody was using it. I connected to it using an ssh tunnel and ultravnc. For reference, the ssh tunnel command was:

ssh -L 5900:192.168.0.54:5900 me@work.com

This is saying, 'connect port 5900 on the pc 192.168.0.54 on the remote network to port 5900 on my local pc'. I connected to a linux server and used this as a relay to connect to the file server. I was able to open ultravnc at 127.0.0.1:5900 and see the windows desktop of the file server. Secure, magical, free. Yes, I could do all this with VPN's, Windows Remote Desktop, Terminal Services or whatever but ssh/vnc is much easier to set up and is immune to random weird Active Directory problems.

I opened 'Computer Management' and 'Shared Folders' and 'Open Files' which gives a nice list of who is using the file server. One user had 'desktop.ini' opened, nothing important so ZAP.

Anyway, the service pack did the trick and when I got to work Vista connected instantly.

Lessons learnt:

  • Know where the Windows Install disks are
  • Have the licence numbers printed and hung on the wall (not in a file on the server that just died, in an Access 2003 database, in a room full of servers with no copies of Access).
  • Buy a UPS, although it runs the risk that nothing ever fails and everyone thinks administration is easy. With the right tools it is, but don't let the world know.

4 Comments

I wanted access to the help facility in Vista for reasons I forget now. I like the integrated search thing and I'm getting into the habit of just pressing the windows button and typing my query. I did this and typed 'help' and enter and what did I get? Windows Help? No. I got something called 'fxri'.

fxri turns out to be an interesting Ruby documentation browser with a built in Ruby Interactive Command Prompt. The documentation browser takes a few seconds to load but gives you very fast keyword filtering on search terms. The documentation displayed is a slightly crude monospaced text display (no hyperlinks) but can't beat the speed of access or the fact that there is a command prompt there to try things out immediately. Crude as it is, I think I prefer it to the approach taken by the web based ruby documentation: Frames? Web 0.5 anybody?

fxri gets the 'fx' part of its name from a gui package called Fox that may be worth investigating one day.

I must try typing more random words into the search and seeing what goodies I can find.

One other Vista note, it seems as if Microsoft are trying to disguise the annoyingly long time it takes for Windows to shut down by claiming to install an update every time.

Must say I'm still liking Vista, but still not enough to pay to upgrade my home pc's.


Filed under: fxri ruby vista windows

2 Comments

Choice 1:

Choice 2:

  • Buy Windows Vista Upgrade for £100
  • Struggle all weekend with compatibility problems

Choice 1 gives me a transluscent UI, desktop search and I can keep the pinball game I never play.

Choice 2 gives me less time to play World of Warcraft.

To be honest I have stopped using Google Desktop Sidebar: it kept making itself six inches wide whenever the pc booted and I was tired of resizing it.

Then again, maybe an OS upgrade will stop SVCHOST.EXE crashing every time I shutdown? The PC is about two months old now, that's how long it takes a Windows install to degrade.

I used to be open minded about operating systems but then reality set in.

NB I will inevitably cave and get Vista. Could the Multimedia TV stuff actually work? Streaming to an XBOX 360 sounds cool.


Filed under: windowblinds windows

Add a comment

Interesting tip: setting this in the registry

HKEY_CURRENT_USER\Control Panel\Desktop\AutoEndTasks = 1

causes Windows 2000 and later to automatically kill any tasks that haven't shut down after 30 seconds. No more getting into work in the morning to find your pc has been on all night because some stupid app refused to die.

Remember to save those vital Word documents.


Filed under: windows

Add a comment

My new monitor has an abundance of screen space that was begging to be used. When apps are maximised they are just too big, there is ample space to have widgets down the side.

I contemplated the widget options:

  • Google Desktop Search
  • Yahoo Widgets/Konfabulator
  • Stardock ObjectBar or DesktopX

I decided it was time to give Google Desktop Search another try. In addition to search it gives me a desktop bar down the right of the screen showing pending email, family photo's etc. It has a number of features that I hadn't tried out before:

  • press ctrl button twice for a quick search dialog. Bang in the first three letters or so of a program name and you can launch an obscure program in seconds whichout resorting to the mouse and start menu.
  • the widgets include a scratchpad and a todo list. It is possible to store the notes and todo's on google's servers such that they appear at every pc you use. Ok this relies on trusting google so better not put your evil plans in the todo list. UPDATE: it takes a minute or two for notes to appear after booting up.
  • Google Calendar widget integrated with google's online calendar.
  • they have prettied up the widgets with transparent backgrounds etc. You can drag them off the desk and put them where you like.

I was previously happy with Microsoft's MSN Desktop Search apart from it persistantly failing to stop when I shut down the computer. I'll give google another try but I don't rule out vacillating back.


Filed under: google windows

Add a comment

I don't normally put gui's on my python scripts but I am doing something for a client and cannot rely on them using the command line. All my script needs is the name of a directory to work with.

The following is a distillation of how to show the dialog for browsing for a directory under python and the win32com module.

   1  from win32com.shell import shell
   2  
   3  oNeedlesslyComplex = shell.SHBrowseForFolder(0, # parent HWND
   4                                  None, # root PIDL.
   5                                  "Choose directory to convert", # dialog title
   6                                  0, # flags
   7                                  None, # callback function
   8                                  None) # 'data' param for the callback
   9  
  10  if oNeedlesslyComplex[0] == None:
  11      pass
  12      # cancel pressed
  13  
  14  #
  15  # Get selected folder from weird return value.
  16  #
  17  strPath = shell.SHGetPathFromIDList(oNeedlesslyComplex[0])

win32com is powerful but little documented.


Filed under: python windows

Add a comment

No, not WoW, something techy for a change, how to migrate a Dell Precision 390 to Raid.

My Dell Precision 390 came with a SAS Raid controller and a pair of 143G disks. However it had been configured with one disk as a plain drive C and the other unconfigured. I had the following options:

  • format the spare drive and use it as drive G: or mount it as a folder under the C drive. I didn't want to do this as it involves having to manage two drives which I don't want to worry about which disk a file will be stored on.
  • reconfigure the system for Raid 0. Raid 0 would give me in effect a fast single 270G drive but it would have half the reliability of the single drive: if either drive dies I lose all my data.
  • reconfigure the system for Raid 1. Raid 1 would store everything on both drives, giving me two copies of everything. If one drive dies, the data is already on the other drive. They call this mirroring, it is not exactly like a real-time backup as if you accidently delete a file, both copies on both disks are instantly deleted. Raid 1 only saves you from drive failures, not OS level errors.

I decided on (drum roll) Raid 0. Raid 0 and Raid 1 will give some speed improvements (maybe 10-20%) but I wanted the advantages of 270G of linear disk space. This is my home PC and apart from family photos there is not much 'critical' data on it: I won't lose my job if it went pear shaped.

How to reconfigure it? The OS is on one of the disks that will go into the Raid array which makes things interesting. Here are the steps:

  • Download the trial version of True Image 10
  • Use it to create a recovery CD
  • Make sure you can boot from the recovery CD. Since my system was SAS (serial SCSI) I used the 'full' recovery program, not the simple DOS one.
  • Reboot to windows
  • Use True Image to backup the windows partition to a USB hard disk. This took about an hour, 46G of data used 35.6G of disk space.
  • Reboot PC into Dell SAS bios and set up your disks in a Raid array (0 or 1). When it warns about you losing all your data laugh in it's face.
  • Reboot from Windows XP installation disk. Go through the part of the setup that creates an NTFS partition. After this, when windows starts copying files, kill the setup. This step is necessary because the trial edition of True Image cannot create NTFS partitions.
  • Reboot from the True Image recovery CD.
  • Use the Restore option to restore the backup of the partition to your new NTFS partition. This took less than two hours.
  • Reboot into Windows Installation CD. This time go into the recovery console.
  • Run the following commands:
    fixmbr
    fixboot
    bootscan /rebuild
    
    Bootscan will prompt you for a name for the partition and boot parameters. Give it a name that shows suitable contempt for Windows and leave the options blank. My Dell came with two partitions, one containing Dell Diagnostics and one containing Windows. When I restored I had zapped the Dell Diagnostics partition as all that stuff is on a CD anyway. However it meant that my restored Windows system didn't boot because the boot.ini file was telling the boot loader that it was on the second partition rather than the first. Hence I needed the bootscan /rebuild to get the restored partition added to the boot.ini. True Image will restore the MBR itself, I just did all this to make sure (it takes ages to boot the recovery console so I did everything I could there to get things working).
  • Reboot into Windows. You may be prompted which partition to boot from, choose the one you added with bootscan.
  • Clean up boot.ini. The following should be ok:
    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
    

For some idea of speed, Firefox nows boots in three seconds. Open Office Write boots in four seconds. It's quick.

I was very impressed with True Image and could be tempted to buy it ($50):

  • It can be used for daily incremental backups that are easily capable of restoring the system and not just to the original hard drive but to any other drive if necessary.
  • It handles USB and SCSI without blinking.
  • It can resize partitions as it restores them.
  • It will 'clone' disks (copy contents of one to another). This is the first time I've used a tool like this that has actually worked.
  • You can restore individual files from the backup

For $50 I could have True Image handling daily backups to my USB disk and still be able to sleep nights with my unreliable Raid 0 array.


Filed under: dell warcraft windows

2 Comments

I needed a way to stretch The Beast. I was intrieged by the screen shots in Microsoft Flight Simulator X and further investigation found that it has high system requirements (odd for a Microsoft product). I haven't tried a flight simulator for about 15 years and back then realism was restricted to a screen that was half blue and half green. I never got into making a landing and was frustrated by the poor graphics making it hard to tell how far above the ground you were.

The Beast came with an NVidia NVS 285 graphics card which is a high end 2D card for workstations, no good for 3D graphics. After some research ended up buying an XFX 7900GS card: not the best available, a slight compromise. Plugged in, Just Worked.

Downloaded the flight simulator demo (800M file, not without some hassle) and had a play. The games loads up with reasonable speed on The Beast, I've played games that were more frustrating in the past (the original Half-Life springs to mind: I played it on hard and did a LOT of reloading).

First impression was that it was nothing special. Start off trying to drop flour bombs onto targets from a Microlight and it's pretty much impossible to control the thing using mouse as a yoke. Later I altered the sensitivity of the controls, turning them down and reducing the dead band in the middle and it was better but still very hard. It's like those driving games where the slightest touch of the 'wheel' sends you careering into a wall: totally unlike actually driving a car (at least the cars I have driven). Other aircraft were easier to control. Taking off in a Lear Jet was fun.

Being a demo it comes with no manual so it's a bit of a challenge working out how to drive it, a matter of pressing all the buttons to see what happens. You can go into the keyboard setup and look at all the assignments but you can't print them out.

I altered the display settings to make it more of a challenge. I turned up the auto-generated scenery and some of the effects. I turned off the bloom effect which is reputed to slow things down. I started a new flight (don't seem to be able to change settings mid flight) and it was better. Water has realistic reflections and sure enough there are little trees and houses all over the place. These were actually a little naff, all the trees look the same and as you fly along forests in the distance suddently appear, as if they grow out the ground as you approach. There were silly bugs like trees on the side of hills appearing to float with just one edge of the base touching the ground. It could do with more anti-aliasing as the trees were rendered with unrealistic sharpness. The frame rate with this was ok, very slightly juddery when banking but nothing to make me rush out for an SLI setup.

Later in the day I tried a flight and found it was night: it had looked at the clock and decided that because it was evening time I would get a night flight. I gave it a try but apart from being scary flying towards hills in the dark there seemed to be more bugs in the scenery with trees and houses floating in the air (or it may have been showing the ground under the houses/trees in the wrong colour, giving this effect). Does make me appreciate WW2 pilots though.

Overall I wasn't bowled over by it but I have bought a copy of the Delux version from an Amazon marketplate for £24 under what they wanted for it in town. I like the idea of flying around London, New York, Las Vegas etc but the demo only has a few sparse carribean islands. Also the full version has tutorials which would hopefully show me how to use it.

I've read that people set up virtual airlines and play at being pilots, maybe even wearing hats. Not sure I could get into that but this does seem like a nice diversion.


Filed under: games windows

1 Comment

The Beast arrived five days early. Only an hour or so to play with it what with life and all. First impressions:

  • Heavy. Solidly built case. Nice quality, nicest desktop case I've ever laid hands on.
  • Side panel comes off really easily. Disk drives unclip, can tell I have a pair of Maxtor Atlas 140G 10,000rpm drives.
  • Microphone and Heaphone jacks on the front: very thoughtful. Also a couple of USB holes. No sign of a reset button! Big dropoff for a Windows box.
  • Takes 30 seconds to boot, most of this seems to be the serial scsi controller looking for the drives.
  • Fairly quiet, not silent it does make a low hum. There's a huge fan inside with vents about 6 inches square. Big fan = slower rotation = quieter. Could live with it running all the time.
  • When it booted it was infected with McAfee Security stuff. Had to spend a few minutes figuring out how to disable it enough for the uninstall to work.
  • It is fast: it installed firefox virtually instantly. Silly things that shouldn't have ever been slow like the control panel pop up immediately.
  • The programs menu includes the 'Dell SAS Raid Storage Manager' which asks for a username and password. Beast came with no manuals so I'm going to have to google for those at some point. Doesn't seem to be configured for Raid, have to think about that one. Do I care?
  • Came with keyboard and mouse and a couple of Install CD's but no mains cable or manual. Keyboard is a black Dell one with a useless windows button but I'm keeping the Cherry one I was using as it has a nicer feel.

Happy thus far. Using it to type this. Can you tell the difference?

Have to find something taxing for it to do.


Filed under: dell gadgets windows

8 Comments

I came across an interesting tool and immediately used it to solve a problem I had solved once before. The problem? I inherited a PC with filezilla installed and a load of ftp accounts set up with passwords I did not know. How to get the passwords?

The tool is the Microsoft User Mode Process Dumper. What is does is it dumps the memory image of a running process to disk where it can be inspected. I used this to dump a running image of filezilla. I ran the image through the 'strings' utility from cygwin to strip out everything but english looking strings and then opened the resulting file in vim. Search through this for the ftp account names and there in all their glory are the passwords. Easy. Took about two minutes, most of this figuring out the command line for userdump which is merely:

userdump 1072

where 1072 was the process ID of filezilla from Task Manager.

This technique would work with any software that loaded all passwords into memory and held them in there in an unencrypted state. The beauty of this is the speed, no messing with debuggers, ploughing through hex memory dumps, get the command line to do the work.

Moral: security is not easy.


Filed under: filezilla windows

Add a comment