June 25th, 2011.
Resizing an ESX Virtual Disk and winload.exe Errors
After around three months of installing various software that uses SQL Server 2005 on my ESX server, my SQL VM finally reached it’s disk limit. I was poking around in the command line for the actual ESX server, and found a tool called vmkfstools that could do the job for me. You can resize the disk by running the command:
vmkfstools -X <size-in-mb>M <image-file>
So for example if i wanted to resize the file server.vmdk to 60GB, I would run:
vmkfstools -X 60000M server.vmdk
That was the easy part. Now I booted into Hiren’s BootCD (you can find this on the net), and ran Acronis Boot Manager to resize my partition. You can alternatively boot into the Recovery Console for Windows 2003/XP or run the Command Line on Windows Vista/2008 and run diskpart to accomplish the same thing.
That went all well and my disks were properly resized…. or so I thought, till I was greeted with the following message on boot:

Winload.exe?! Well scared that my OS was corrupt, I booted into the Windows 2008 Server CD and ran the command prompt. dir C:\ still showed all my files there, and C:\Windows\System32\ still had winload.exe in it. Just for shits and giggles, I replaced the file with the one in X:\Windows\System32 and tried rebooting.
Still didn’t work.
I booted back into the install DVD, clicked “Repair Computer”, but this time I noticed that my disk size was 0, and it said “Unknown” next to the disk. My gears were turning, and I realized that this might mean that my MBR was corrupt. Running bcdedit.exe /v confirmed that. Instead of saying:
device partition=C:
it said
device unknown
Recalling what I did a year a so back when my MBR was corrupt, I ran the following commands:
bootrec.exe /FixMbr
bootrec.exe /FixBoot
bootrec.exe /RebuildBcd
As soon as I rebooted, my system booted up without any issues!
Hope this helps anyone else this has happened to,
Brennan
June 4th, 2011.
Configuring SharePoint AAM
When using SharePoint with a proxy server such as ISA, you will need to configure SharePoint Alternate Access Mappings (AAM) if the external address and the internal address are different. For example, if your internal address is http://wssserver/ and your external address is http://wssserver.domainname.com/. Here is a simple guide to configuring AAM on MOSS or WSS Server.

- Open up your SharePoint Central Administration on the server running SharePoint.
- Navigate to Operations under Central Administration.
- Open up Alternate access mappings under Global Configuration
- Click Edit Public URLs
- Select your Alternate Access Mapping Collection (your web application)
- Then enter the respective URLs that the application will be accessed via.
- I usually do an iisreset /noforce after this.
I found that the other tutorials on the internet wern’t straight to the point, and it was hard to understand them. Hopefully this clears things up for Sharepoint novices out there!
Brennan
May 22nd, 2011.
Apache SSL Certificate Without Passphrase
From time to time I have to generate my own SSL certificates for development purposes in Apache, and I keep on forgetting on how to do it without apache prompting me for a password everytime I boot and/or run apachectl. Here is a down and dirty quick how-to.
Step 1: Generate Private Key
openssl genrsa -des3 -out server.key 1024
Step 2: Generate CSR
openssl req -new -key server.key -out server.csr
Step 3: Remove Passphrase
cp server.key server.key.org
openssl rsa -in server.key.org -out server.key
Step 4: Sign the Certificate
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
After that, copy your newly generated keys to wherever your server stores your keys (in my case /etc/apache2/ssl/)
I hope this reference saves some time for some people
Brennan
April 26th, 2008.
ISA 2006 and BlackBerry Enterprise Server
I recently was required to install BlackBerry Enterprise Server (BES) on our corporate network. I did the usual configuration following the step that I found on the BB site here.
I then proceeded to make an ISA Firewall Rule that enabled outbound acccess from the bes server (a computer object) to external on port 3101. I also created the corresponding inbound rule on port 3101 as well just to be extra sure.
I followed the steps word for word (or so I thought), and tried syncing a BlackBerry to the servers, and it just timed out on me. So then I went back to the drawing board, and realized that I didn’t setup my permissions on the Active Directory (AD) user accounts properly. So I uninstalled the server, followed the following steps:
- Local Administrator rights on the BlackBerry Enterprise Server
- Local Security Policy permissions for the BlackBerry Enterprise Server service account
- Microsoft Exchange permissions at the Administrative Group level
- Microsoft Exchange permissions at the Microsoft Exchange Server level
- Send As permission at the Domain level
- Database permissions for managing the BlackBerry Configuration Database
And reinstalled the server. Still no avail. I looked into the logs and noticed this line in the BES_DISP logfile:
IPPa] {User Name} Forwarding status to BES Agent (S61887304_001), intTag=5, extTag=1
[30222] (03/20 16:20:19.482):{0×898} {User Name} MTH: contentType=OTAKEYGEN, sizeOTA=216, sizeOTW=216, TransactionId=-941432706, Tag=2
[30310] (03/20 16:20:19.482):{0×898} {User Name} Forwarding internal data to device, contentType=OTAKEYGEN, routing=S61887304, device=301D4AC4, size=258, cmd=0×3, ack=0, TransactionId=-941432706, intTag=8, Tag=2, Submit=1
[30375] (03/20 16:20:19.576):{0×8A0} {User Name} Packet returned as FAILED – could not be delivered to device, Tag=2
After doing some research, I found out that you NEED to have the BES option on your phone which can only be set by your carrier. To find out if you have this or not, just go to options -> advanced settings and see if theres an option for Enterprise Activation anywhere. If there isn’t, that means that you do not have the BES package. To get this, just phone your carrier, and ask them to add BlackBerry Enterprise Services (BES or pronounced B’ezz) to your account and you should be good to go!
Brennan
April 3rd, 2008.
WP-Super-Cache for WordPress 2.5
I’ve recently upgraded to WordPress 2.5 and realized that WP-Cache has stopped working. I decided to search for alternative solutions for WordPress caching, and on a comment for WP-Cache, I discovered WP-Super-Cache. It seems a lot better than WP-Cache from my preliminary analysis. Wp-Super-Cache can handle nearly 2500 requests per second (as opposed to 4 without any caching). I do notice a faster load speed even by using my browser (I have 5 static IPs, and since my switch isn’t working correctly, all my network traffic is getting routed to my ISP and back).

To install the plugin, just download it from here,install it as usual by putting into your wp-content/plugins folder, activate it using the Plugins menu. Now, before configuring the plugin, you must put the following code in your .htaccess in the ROOT of your web server:
—————–.htaccess—————–
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} !.*s=.*
RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz [L]
RewriteCond %{QUERY_STRING} !.*s=.*
RewriteCond %{HTTP_COOKIE} !^.*(comment_author_|wordpress|wp-postpass_).*$
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f
RewriteRule ^(.*) /wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html [L]
# BEGIN WordPress
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
—————–.htaccess—————–
After you have done that, you should be able to configure all the features in WP-Super-Cache.
By the way, if anyone is wondering, and/or anybody wants a GREAT PuTTY mod to use, use PiETTY. I have been using this client for over a year now. It has full UTF-8 Asian language support, and alphablend transparency. It looks sweet when used together with Vista’s Aero.
Brennan
March 8th, 2008.
ISA 2006 and Outlook Anywhere
Another one my wonderful fixes/tutorials on what Microsoft should have flippin documented in the first place. But I guess they can’t test and document everything eh?
Well heres how you get ISA 2006 and Outlook Anywhere with Exchange 2007 to work nicely using NTLM Authentication.

WARNING: You must have OWA and Outlook Anywhere running on different web listeners.
- First Configure your Firewall Rule authentication method to “No authentication, but client may authenticate directly”
- Then set your Web Listener to HTTP Authentication with Basic and Integrated authentication methods selected.
- Go to the Exchange Management Console and make sure that Outlook Anywhere is set to NTLM Authentication mode. You can do this under the “Server Management” area.
- Go to the IIS Management Console, and make sure that Integrated Authentication is enabled for your Outlook Anywhere Web Site (usually “Default Web Site”)
- Switch over to NTLM Authentication in Outlook, and you should be rockin!
By the way, this isn’t as secure as using Basic authentication because ISA is just passing the session through to the Exchange server, and not proxying everything. But I’d say not having to type your password everyime is worth that sacrifice.
Brennan
March 2nd, 2008.
Tyan K8WE Option ROM Issue
A few nights ago, I needed to get a couple Promise FastTRAK SATA RAID cards because my onboard ones just weren’t cutting it. I connect them to my PCI32 3.3V slots, boot up my system, and it goes through the whole detection process for my JBOD disks. Then it tells me that there is not enough Optional ROM space to continue…. WHAT?! I mean this is a $500+ board we are talking about here! Not enough space?! Give me a break.

I was running BIOS version 1.03, and there didn’t seem to be any fixes related to the BIOS looking at the updates, but I decided to upgrade to 1.05 just for the hell of it.
No Luck.
I tried disabling all the on-board features (SATA, SCSI, MAC PXE OptROM), and it still errored out on me. Why should I even have to try that on a high-end, server-class board.
No Luck.
I ended up taking one card out, configuring the RAID, and switching the cards and configuring the other one. Then I put both cards in, disabled the OptROM Boot Error Check, and just living with the issue. But why should a board of this class have issues like this? I’m seriously tempted to phone Tyan to get a replacement board or some kind of solution for their crappy-ass quality control.
Brennan
February 27th, 2008.
ISA 2006 and Dynamics CRM 4.0
Some of you may be having a hard time configuring CRM 4.0 and ISA 2006. All seems well when you use the web client, but when you try to configure your Outlook Client, you get:
“The request failed with HTTP status 401: Unauthorized ( The server requires authentication to fufill the request. Access to the Web server is denied. Contact the server administrator. ).”

I finally found a solution(s)!
Method 1:
- Run the following SQL command (replace addresses with yours (address:port)
USE MSCRM_CONFIG
Update DeploymentProperties SET NVarCharColumn = ‘my.crmserver.inet:80′ WHERE ColumnName = ‘AsyncSdkRootDomain’
Update DeploymentProperties SET NvarCharColumn = ‘my.crmserver.inet:80′ WHERE ColumnName = ‘ADSdkRootDomain’
Update DeploymentProperties SET NvarCharColumn = ‘my.crmserver.inet:80′ WHERE ColumnName = ‘ADWebApplicationRootDomain’
- Run regedit on the CRM host computer, and navigate to HKEY_CURRENT_USER\SOFTWARE\Microsoft\MSCRMClient. You now have to update the following keys
• IntranetDiscoveryUrl
• IntranetServerUrl
• IntranetWebAppUrl
• PlatformRoot
To point to your External CRM URL.
- Enable just Basic HTTP Authentication on the Web Listener in ISA
- In the Authentication tab of the Firewall Policy for the CRM, select “No authentication, but client may authenticate directly”.
- In the To tab of the Firewall Policy for the CRM, make sure “Foreward original host header” and “Requests appear to come from the original client” is selected.
- In the Users tab of the Firewall Policy for the CRM, make sure it is “All Users” Instead of “All Authenticated Users” (CRUCUAL STEP)
- Apply the settings in ISA.
- Now go to “Internet Settings” on the client computer, and navigate to the security tab.
- Click custom level on the trusted site, and scroll to the very bottom and select “Automatic logon with current user name and password”.
- Add the CRM url to the trusted sites without the prefix (aka. not http://crm.company.com and just crm.company.com).
- Navigate to http://crm.company.com and type in your login credentials. AND CLICK REMEMBER PASSWORD.
- Run the configuration wizard, and it should work *smile*
Method 2:
- Download the Internet Facing Tool from Microsoft.
- Extract the downloaded file to drive:\Program Files\Microsoft Dynamics CRM\Tools
- Run the tool.
- In the IFD boxes, type in your EXTERNAL URL and in the internal box, type in your INTERNAL URL.
- Select whether to use HTTP or HTTPS for both the IFD Address and Internal address.
- Apply, and reboot!
- Now go to “Internet Settings” on the client computer, and navigate to the security tab.
- Click custom level on the trusted site, and scroll to the very bottom and select “Automatic logon with current
- user name and password”.
- Add the CRM url to the trusted sites without the prefix (aka. not http://crm.company.com and just crm.company.com).
- Navigate to http://crm.company.com and type in your login credentials. AND CLICK REMEMBER PASSWORD.
- Enjoy!
If you don’t have any internal users, I’d recommend using Method 1, and if you want SSL and/or want to differentiate between external and internal users, use Method 2.
Brennan