Mounting an iPod

James Seward jamesoff at gmail.com
Sat Nov 5 13:38:27 GMT 2005


On 11/4/05, edward <kouye at wanadoo.fr> wrote:
> Assistance welcome, James. I finally gave up trying to mount the iPod as
> an HFS+ device and reformated it in FAT32. Now I can mount it and access
> its content (I use mount -t msdos /dev/da0s2 /mnt/ipod).
> However, I can unmount it using umount /mnt/ipod, but I'm not quite sure
> how to get it to understand its not connected anymore. I wouldn't mind
> taking a look at the scripts you mentionned early on.
> "The camcontrol utility can cause a loss of data and/or system crashes
> if used improperly.  Even expert users are encouraged to exercise
> caution when using this command.  Novice users should stay away from
> this utility" says the man page. With such an invitation, I can't wait
> to get my hands into this one :).
> Thanks,
> Edward

Here's my script, which I put in /usr/local/bin. You will have to
change the mount point and device for camcontrol to suit your setup.
You may also want to change permissions on things in /dev so that you
can do this as a user. Don't forget that you need to change passN and
xpt0, not just the da device. Look in /etc/devfs.conf to see how to
make the chanages stick, and change the vfs.usermount sysctl to 1. I
based my setup of this on the various documents out there about
user-mounting CDs.

---CUT---
#!/bin/sh

case "$1" in
        start)
                echo "Mounting ipod..."
                mount /ipod
                ;;
        stop)
                echo "Ejecting ipod..."
                umount /ipod && camcontrol eject 0:0
                ;;
        *)
                echo ""
                echo "Usage: `basename $0` { start | stop }"
                echo ""
                exit 64
                ;;
esac
---CUT---

I just modified one of the rc scripts to make it :) Now I can do "ipod
start" and "ipod stop" to mount and umount/eject it.

On a sort of related note, anyone had problems with gtkpod reporting
double the free space on the ipod? "df" and my iPod agree about the
free space, but gtkpod says that double that amount is free. I've had
this on 5.4 and 6.0 and on both i386 and amd64.


More information about the freebsd-questions mailing list