Friday, June 5, 2015

Resurrecting a TomTom XL

I'm a longtime fan of TomTom GPS devices, and thanks to my friends over at w00t, I've bought quite a few over the last score years, gifting some and reselling others.

While my most reliable mapping/routing service (recently) has been Waze on my iPhone, I've had an older TomTom XL·S 310/340 that I've kept in the company car, because sometimes Waze isn't always available or accurate—more because of Verizon CDMA limitations than anything else, but that's a different story—and having a dedicated device is super convenient.

I've been doing a bunch of travel in that company car, and the out-of-date map on the TomTom has become a bit of an annoyance, so unlike the XL I have for the personal car with lifetime map updates, I had a conundrum: do I purchase a new map ($45), subscribe to a year of updates ($49), punt and live with just the iPhone, or purchase a new device for home and move the one with lifetime maps to the company car and let the XL·S go to the electronics graveyard?

Because the device had been working flawlessly otherwise—with the exception of essentially zero battery life—I went ahead and selected the Map Update service.

After attaching the device to my PC and downloading several updates to the TomTom Home management application, the purchased map update was immediately available as an installable option. This old unit only had 2GB of local storage, so the old map had to be deleted before installing the new update; I bravely went ahead with the update process.

And after a goodly while, received errors that Home was unable to copy a file to the device, so it aborted the process. The management app itself suggested disconnecting, reconnecting and retrying the update, so I did that.

A common sight: errors writing to internal storage
Unfortunately, repeating the process didn't help: it might error out at a different file, but over and over, it would still fail.

As it happens, however, when the TomTom is attached to the PC, it shows up as a removable USB drive. When interacting with the Home application, it can create backup copies of the filesystem on the PC, and by comparing the data on the properly-updating home XL, I was able to make some assumptions about the XL·S filesystem. Instead of relying on the Home application to properly transfer the map to the device, I let Windows do it, copying the map data from the downloaded ZIP file to the removable device that was the TomTom's internal storage.

One problem: I was missing a file from the map download.

TomTom uses DRM to keep non-subscribers from using their maps. I was fine with that: as a subscriber, I should have rights to use those maps. However, some searching on the interwebz didn't net me any solutions. Luckily, I also thought to look on my PC where Home was running; there was a second download that had an "" file. Inspecting it, I found a .dct file; a quick google search informed me that this was my DRM key.

By putting the map and the DRM key on the TomTom manually, I now had a map that was usable by the device.

Or did I?

While I knew I could operate the device and use the map via the Home management app, the device refused to boot independently. Again, I used my google-fu and discovered that I should be able to wipe the local storage and get Home to reinstall the boot image and application software. And after wiping, but prior to doing the install, I performed Windows filesystem checks to make sure the TomTom local storage was functional and free of errors.

The Home tool worked as documented, but once again, after trying to add the map update, copy/install errors became my bane. I tried again to use Windows to copy the map update and DRM file, and lo... success! Not only would the device operate with the Home app, but it worked when independently powered.

So that's the trick:

  1. Wipe the TomTom local storage. Completely.
  2. Let Home reinstall the boot image and mapping application. This could require several restarts of the device, including hard resets (press and hold the power button until the TomTom logo appears and the drum sound is played).
  3. Extract the PC-based map to the TomTom local storage.
  4. Extract the .dct file to the map folder on the TomTom local storage.
  5. Restart the TomTom.
The device was working perfectly, so I continued with adding the MapShare corrections, and as the image above shows, I ran into another file transfer error. Following this error, the device refused to restart properly, getting stuck at the indemnity acknowledgement screen and spontaneously restarting. I reconnected the device and removed the most recent files from the map folder—the ones that didn't match the files received in the map update or the DRM file—and restarted the device, and it recovered nicely.

Update 2:
Before anyone asks: the .dct file that's the DRM key is specifically created by TomTom for my use on this device alone and is unusable on any other device, with any other map. The device serial number and map thumbprint are both part of the decryption key for DRM, so even if I didn't care about TomTom's IP rights and the possibility of litigation for it (which I actually do on both accounts), sharing the DRM file with the world wouldn't help anyone. So no, I will not share any of the files I received from TomTom in this update process.

Wednesday, June 3, 2015

Maximum NTFS Volume Expansion

A peer recently had an issue when working on a client system: After adding a second shelf of SAS-attached drives to a physical Windows Storage Server and doubling the available capacity of the environment from ~20TB to ~40TB, he was unable to extend the existing NTFS volume after extending the SAS array group.

The error was "The volume cannot be extended because the number of clusters will exceed the maximum number of clusters supported by the filesystem."
The original volume was reportedly formatted "using the defaults," which under most circumstances would mean it was using 4K clusters. Why wouldn't it allow extending the volume?

Because NTFS (as currently implemented) has a cluster limit of 232-1 clusters per volume.

When you "do the math," that cluster limit does impose some hard limits on the maximum size of the NTFS volume, irrespective of the actual drive space that is available for the volume. And trying to use tricks like dynamic disks and software RAID won't help: those tricks modify the underlying disk structure, not the NTFS filesystem that "rides" on top of it.

Max NTFS Volume by Cluster Size
size (B)
512 2,199,023,255,040 2,147,483,648 2,097,152 2,048 2
1024 4,398,046,510,080 4,294,967,295 4,194,304 4,096 4
2048 8,796,093,020,160 8,589,934,590 8,388,608 8,192 8
4096 17,592,186,040,320 17,179,869,180 16,777,216 16,384 16
8192 35,184,372,080,640 34,359,738,360 33,554,432 32,768 32
16384 70,368,744,161,280 68,719,476,720 67,108,864 65,536 64
32768 140,737,488,322,560 137,438,953,440 134,217,728 131,072 128
65536 281,474,976,645,120 274,877,906,880 268,435,456 262,144 256

We knew that we had a functioning 20TB volume, so we verified my theory that the volume was actually formatted with 8K clusters (the smallest size that would support 20TB) using DISKPART's FILESYSTEM command. Sure enough: 8192 was the cluster size.

We gave the client several options for addressing the issue, including the purchase of software that could "live adjust" the cluster sizing. In the end, the client chose the "migrate->reformat->migrate" option, and while it took a long time to perform (20TB is a lot of data!), it was successful.

Tuesday, April 7, 2015

Don't say "Customer"

one that purchases a commodity or service
According to the above definition from Webster's, it's quite likely that you deal with people that can be labelled with that term. Even those of you who are not in specific sales roles may have used the term to refer to those you serve (eg, "the internal customer").

Good or bad, that term has a certain "transactional" connotation to it; the retail model is pretty clear: a person goes to a store, buys a product or receives a service, then leaves. You don't have a relationship with the clerk running the point-of-sale system; you get your stuff and go. Transactional.

For gasoline purchases and groceries, this may be the right model and the right term. But is that the right model for you in IT? Consider it instead from the reverse point of view:

What is your relationship with your barber/hair stylist (Some of you reading this might not use one: your tonsorial needs may be non-existent or you may be able to handle things for yourself. But I bet you can probably remember a time when it was a regular requirement...)? Do you have a certain place to which you always return? When you go there, is there a particular person to whom you look (or schedule or wait) because you get a consistently good cut, or because the conversation is more pleasant, or some other (in)tangible benefit? Do you like the personal service that comes with being known by your first name? Would you have a hard time switching to a different barber/stylist because of the trust you've given to your current one? That is the sort of relationship you should seek to have with your...clients.
  1. one that is under the protection of another : dependent
  2. a: a person who engages the professional advice or services of another
    b: customer
While a client can be a form of customer, the superior definitions imply a more intimate relationship between the two parties. Dependency (used in the primary definition) can have both negative and positive connotations, but in this context, we're essentially talking about repeat business. This is what we're after, both as provider and consumer: as a provider, it keeps me in business and employed; as a consumer, I can either add the process of determining "from whom" as the same time I'm trying to figure out the "what" for my need. As a client, you put a certain level of trust into the relationship: you trust that your provider will have your interests at heart; that you won't be taken advantage of; that you can rely on the quality of the work.

That, then, pushes a certain level of responsibility on the provider. Be(come) the trusted adviser by not abusing the trust. Provide good advice. Provide repeatably good service and/or products. Own your mistakes and gently guide your client away from making them on their own. This is how one treats his/her clients—especially if the goal is to keep them!

If you're not already in this frame of mind, I challenge you to make this shift in a simple yet subtle way: Even if you're in the "business of selling widgets," even if you're running a convenience store selling gasoline and snack food, train yourself to stop using the word "customer" and start using the word "client" instead. Words have power; they convey ideas and have implications. Changing the use of that one word should change the way you look at the people you serve; when your outlook changes, the way you act and react in the relationship should follow. All of your clientele may not perceive the difference, either overtly or subconsciously; some still want to be "merely" customers, ignoring the relationship and simply needing a widget or two. Making this adjustment won't "fix" that relationship, but neither should it affect your ability to be there to serve them when they choose you. But the shoppers, the fence-sitters? With this one subtle change, you could influence them in a way that sends them into your care with more frequency.

Disclaimer: I currently work for a value-added reseller—a "VAR" in industry parlance—but have also spent a long time as a purchaser of products and services. I believe this concept is valid in either case.