Monday, September 22, 2008

"Install and Keep Package" ignores you

This Leopard bug has bitten me. It kept my first few updates in the Downloads folder, but that has all stopped now. Anyone?

Official Leopard 10.5 Bugs thread - Page 5 - MacNN Forums:

Software update isn't keeping packages if I choose "Install and keep package"... Unless they are very, very hidden. I checked /Library/Packages, /Library/Updates, ~/Downloads, ~/Library.. Can't find em anywhere.

I've read it works if you choose "Download only", they end up in your download folder.

Maybe it's fixed in 10.5.1, but that was the update I was trying to install and keep.

Shane's Top Mac Troubleshooting Tips

(This was posted originally in January 2006 when running OS X 10.4.3, Tiger; it has been updated to address changes since Snow Leopard in 2009).

I’m no expert on this stuff, but due to the years of diagnosing and fixing Mac issues (since 1993 to be exact with my old Classic II) I’ve developed a few troubleshooting routines that I automatically run through when stuff starts acting weird. Of course, most of the tricks of the old classic pre-X days are useless now (unless troubleshooting for Classic, of course), but here are some helpful ideas for X (currently 10.6.2).

= Command key (might have an Apple on the key as well)
= Option key
= Shift key

[Complete List of Macintosh Keyboard Shortcuts -]

First, get to know these helpful “snags” (startup key sequences):

* Start up in Open Firmware: --O-F (more below)
* Reset parameter RAM: --P-R (zaps the PRAM - see also Open Firmware reset)
* Bypass startup volume: -- -Delete (gets to a new volume if your current one is busted)
* Open the Startup Manager: (pick the volume you want to start up from)
* Force Mac OS X startup: X or -X (start in OS X)
* Start up from an optical disc: C (force start from your CD or DVD drive)
* Eject optical disc: mouse, trackpad button, or hold down the eject button (at startup)
* Start up from a network server: N (if you have a network startup volume)
* Reset PowerBook screen: R (no clue)
* Start up in Target Disk mode: T (firewire two computers together and boot from the other)
* Start up in Safe mode: (more below)
* Start up in Verbose mode: -V (great for seeing what the startup problem is)
* Start up in Single-User mode: -S (more below)

Most of these key sequences are still valid for Classic OS boots also (pre-X), and most of these don’t work if an Open Firmware password has been set using either Terminal or Apple’s OFPW application. Using an OF password is a good idea, especially for notebooks that could get stolen (protect your data from thieves at least).

Backup, Backup, Backup

Before doing anything, learn to regularly backup your system. I backup every hour to another drive (using Time Machine). It’s always best to keep two backups if possible, but one is better than none. There are other good backup solutions available too, such as Carbon Copy Cloner and SuperDuper. Do a backup immediately before making any major changes to your system too!

Programs are a-crashin’

If you have apps that are crashing, not responding, or you’re getting kernel panics, this is a sign that something is amiss. Here are the beginning steps to take:

• Repair permissions using Disk Utility if you can (this should always be your first step). Always try to repair permissions from the startup volume itself. If that doesn’t work, startup from your Install Disc and repair permissions from the Install’s Disk Utility (see below).

• Try logging out and back in.

• Try creating a new account and see if the problem persists. If it goes away then the problem is likely with your Home folder.

• Try restarting (rebooting).

• Check the volume for file system errors. There are a few ways to do this. I usually boot into Single-User mode first (see above snag list); to run a file system check, at the prompt type:

# /sbin/fsck -fy

If errors were found, continue running the above command until they’re gone; then type:

# reboot

If no errors were found, continue booting normally by typing:

# exit

Of course, you can also boot from your OS X install disc (hold C while booting), Repair Permissions, and run Repair Disk in Disk Utility. If Disk Utility or fsck won’t do the trick, consider an emergency boot disc or another bootable volume (separate hard drive or partition) with TechTool Pro or Disk Warrior to repair the volume.

• If none of these steps solved your problem try what’s listed below.

Safe Mode ( while starting up)

Here’s what it does for you:

* Performs a directory check of the hard drive identical to clicking Repair Disk in the First Aid pane of Disk Utility.
* Ignores kernel extensions cache (/System/Library/Extensions.kextcache).
* Loads only required kernel extensions (/System/Library/Extensions).
* Runs only Apple-installed startup items (/Library/StartupItems and /System/Library/StartupItems).
* Loads only those fonts in /System/Library/Fonts (Mac OS X 10.4 or higher).
* Trashes all font caches stored in /Library/Caches/ ID number (Mac OS X 10.4 or higher).
* Disables Login Items (Mac OS X 10.4 or higher).

Safe Mode is a limited mode which also allows one to install and uninstall software and kernel extensions, and Disk Utility will easily repair permissions while in Safe Mode. Also, a good troubleshooting step while in Safe Mode is to use the Finder to delete the following:

/Library/Caches/* (delete entire directory contents)
/System/Library/Caches/* (delete entire directory contents)
/System/Extensions.kextcache (delete only this file)

NOTE: This can also be done in Single-User mode (see below).

More Single-User Tricks (-S while starting up)

Much can be done in Single-User mode (not just running fsck). It’s basically the BSD command line, so you can mount volumes and do a variety of maintenance tasks if you’re Terminal savvy (er…you’re a UNIX geek). To learn more about these commands and what they do, Google it and find out!

Mount the volume:

# mount -uw /

Run the cron routine maintenance scripts:

# sudo periodic daily
# sudo periodic weekly
# sudo periodic monthly

Update the prebindiing:

# sudo update_prebinding -root / -force

Repair permissions:

# sudo diskutil repairPermissions /

Eliminate some startup, cache, and kernel extension problems:

# /sbin/mount -uw /
# cd /Library/Preferences
# rm
# rm
# cd /Library/Caches
# rm -r *
# cd /System/Library
# rm Extensions.kextcache
# cd /System/Library/Caches
# rm -r *
# reboot

You could also install Applejack, which is a wonderful utility to automate many Single-User maintenance and troubleshooting tasks for you.

Open Firmware (--O-F while starting up)

One could do quite a bit of damage when booting into Open Firmware (basically the Mac version of BIOS), so stick strictly to these commands unless you really know what you’re doing.

You can check the current OF environment by typing:

> printenv

To reset the OF and reboot, at the prompt type:

> reset-nvram
> set-defaults
> reset-all

Sometimes, you’ll need to eject a disc when the usual methods (holding down the mouse, E, or Eject buttons) don’t work. In OF, do this:

> eject cd
> mac-boot

Another neat fact. OF is based on the old programming language called Forth, which was originally written by an astronomer named Charles Moore to control telescopes. Forth is unique in the way it handles math; one must think in RPN (Reverse Polish Notation). So to add 2 and 5 to get 7, at the prompt type:

> 25+
> 7

Hopefully by now, your problem is solved. If not, you’re going to have to jump in some place like Apple Support (especially Discussions) or MacFixit forums.

Other Resources

Lots are available online, but here are some great links:

Sunday, September 21, 2008

Got a new Mac? Now what?

A friend of mine, Paul Garay (composer and podcast producer, and founder of the Inside Home Recording podcast), produces training videos for Macs and related software, specifically the software that comes with every shiny new Mac...all those wonderful Apple goodies that make your new Mac a super-machine. Check it out and learn how to get some serious mileage out of your machine!

Mac Video Training

Saturday, September 13, 2008

The Joys of Moving an iTunes Library Around

Itunes-LogoOne strength of Apple's approach to "tech" is to hide the details from us mere mortals. That works fine for the average user, but power users can become frustrated by Apple's deviation from the obvious. Let's consider things like iPhoto and iTunes Libraries--those rather large places on your hard drive that don't move very easily (especially iTunes Libraries).

If you're like me, you've screwed this one up more than once. Why do I not learn my lesson? Because Apple computers are so well designed and built, I typically own them for years at a time. My old AGP Power Mac G4 (I bought it as a 400 MHz single processor machine in 2000 running OS 9) just did start giving my problems, after 8 years of faithful service and more upgrades than I care to mention!

So I replaced my old G4 with a shiny, new Mac Pro. This change (and the upgrade to iTunes 8) made me feel it was time to MOVE my iTunes library back to its rightful place in my home directory from another hard disk (silly me). The last time I moved it was YEARS ago, and though something in my gut told me to beware, I went ahead and stupidly dragged the folder to my home directory a dufus. Ingrained tech erudition would lead most nerds like myself to believe that this act simply represents Computer File Management 101, but remember, Apple doesn't design their products for nerds.

The problem, of course, is that information about one's song collection is stored in the iTunes Library file, and I left mine in the ~/Music directory as is the convention. The space-munching audio files, however, are usually stored in ~/Music/iTunes/iTunes Music. Mine were on another hard drive (moved there years back to save space on my startup drive). If you simply drag the folder back to its rightful place and believe you can select the new location in iTunes Preferences (as convention would have you believe), you're sadly mistaken. For whatever reason, this does not work, and all the links to your music are broken. Sure, you can select the location for each song, one-at-a-time, but who wants to do something like that? That's what computers are for!

To properly move your iTunes music files around, select the new location in Preferences FIRST, and then use the Consolidate Library function to copy your files back where they go. However, I couldn't retrace my steps, because I had already reformatted that old drive. I even tried renaming the stupid drive back to its old name, but that wouldn't work either. So, I just dragged the contents of ~/Music/iTunes/iTunes Music back to the Library>Music icon in the iTunes Sidebar. It dutifully loaded all my music files again, and I was able to delete the broken links in the Library file. However, doing this means I lost all my Playlists and Ratings! Arggghh!!

The solution I found is linked below. I used Time Machine to recover my old iTunes Library file and exported my Library as an XML file (which you can also do for individual playlists). To keep the Ratings, I followed the steps below. Now, my iTunes Library is back from the dead. But I sure had to put in a lot of work to get it back. Don't do what I did...but if you (and you probably will), follow the advice in this post.

Apple - Discussions - Importing Ratings From Old ITunes:

One mod for anyone else who has this problem - if you export as a Smart List it imports it the same way and recalculates the rating. So you need to export a standard playlist for each rating. I did this by:

=> making sure the Rating column is visible in iTunes
=> right click or command-click to sort by ratings
=> select all the 5*s then say File > New Playlist from Selection
=> then select that playlist and File > Export .... and save as XML, say "My 5s"
=>then select the 4s and repeat as below

When iTunes Won't Quit

I ran into this problem today (iTunes 8). Watch out for iWow!

» Tip: If iTunes won’t quit The MacTrack - Items of Mac Interest:

… The latest version of iWow ( has a process called “genredetection.” If iTunes 7.5 (in Leopard) quits unexpectedly, the genredetection process doesn’t quit and forces iTunes to automatically relaunch and spawns a second genredetection process.


You now have to go into the Activity Monitor application and force quit all the “genredetection” processes that have spawned and only then can you actually quit iTunes…

Monday, September 01, 2008

Restoring from Time Machine back-up

It can do more than just restore some lost files...use it to recover your entire system!!!

Restoring from Time Machine - James Duncan Davidson:

Once booted, I formatted the new hard drive and then from the menu bar selected Utilities > Restore System from Backup... This brought up a dialog to let me select the Time Machine source drive to use. I'll be curious to see if the restore utility will be able to find Time Machine volumes on the network, say in Time Capsules, but that will be a test for another day. In any case, the only catch I can see is that your disk has to be visible to the system without any special drivers. This rules out putting your Time Machine volume into an external eSATA enclosure hooked up to a card that requires drivers to work. Most of you probably don't fall into the situation, so don't sweat it. Use a Firewire, USB, or extra internal disk and you're golden.


In the morning, my system was fully restored. After rebooting, everything was right where I left it. Well, that's not entirely true. Not quite everything was there. Time Machine doesn't back up data that can be reconstructed, such as caches and indexes. This means that Spotlight will have to rebuild its index and won't be immediately available. It also means that when you launch Mail, it will think it's the first time it's been launched and will go through a "Welcome to Mail" process where it imports all of the mail messages that are on your system. It's not downloading things from your IMAP server, just recreating its database.