Thursday, July 18, 2013

One minute Windows 7 boot delay

I was recently upgrading my primary boot disk in my desktop PC (upgrading from an OCZ Vertex2 to a Samsung 840 Pro SSD) and after the usual exercise, I found an odd problem.

During bootup, the system would hang on the "Starting Windows" screen (the throbbing windows logo) and pause for about one minute. After this delay elapsed, my KB would then initialize normally, and the boot splash screen would disappear and normal bootup would take place.

After a lot of trouble I discovered the following were not the source of the problem:
  • Rolling back recent Windows Updates
  • My new SSD disk (vs. the old one)
  • SSD settings in WIndows
  • SSD drive firmware
  • AHCI settings in BIOS/Windows
  • MS AHCI drivers vs. AMD AHCI drivers
  • BIOS disk boot sequence
  • Removal of my SATA DVD-RW drive
  • Hibernation and Pagefile settings and systems

I list these here because they include most of the usual suspects to investigate when trying to solve boot delays.

In the end, the solution was simple. I had to unplug my external Thermaltake BlackX eSATA disk dock.

I had plugged it in as part of my boot disk cloning (I use TrueImage) and hadn't removed it. When it was connected but with no disk in it, it caused the system boot hang.

I don't know for sure, but I'm guessing it was causing some 60-second AHCI disk command/discovery to timeout during boot.

Thursday, July 4, 2013

Sventon 2.5.1 with SVN server 1.7+ to view/download files

The Sventon tool is a useful web interface to allow browser access to Subversion/SVN data repositories.

It is particularly useful when your repositories are not hosted with Apache, and you want to give some level of read/view access to data in your repository without requiring the installation of a tool like TortoiseSVN.

While useful, Sventon v2.5.1 hasn't changed in a few years, and unfortunately is not fully compatible with Subversion servers running engine 1.7 or later. In particular, while most aspects work, viewing the actual contents of a file in the repository causes an error "Cannot get contents of file".

The problem is that Sventon includes a copy of the SVNKit library 1.3.4, and this version unfortunately has a bug uin it, which means certain types of requests to the SVN server no longer work (for security reasons, server 1.7 adds additional checks and verifications and rejects the slightly erroneous requests from Sventon/SVNKit 1.3.4.)

Luckily, the solution is quite simple. While Sventon hasn't been updated, it's relatively simple to manually upgrade SVNKit from 1.3.4 to verison 1.3.8, which corrects the bug and works fully with SVN server 1.7 and 1.8.

So to solve the problem:

  1. Back up your working Sventon deployment, configuration, and cache, just so you can revert if needed.
  2. Download SVNKit 1.3.8 (I avoided and have not tested SVNKit 1.7.9)
  3. Shut down your application server (Tomcat6, etc) or at least stop the /svn application.
  4. Copy all files from the 1.3.8 /lib directory, into the lib directory for your Sventon deployment (e.g. webapps/svn/WEB-INF/lib)
  5. Remove all duplicate prior versions of JAR files from that Sventon deployment that were replaced with newer equivalents from SVNKit 1.3.8 vs. 1.3.4:
    • svnkit-1.3.4.jar (replaced by 1.3.8)

    • antlr-runtime-3.1.3.jar (replaced by 3.4)
    • jna-3.2.2.jar (replaced with 3.4.0)
    • sequence-library-1.0.0.jar (replaced by 1.0.2)
    • sqljet-1.0.3.jar (replaced by 1.1.2)
    • trilead-ssh2-build213-svnkit-1.3-patch.jar (replaced with 1.0.0)
  1. Create an equivalent svn.war that includes the same changes as above.
  2. Restart Tomcat/Sventon and verify functionality.

Using this approach, you should be able to fully use Sventon 2.5.1 on newer Subversion servers based on SVN 1.7 and 1.8!

Important Note: it may be possible to just upgrade WEB-INF/lib/svnkit-1.3.4.jar to svnkit-1.3.8.jar, but I haven't tested that. I chose to update all the libraries that SVNKit ships with, and have not seen any problems in doing so.