Showing posts with label Lion. Show all posts
Showing posts with label Lion. Show all posts

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.

09 July 2011

How to Quickly Vet your Applications for Lion Compatibility (and Why You Should)

OS X Lion is coming, probably this week, and it looks to be a compelling upgrade (and affordable at a reported $29 in the U.S., or $49 for a five-license family pack).  No trip to the store is needed-- it will be available exclusively over the Internet via the App Store, which you'll find under the Apple logo up at the upper left corner of your screen on your fully-updated Snow Leopard machine.

Photo courtesy of Apple.  Read all about OS X Lion on Apple's site
With Lion, Apple is finally cutting the cord of the long-obsolete PowerPC architecture. Until now, programs written specifically for the ancient PowerPC chips would still run on Macs based on Intel chips via an automatic emulator that OS X would use. This emulator was called Rosetta... and it's finally been put out to pasture in the era of Lion.

There are many reasons why this is good--faster operation, fewer bugs, conservation of disk-space, better and more consistent user-interface features, smoother integration--but the one obvious negative is that you might currently have applications on your Mac that rely on Rosetta. That software will have to be upgraded or removed.

Now, you could go through your Applications folder and look at each application's type by command-clicking Get Info. But there's a much better way to do it all-at-once (Hat tip: Cult of Mac).

Here's How:
  • Open the Terminal. (If you don't know how to do this, just type "Terminal" in Spotlight and it will show up as an application.)
  • Cut the following line from here:

    system_profiler SPApplicationsDataType >~/Desktop/MyFileTypes.txt

    ...and paste it into the Terminal, then hit the Return button on your keyboard.

    What will happen now is that a text file entitled MyFileTypes will appear on your desktop. It might take a couple minutes.  Go have a cup of tea while your Mac does your work for you.
  • When the process is complete, quit the Terminal and double-click the MyFileTypes file on your desktop.
Now you can search MyFileTypes for the word "PowerPC" --this will indicate which applications on your machine need to be upgraded, removed or replaced with something more modern.

The most common obsolete applications are Microsoft Office 2004 and Quicken. To my chagrin, LabVIEW 8.6 is there, too.  (That's a real surprise-- it's so fast, I had no clue it was being run in the emulator.)  (UPDATE: It appears the Rosetta issue for LabVIEW 8.6 is limited to drivers, though there is an additional 32-bit issue with kexts.)

Deal with obsolete apps before upgrading to Lion
For one thing, the removal utilities that come with some of them (such as Microsoft Office) are themselves PowerPC-based. Or, you may need the old version to export your files to some new, Rosetta-free application-- and I'm talkin' to you, Quicken-- for which there is no Intel- or Universal-based update.  Fortunately, in the case of Quicken there are many alternatives.  See this superb list compiled by TUAW after Intuit, Quicken's publisher, sent an infuriating email to its users with lame suggestions on how to work in the post-Lion world.  Really, now, Intuit: on pg. 102 of Scott's Big Book of Pithy Pronouncements is: "Competitors are made, not born."  Q.E.D.