28 December 2011

Warning: Watch out if you run Windows on a partitioned disk (e.g., Boot Camp)

Windows has a horrible misbehavior when it updates itself in a partitioned environment.  

This hit my son hard when, home for the holidays, his Windows 7 installation in a small Boot Camp partition on his MacBook Pro decided to run Windows Update, which is a behavior that is enabled by default and un-obvious to turn off in Win7.  From what I'm reading, the behavior is hazardous to many types of systems, not just Windows-on-Mac situations.

"Windows Installer [creates] a temporary folder on the logical volume with the most free space, during the actual installation process, but that folder is deleted after use."
...The trouble is, it will do that even if that capacious volume is not a Windows-formatted partition!

Meaning, if you're running...
  • A server, 
  • A Storage Area Network or file-server, 
  • A multi-boot configuration
...in which more than one logical volume are visible to Windows or where your physical volume is partitioned into two or more logical volumes...

...then Windows 7's commandeering of the largest partition for scratchpad purposes can damage the file system on that partition.

Astonishing.  Totally unacceptable behavior from an operating system.

(Most virtual machine configurations including cloud instances cannot see host partitions, but SANs and file servers are routinely accessible to them, and this behavior might put them them at risk.)

This results in tales of woe such as are increasingly documented on Apple's support forums with scary headlines like "Unrepairable disk errors on Mac partitions caused by Bootcamp Windows updates?"

In my son's case, his OS X installation summarily disappeared during the Windows Update process, and the machine could no longer be booted except into Windows.  His panicked trip to the local Apple Store just before closing time resulted in a gratifying all-hands-on-deck response from the Genius Bar and an impressive deployment of all their tools, but the tools reported that the drive was irreparably hosed.  His backup drives are back at his college, and (ahem) a month out of date.  

Fortunately he has a geek for a dad, and I was eventually able to get into his damaged partition using various tricks including the marvelous Target Disk Mode which allows a Mac to act like an external disk drive for another Mac.  Ultimately I was able to copy all his files over to a USB hard disk.  But the damaged partition was really and truly ruined; the disk needed reformatting if it was going to be used at all.

As I write, the machine has a freshly formatted disk and no further Boot Camp partition.  He'll run Windows in a virtual machine when needed from now on.  Fortunately, he's running OS X Lion, so the machine could be booted into Recovery Mode after its disk was wiped; it just performed an Internet Recovery and is now downloading and installing the operating system.  Soon it will be sporting a fresh installation of OS X; the download process takes a little over an hour on our WiFi.  No CDs needed!  Pretty wonderful.  We'll then copy his files back, and he'll be back in business.

Lessons:
  • Be very cautious with Windows 7 in a partitioned, multi-boot situation, and very possibly where there are big file resources available on LAN.
  • If you use Win7 as one of several OSes, then prefer virtual machines over multi-boot implementations (e.g., Boot Camp)
  • BACK UP!!
UPDATE:

Poster "Intell" at the invaluable MacRumors forum notes,

Windows when started up on Boot Camp does not have write abilities to a Mac/HFS+ formatted volume, when using Apple's drivers. Thus, the installer will be forced to use the Windows/NTFS volume. Furthermore, the installer will only do this to internal NTFS formatted drives with priority given to the current startup disk.

So perhaps my son's tale of woe and those of the unfortunates populating forum threads like "Unrepairable disk errors on Mac partitions caused by Bootcamp Windows updates?" relate to improperly installed, corrupted or out-of-date drivers.

So add another couple bullets to the list of lessons:
  • Follow Apple's Boot Camp installation instructions to-the-letter
  • Ensure your Boot Camp drivers are installed and current
Users of other multi-boot environments should take heed as well.

Also consider turning off automatic updates so installation can be approved at a convenient time and when the computer has been backed up.  To do so: Click the Start button, select Control Panel, then select Windows Update.  In the left-hand bar, select Change Settings.  Then, in the Important Updates field, consider "Download updates but let me choose whether to install them."  Selecting this option will prevent spontaneous update installations, including those annoying installations that trigger on shut-down ...especially when the machine senses you're in a hurry, or so it sometimes seems.

25 December 2011

How to Firewall Your Phone System Against Robocallers, Telemarketers and Other Pests

As I mentioned in my first post on our money-saving Internet home telephone setup (see
How to Roll-Your-Own with VoIP for Massive Phone Savings), one of the awesome benefits of our setup is how we're blocking unwanted phone calls from disturbing the peace here at Entropy Central.  Callers are greeted not by ringing but by my friendly voice, saying,
Thanks for your call...  Friends, family and people with whom we do business, press 1...  For voicemail, press 2...  For an international dialtone, press 3.  Telemarketers and robo-callers, we have a specific digit for you.
The caller must press 1 on their phone to ring our home phones.  This simple requirement blocks automated calling systems, even ones manned by humans, since their operators are often connected only when the phone line is picked up after their system dials up the next mark to be fleeced.

In the run-up to the November, 2010 elections here in the U.S., our home line was receiving as many as twelve unwanted vote-for-me calls a day!  Most of these came at dinner-time.  And each and every one of these was blocked by this simple solution.

Even now, during the Holiday lull, the system has blocked nearly two dozen unwanted calls in December alone from charities and civic organizations looking for contributions.  My VoIP provider, voip.ms, provides web-based call data reports that lists every single caller, and these blocked calls are readily identified since they last only a few seconds, indicating the caller's call automation system has given up on reaching a live victim.  Win!

Just think, if everyone did this, we could kill the telemarketer industry in no time.  Oh, happy day!

Here's how:

The process is simpler than the acronym-fest that is VoIP might suggest at first glance:

Max is a great, free audio format converter for the Mac.
  • Record your message.  Nowadays most computers, smartphones, media players and tablets have built-in microphones and note-recording apps.  Easy.  On the Mac, the built-in QuickTime Player makes audio recordings (among a hundred other functions!).  The default location for recordings it makes is your user account's Movies folder.
  • If necessary, convert your message into a format compatible with your roll-your-own-VoIP provider's Interactive Voice Response (IVR, or digital receptionist) requirements.  For voip.ms, that means 8kHz, 16-bit .WAV encoding.  That's a crude but bandwidth-friendly format, and chances are you'll need a conversion utility to down-convert your audio file which is probably of higher quality.  An excellent, free, open-source utility for OS X is Max from sbooth.org.  Start Max up, select Convert Files from the File menu, point it at your recording, and click the Convert button in the upper left corner.  You'll get a pop-up requesting that you choose an output format.  Select "WAV (Microsoft)" and then specify the 16-bit flavor.  Click the Convert button, and the converted file will be stored in your user's Music directory, probably in an "Unknown Artist" folder since you haven't had your big break yet.
  • Now log into your voip.ms account and navigate to its DID Numbers | Recordings pane.  (A "DID Number" is just the direct-dial number that callers dial.  Generally you'll have at least one.  And you can have multiple lines or extensions per DID number, too.  On voip.ms, these are known as sub-accounts.  Sub-accounts can also be assigned to VoIP applications on your smartphone or computer, too.)
  • Now use the pane's menu to upload your newly-converted recording onto voip.ms' servers.
  • Navigate to the DID Numbers | Digital Receptionist (IVR) pane.  Click the "Create a new IVR" link.  Give your new IVR a name and specify that it use the recording you just uploaded.  Select a Time Out of 2 seconds... that seems to work well.  Choose whether you want callers' voicemails recorded in an inbox specific to a sub-account (equivalent to a line or extension for your voip.ms account) or to use a catchall voicemail box for the DID number.  (You can create and manage voicemail inboxes and select options such as voip.ms' wonderful email-my-voicemails option using the DID Numbers | Voicemail menu.  So it would be trivial to have your IVR say, "Press 8 to leave a message for Suzie, press 9 to leave a message for Sam..." with personal voicemail boxes for everyone in your family.)
  • Now you get to define what happens when your callers press buttons on their phones.  You do this by typing a number in a box and then specifying what that number-press or other event will do.  My settings:
  • 1:  SIP/IAX, with my home line's sub account specified.  What this is telling voip.ms to do is connect your caller to your physical line.  This is what my recording invites "friends, family and people with whom we do business" to do by pressing 1 on their phone.
  • 2: Voicemail, with my desired voicemail inbox specified.  
  • 3: In my case, since we have an international family, we specify a dial tone here so that when we're out of the house, we can call our home line, enter a passcode, and springboard to an international call using voip.ms's super-cheap rates.  This is massively cheaper than using cell providers' and hotels'  larcenous international rates, and more convenient than carrying a discount calling card, with no purchase required and no risk of loss.  To your cell phone (or whoever's phone you're calling from), it's just a call to your own number.  If you want to try this, voip.ms refers to this as Direct Inward System Access (DISA), and you'll find it in the DID Numbers | DISA menu.
  • i: A catch-all for an unrecognized button-press.  Select IVR, and choose the IVR you're working on.  Yeah, that's a loop: it means incoming callers who press a bogus button will get your recording again.
  • t: Timeout.  Here a little thought is required to consider your specific situation.  Originally, after a timeout I chose to have the caller routed to voicemail.  Unfortunately this let a few patient robo-callers leave messages in our voicemail.  What I ended up doing was create a second IVR that was identical to the first one but had no timeout.  So callers who let the whole message play through without pushing a button get it replayed, exactly once.  After that, t'heck with 'em: Hangup.
Test it out!  And enjoy the peaceful dinnertime evenings without rude telemarketers interrupting your meal.


There are many other things you can do in the IVR menu.  You can define extensions that forward to other lines or even ring the VoIP app on your smartphone.  No limits!  And, as you'll see, no telemarketers.