Archive for November, 2009

Published by Rolf on 24 Nov 2009

Windows 7 Installation Woes

Windows 7 is of course, out, and after painlessly upgrading to it, from Vista, on my laptop (and hearing other people have trouble-free experiences as well, I took the plunge a few days ago and decided to upgrade my main PC from Vista Ultimate to Windows 7 Ultimate.

First a few points of background:

  1. I am not an idiot. Before starting, I did a Complete PC Backup of the entire C: drive, to an external hard drive. Just to be safe, I also made an image using a LiveCD of the excellent, and free, CloneZilla.
  2. As a very early adopter of Vista (I was in several beta programs starting in 2005), I was prepared for some hiccups. Microsoft took plenty of well-deserved lumps for their poor rollout of Vista, in particular their poor coverage of device drivers – in my experience the video drivers were the worst culprits. But since I understand how hard their job is (by relying on 3rd-party manufacturers instead of the homogeneous market Apple has cultivated), I was going to be a somewhat tolerant of potential problems, just as I was with Vista.
  3. I’m on 32-bit, and will stay there. I know better than to switch. No need for 64-bit since this computer is for business, not video games.
  4. My PC is a medium-to-high-end Dell, with a decent nVidia graphics card. I don’t have any “old” devices so I think it is fair to demand 100% driver support.
  5. Since this is my primary PC, it has a lot of programs and settings installed on it. So a Clean Install is not an option (I couldn’t even find the many boxed CD’s anymore if I wanted to). Note to Microsoft: if you want to sell a new OS every 2-3 years, it’s totally unreasonable to expect anyone to either buy a new PC or do a Clean Install on an old one and then have to reinstall and reactivate everything, just to get it. So don’t try to push those options on me!

I took a deep breath, clicked “OK”, and then set it on its way while I went to bed. Now, two days later, I’m feeling pretty negative on the decision right now. Vista, for all its faults, at least installed like a charm. Windows 7, not so much…

Attempt #1: the installation failed and it rolled back to Vista.
I happened to see it give me a Blue Screen of Death and the reboot. A bit of Googling while the PC goes about rolling back to Vista, and I find that someone else has had the exact same error. I hunt for the installation log (which inexplicably is not linked in the error dialog I get when Vista finally loads!) and see an error relating to some Bluetooth driver (by the way, I have no Bluetooth devices installed). But given the horrid experience I have had with my nVidia graphics drivers since Vista released, I have no doubt that the stupid video card is somehow involved. So like the guy in this post, I shutdown the PC, removed the nVidia video card entirely, then rebooted and tried to upgrade again.

Attempt #2: Installation hangs at 62% done.
This has been reported tons of times, and apparently has to do with some service not running. I followed the Microsoft recommended solution, rebooted to make sure the new environment system variable was set, and then tried again.

Attempt #3: Installation actually got LESS FAR ALONG this time, now hung at 42% done.
Unfortunately I can’t find any reports of failure at this specific point so I figure it’s just a weird temporary problem and then hard reboot (since there is no “Cancel” button on the installer screen). Sadly this then hoses the Vista rollback process – upon reboot, I get an error message saying some file cannot be found and I should run chkdisk. OK, sure I’ll do that – but that means I have to hard reboot again, which promptly brings me to a command prompt. So I run chkdisk, it finishes successfully after fixing a few things, and I hard reboot again (since “shutdown /r” for some reason doesn’t work), and I get brought back to the same command prompt. Which means I am stuck in a loop, great – in a horrible limbo between Vista and Windows 7.

Good thing I made an image with CloneZilla, so I reboot again and restore to that. In case you’re wondering why I didn’t try to use a Vista (or Windows 7) DVD in “Repair” mode, there’s a simple answer: given the state, I couldn’t figure out which one would be appropriate! And instead of risking choosing the wrong one, I just went with the CloneZilla image. Two hours later and I am back to square 1 – but at least I have a functional Vista PC again. And at the risk of belaboring the obvious, please note that the only product I have used so far in this ordeal, that has worked perfectly, is the free, open-source one. ‘Nuff said.

So the good ending to this story, finally, is that this last attempt was successful. There were a few stressful points where it appeared to hang again (probably for at least 20 minutes at a time), but I stayed patient and finally have it booting into Windows 7. Let’s all hope that the grandmas out there don’t have the same horrible time I did.

Published by Rolf on 11 Nov 2009

Configuring vhosts the right way on Plesk

Plesk warns you, emphatically, not to mess with the auto-generated conf/httpd.include:

# ATTENTION!
# DO NOT MODIFY THIS FILE OR ANY PART OF IT. THIS CAN RESULT IN IMPROPER PLESK
# FUNCTIONING OR FAILURE, CAUSE DAMAGE AND LOSS OF DATA. IF YOU REQUIRE CUSTOM
# MODIFICATIONS TO BE APPLIED TO THE CONFIGURATION, PLEASE, PERFORM THEM IN THE
# FOLLOWING FILE(S):
# /var/www/vhosts/yourdomain.com/conf/vhost.conf
# /var/www/vhosts/yourdomain.com/<subdomain-name>/conf/vhost.conf

Believe them. As tempting as it is to just put your customizations into that, don’t. Plesk will overwrite that file if you’re not careful (and yes, I found out the hard way).

So indeed, put your customizations into conf/vhost.conf as it recommends. But just creating the file isn’t enough, you also have to notify Plesk that it’s there as described here, then just bounce Apache.

# /usr/local/psa/admin/bin/websrvmng -a

(Feature request for Plesk: create an empty vhost.conf by default and include it so it’s ready to go).

Published by Rolf on 11 Nov 2009

SSH logins slow? There’s an easy fix

In setting up passwordless OpenSSH connections between two CentOS boxes, I was surprised to find that I could connect from the client the server, but it was really, really slow. As in, it took over a minute to connect, after which it was snappy.

Fortunately, a quick Google and I find that the OpenSSH manual has this relevant FAQ. I tried all the suggestions (couldn’t get far testing ssh-rand-helper, though, since it wasn’t apparently installed), but editing /etc/ssh/sshd_config on the server, to set

UseDNS no

was the trick. Restart sshd, and it works like a charm.