by jake

How can I use a new 40 Gig iPod with Debian and USB

Today I purchased an iPod. It's a '40 GB Mac + PC' iPod and it uses the
HFS+ file system on the actual device. I didn't want to convert the iPod
to use fat32, I wanted the iPod to just work. It does 'just work' and I
didn't need to mess around with the iPod at all. Some people suggest you
change the format to fat32. That might be useful if you also wanted to
get the device working with a windows machine or just to use it as a
generic usb mass storage disk. If I ever do that, I will add to this.

Here is my system information:
Sony Vaio VGN-S150
Debian Gnu/Linux Testing version 3.1
Linux thelema 2.6.8 #1 Sun Oct 10 15:53:00 PDT 2004 i686 GNU/Linux

Here is how I got it working:
How I recently setup a new 40 Gig iPod with Debian Gnu/Linux.

Plug in the device to your USB port.

Read the dmesg output:

dmesg
usb 1-1: new high speed USB device using address 4
scsi2 : SCSI emulation for USB Mass Storage devices
  Vendor: Apple     Model: iPod              Rev: 1.63
  Type:   Direct-Access                      ANSI SCSI revision: 02
sda: Spinning up disk.......ready
SCSI device sda: 78126048 512-byte hdwr sectors (40001 MB)
sda: Write Protect is off
sda: Mode Sense: 64 00 00 08
sda: assuming drive cache: write through
/dev/scsi/host2/bus0/target0/lun0: [mac] p1 p2 p3
Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0
USB Mass Storage device found at 4
     
Make the mount point (as root):
mkdir /mnt/ipod

Insert the proper file system kernel module:
modprobe hfsplus

Add the module name to /etc/modules so it's loaded at boot with this
line:
hfsplus

In my case I added these lines to /etc/fstab:
# iPod via usb2
/dev/sda3       /mnt/ipod   hfsplus defaults,user,noauto  0       0

To mount by hand:
mount -v -t hfsplus /dev/sda3 /mnt/ipod

Install gtkpod:
apt-get install gtkpod

Setup the iPod for use with gtkpod:
Mount the iPod.
Select the menu 'File' and select 'Create Directories' 

I then added the music using gtkpod, pressed the sync button and it all
copied over.

Then you need to execute the command:
eject -v /mnt/ipod

If you want the iPod to "eject" each time you're done with gtkpod, you
need sudo:

apt-get install sudo

Add this to /etc/sudoers:
ALL ALL= NOPASSWD: /usr/bin/eject /mnt/ipod

Then you create the script like so:

touch ~/.gtkpod/gtkpod.out
chmod +x ~/.gtkpod/gtkpod.out

And add the two following lines to that file:
#!/bin/bash
/usr/bin/sudo /usr/bin/eject /mnt/ipod

That's it. No messing up the iPod. No need to change the native file
system of the iPod. It works.

Just launch gtkpod from now on and it's ready to go.

( Much of this information and more can be gathered by reading this
site:  http://people.csail.mit.edu/people/adonovan/hacks/ipod.html  and this FQA was first a post to the NBLUG talk mailing list)

			

 


 
Read more of   The Yak's Frequently Questioned Answers   (mod.2010-02-10)

391.   Is E.B. White of Strunk and White fame the same one who wrote Charlotte's Web?   [overcode/2003-11-03]
297.   What are some notable events in Usenet history?   [rupe/2001-12-20]
283.   What is the beautiful font used in the movie "Bicentennial Man" ?   [rupe/2001-11-09]
271.   I am stupid and forgot my root password for my OpenBSD box. Now what?!?!   [ross/2001-09-05]
224.   Which Yak people have been in the news recently?   [rupe/2001-05-24] ( macki/2001-05-29 )
207.   how can i access a virtual console greater than 12 in linux?   [jesse/2001-04-03]
199.   Where can I find pictures of cool PC cases?   [rupe/2001-03-13]
151.   How can I tell ICANN to screw off?   [fury/2000-12-09]
140.   What was programming the Royal McBee LGP-30 like?   [rupe/2000-10-25]
117.   Where can I find information on character codes, and encoding issues?   [rupe/2000-09-12]
87.   How do i OPT OUT of doubleclick's user-tracking cookies?   [strick/2000-05-11]
74.   How many roads must a man walk down?   [vonguard/2000-04-04]
73.   How many Zelda games are there?   [vonguard/2001-06-25] ( combee/2001-07-10 mennonite/2001-03-27 )
66.   What's an altavistincantation?   [strick/2000-02-22]
54.   What is the preferred word to use to refer to Windoze boxes?   [jamison/2000-02-11]