September 9th, 2009


9
Sep 09

“more reliable”

I’ve had this post in the drafts since August 6, but only recently catched up with my backlog of tasks enough to finish it. This was supposed to be posted before the new cat released.

Anyway, I was going to comment on how misleading clever Apple’s marketing is. One example: take a look at one improvement they did for Snow Leopard, one I recently had a problem with.

eject-reliability

I never had this problem with PCs as there was a hardware eject. Even when apps went haywire or CDs/DVDs went bad, there was an alternate way of ejecting a disk without having to restart. If you were really honest, you wouldn’t call what you had in Mac OS X ,”reliable”. (Perhaps that’s what people are used to?).

The KB from Apple says to do several things, with the final solution being:

If that doesn’t work, restart the computer, then hold down the mouse button.

Right. Something I’ll never be able to associate with disk eject in a million years (well, maybe a thousand).

I used lsof in the terminal when I encountered this problem. MacOSXHints.com recently posted a script to do this in one go ( which is why this post got out of the drafts folder ):

1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash
PATH=${PATH}:/sbin:/usr/sbin
dr=($(drutil status | grep -i 'type:'))
devtype=${dr[1]}
device=($(mount | grep ${dr[3]}))
if [ $devtype = "No" ]
then echo No disk found. Sorry! >&2
  exit 1;
fi
echo A $devtype is mounted on the device named $device
pids=($(sudo -p 'Please enter the administrator password:' lsof -t $device))
echo \nList of programs that may be preventing the disk to eject
ps -o pid,user,comm=COMMAND -www -p $(echo ${pids[*]} | sed 's/ /,/g')