Snow Leopard Nightmare: 3rd times the Charm!

There’s been a growing number of users claiming have issues installing Apple’s new Snow Leopard operating system that was released yesterday, and as I was one of those users, I thought I’d share my experience. I purchased the Family pack of Snow Leopard to install on 3 Mac’s in my home, all Intel-based, relatively new computers. Snow Leopard installed fine on two of the computers, but the third computer, an early 2009 Unibody MacBook, took all day. This is the story of that MacBook installation.

Attempt #1: The never-ending boot screen

First, I installed Snow Leopard over the existing 10.5 system and everything seemed to go fine. The MacBook finished the installation and afterward restarted. At which point the following screen “loading” appeared on reboot and stayed for over an hour:

I waited and I waited. Finally, I decided to shutdown and restart the computer only to see this screen again. I waited and I waited again, another hour passed, no change. At this point I decided to call Apple. I paid for AppleCare, after all.

The Apple Store was booked up for appointments for 4 days. The phone support was actually decent and they told me try a number of things such as resetting the PRAM (hold down command-option-p-r on bootup), pulling out the battery, etc. They also instructed me to boot from the install DVD and run Disk Utility to check for errors. Unfortunately, no errors on the hard drive came up. Even attempting to start in safe mode (hold shift on bootup) left me with the screen above. At this point the only logical choice that the AppleCare representative and I could think of was to boot off the install DVD and reinstall. So they wished me luck and we said our goodbyes.

Attempt #2: I don’t need no stinking input device

Since booting off the install DVD was possible, I ran the install again. Fast forward another hour, and the computer asked to be restarted at the end of installation. Holding my breadth, I pressed the restart the key. Patiently I waited as the previous “loading” appeared, but with some luck, it disappeared and the screen turned blue. Snow Leopard was finally starting! A prompt came up showing my username and asking for my password – it had saved my account settings! (my username, anyway) Then, as I moved my mouse toward the blinking cursor I noticed something odd. My mouse wouldn’t move. In fact, my keyboard was not responding either. Both the built-in MacBook keyboard and mouse were completely non-responsive.

Despite being tempted to throw the computer out a window, I went through the usual recovery ideas: plug in a USB mouse/keyboard, restart in safe mode, reset the PRAM, etc. None of them worked. The external USB devices were as inactive as the built-in ones. Safe mode had the same problem as regular mode, with no response from the built-in devices. Resetting the PRAM, even pulling the battery… no change.

At that point, I called AppleCare again. They were pleased that the ‘previous solution’ had ‘resolved’ the issue and requested I close the AppleCare incident and open a new one. Not really interested in their paperwork and increasing their ‘success’ statistics, I obliged. Since I was able to boot from the install DVD with an active keyboard and mouse, they determined it was not a hardware problem and it must be software.

The only solution they offered me, though, was to format the hard drive completely and reinstall a third time. I suggested doing one more installation on top of the existing system in order to preserve all of my settings, to which the representative responded, and I’ll never forget this, “Reformatting the drive is your best bet. Reinstalling a third time on the existing system is not likely to fix the issue, although I didn’t expect reinstalling a second time to do too much”.

Attempt #3: Success

Against the opinion of the AppleCare representative, I decided to do one more install off the DVD without formatting the hard drive. Before I’m ready to wipe a disc, I like to know I’ve accomplished all possible courses of action. And the result? All issues resolved. For whatever reason, Snow Leopard required 3 installations to work on this MacBook.

Aftermath: Ring! Ring! Doesn’t Apple know it’s 10pm?

While all this was going on, I detailed my experience as it happened on Apple’s Discussion Forum, hoping someone might have a good suggestion. As I saw in the responses, others experienced the infinite boot screen as well as the keyboard/mouse failures. Fast forward to 10pm later that night, when Apple representatives called me personally. Not so much to see how I was doing, but saying they had seen my posts on the forums and were eager to access my log and system files. While they had contacted a number of people with these types of issues, I was one of the few (perhaps only) one they could find who hadn’t yet formatted their harddrive. In other words, the logs were still fresh.

I offered up my install logs, somewhat truncated to the last install, in the hopes of isolating and resolving these issues for the community. But before I got off the phone with the representative, I did get one last laugh. I indicated that, had the third install failed, I planned to wipe the hard drive and reinstall. The reason being, “Well, if three install attempts failed, it’s never going to work”. He responded “I see no reason you could not keep reinstalling indefinitely!”. Apparently, Apple representatives have a lot more time on their hands than me.

UPDATE: It appears I am far from alone in having issues: Information Week: Snow Leopard Causes ‘Spinning Wheel Of Death’

Transferring Tivo episodes to your iPhone with a Mac and PC

If you’re like me and you own a Tivo HD/Tivo Series3 and an Apple iPhone/iTouch/iPod, you may be wondering, can I transfer shows from my Tivo to my portable device? The answer is yes, although the path you choose depends a lot about your home setup. For example, I have a MacBook and a PC. The MacBook is what I use to sync to my iPhone, but laptops have limited space, so I use my PC to transfer the gigabytes of data from my Tivo. Combining the two work together can be a daunting task so I’ve written this guide of my experience to help people in similar circumstances. Once set up the results are spectacular, gigabytes of data are transferred from my Tivo to my PC, automatically converted to Apple iPod format, and the most recent episodes are automatically transferred to my iPhone, whenever I sync my iPhone to my Mac.


Part 1: Setting up your PC for the Tivo Transfer

The Tivo and PC part of the equation is pretty straight-forward even if the Apple/iTunes can be a bit more challenging. First off, you need a PC to download and convert the files to work on your iPod. For whatever reason, Tivo has developed the PC version with many amazing features, but has yet to put them in the Mac version. They do suggest Roxio Toast Titanium but I’ll leave it to someone else to write a guide for this software. Back to the PC version… for a one-time fee of $24.95 you can purchase an unlock key of Tivo Desktop Plus for PC. Once installed and configured with a Media Key for your specific Tivo, you can select “Auto-Transfers”, select shows you’ve previously records, and have it download new episodes of shows automatically. Its equivalent to a download-form of a Tivo ‘season pass’. You can then open Tivo Desktop and go to Preferences -> Portable Devices and set it to convert it to Apple iPod as well as delete the original larger file. This saves a ton of space since it only keeps the final, converted item.

Some reasons why I use a PC for the transfer? My PC has terabytes of data, my MacBook does not. So even if they had a native Mac version, I’d still use my pc.


Part 2: Setting up your Mac for the iTunes Import

If you followed part one you now have a single folder filled with Apple-formatted shows. If you’re like me you set them on a read-only network share for other computers in your home to use (and open the Keychain Application on a Mac to set the share to no longer prompt for a username/password). Now we move on to the Mac side of things…

While I like my PC for the transfer and storage part, I prefer my Mac to sync my iPhone. If you go into iTunes preferences -> Advanced, there’s an option “Copy files to your library when adding to Library”. For the purposes of this explanation we’re going to assume you turn this off so that when you add a file from the external share, only a reference is copied. The file stays on the network share. With this setting turned off you can open iTunes and go to File -> Add Folder to Library, select the network share, and it will add all the files in the folder to your iTunes library. But there’s a few catches:

1) This process is not automated, future files will not automatically be detected and added
2) Sometimes iTunes screws up and lists files twice
3) Some shows (like daily show) requires name changes because it saves the name of *every episode* as “The Daily Show with …” making it impossible to read on you iPhone.

For that I’ve written an Apple script that fixes all the problem above (see appendix). I set it on a cron job to occur every 15 minutes (search google for instructions on using/running crontab on a Mac), first checking to make sure iTunes is open and the network share exists. If all this is in place, you’ll have your iTunes library constantly updated any time it is at home, the network is connected, and iTunes is up. I also set up a separate apple script to reconnect the network drive on computer startup (see appendix).

It takes a little practice but AppleScript is an extremely simple language to work with. After you download the script, read it over and learn what each line means. This way you can modify it to fit your custom situation as needed. I take no responsibility if this script, or your modified version of it, does anything bad to your computer or your files. Use at your own risk.


Part 3: Setting up your iPhone

Finally, the ‘easy’ part. With all this set up, your Mac will now contain references to recently converted shows (usually delayed about 45 mins from actual airtime completion). If you leave your pc and Mac on all the time, this will happen while ya sleep.

The final part is to configure your iPhone, of which I do have some advice. For starters, iTunes is a tad novice-level in that you can either choose to transfer a playlist of tv video files XOR transfer recent episodes of tv shows. The exclusive “XOR” is because you cannot do both (as I said, the Apple/iTunes side is more of a pain). For simplicity, I like transfer the “3 most recent episodes” of “selected tv shows”. The only thing that can screw this up, really, is if Tivo suggestions records like 10 episodes of a show you didn’t want it to. For example, Comedy Central likes to air the Daily Show 5-10 times a day, so its possible, albeit unlikely for your to have multiple copies of the same episode on you iPhone (if you want to disable it all together just rate the Daily Show with 3 thumbs down or turn Tivo Suggestions off).

The result? Every morning I connect my iPhone to my Mac and it instantly downloads all of last nights programming including new episodes of daily show. I can then watch them on my commute. All of the setup is a little painful but the PC never needs to be touched once your auto-transfers are set up. The Mac is a little more unfriendly, in that you may have to run the script manually if you are in a hurry and forgot to leave your computer on over night.


Appendix: AppleScript code

Applescript to load share automatically on computer startup. You can use System Preferences auto-start to make it startup.

tell application "Finder"
open location "smb://ip-address-for-pc/my-ipod-share"
end tell

AppleScript to import and cleanup Tivo Files. Also available here: tivo-script.txt

-- syncPcTivoToApple v 1.0 - An AppleScript to automatically import a network
-- share of PC transferred iTune files to your Mac.
--
-- Copyright 2011 Scott Selikoff

-- Video Format
property format_items : {"MPG4"}

-- File extensions
property ext_items : {"mp4"}

-- Whether or not to perform import
property okflag : false

-- List of 'special' shows
property convertNameToDateRecordedIdentifiers : {"The Daily Show With Jon Stewart", "The Colbert Report"}

on run

-- Set name of network share via the file system
set network_folder to "my-ipod-share"

-- Proceed if network share exists and iTunes is open
tell application "Finder"
set okflag to ((exists folder network_folder) and ((get name of every process) contains "iTunes"))
end tell

if okflag then
import_files_to_itunes(network_folder)
remove_duplicates("TV Shows")
clean_track_name("TV Shows")
end if
end run

-- Perform Import
on import_files_to_itunes(this_folder)
set these_items to list folder this_folder without invisibles
repeat with i from 1 to the count of these_items
set this_item to alias ((this_folder as text) & ":" & (item i of these_items))
set the item_info to info for this_item

if (alias of the item_info is false) and
((the file type of the item_info is in the format_items) or
the name extension of the item_info is in the ext_items) then
tell application "iTunes"
add this_item to playlist "Library" of source "Library"
end tell
end if
end repeat
end import_files_to_itunes

-- Cleanup library of diplicates
on remove_duplicates(this_playlist_name)
tell application "iTunes"
set this_playlist to user playlist this_playlist_name
set all_tracks to the number of this_playlist's tracks
set temp1 to {}
set delete_list to {}

if all_tracks > 1 then
set this_location to the location of track 1 of this_playlist
repeat with i from 2 to all_tracks
set next_location to the location of track i of this_playlist

if this_location is equal to next_location then
copy i to end of delete_list -- then this track is a dupe; copy its index to our delete_list list
end if

set this_location to next_location
end repeat

-- total number of tracks to nix for dialog
set to_nix to delete_list's length

--If you must delete, do it backwards, ie:
repeat with x from to_nix to 1 by -1
copy (item x of delete_list) to j
delete file track j of this_playlist
end repeat
end if
end tell
end remove_duplicates

-- Cleanup special tracks
on clean_track_name(this_playlist_name)
tell application "iTunes"
set this_playlist to user playlist this_playlist_name
set all_tracks to the number of this_playlist's tracks

repeat with i from 1 to all_tracks
set artistName to the artist of track i of this_playlist
set titleName to the name of track i of this_playlist

if ((titleName begins with artistName) and (titleName contains "\"")) then
if (artistName is in convertNameToDateRecordedIdentifiers) then
-- Case 1:  Daily Show and Colbert Report, just use date as name
set pos1 to ((length of artistName) + 2)
set pos2 to ((length of artistName) + 9)
else
-- Case 2: All other shows strip out the artist name and date
set pos1 to ((length of artistName) + 12)
set pos2 to ((length of titleName) - 1)
end if

-- Position invariants must quality for renaming
if ((pos1 < pos2) and (pos1 < (length of titleName)) and (pos2 > 1)) then
set newTitleName to (text items pos1 thru pos2 of titleName) as text
set name of track i of this_playlist to newTitleName
end if
end if
end repeat
end tell
end clean_track_name