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.2008-11-08)

413.   How can I solve Cisco Catalyst 3550 series issues where a port seems to have died?   [jake/2004-08-23]
404.   How can I limit the ammount of bandwidth rsync over ssh (or anything else) uses, without a complicated firewall solution?   [leif/2004-02-06]
362.   How do I make Internet Explorer download more than 2 files at a time?   [matt/2003-06-17] ( strick/2003-06-21 )
347.   How can I boot KNOPPIX off my hard drive?   [strick/2003-02-15] ( jake/2003-02-20 )
295.   How do I get a cheap EPOC R5 (Symbian) handheld?   [combee/2001-12-07]
291.   Should I solder my Sound Card into my computer?   [strick/2002-02-04]
277.   What does K-Rad mean? is there a modern alternative to k-rad?   [mennonite/2001-10-08]
239.   What's the Grubstake?   [rupe/2001-06-05]
237.   how do i setup lm_sensors on an abit vp6 mobo?   [jesse/2001-07-08]
184.   Just how many people are their, anyway?   [les/2001-02-22]
183.   What are the real lyrics for the poem "Big Rock Candy Mountains"?   [rupe/2001-02-19] ( jesse/2001-06-29 )
170.   Where can I find the Linux Kernel Wishlist?   [rupe/2001-01-31]
146.   What commands do UNIX system administrators commonly use?   [rupe/2000-11-09] ( strick/2001-01-04 )
132.   What is the official scale for grading Yak parties?   [rupe/2000-10-08]
82.   Can Mice Fly ?   [philbert2k/2000-04-27]
78.   Where can I find the latest copy of nmap?   [rupe/2000-04-22]
71.   What was Alex's prisoner number in A Clockwork Orange?   [vonguard/2000-04-04]
70.   How can I get info from my (email-capable) cellfon?   [robey/2000-02-29]
34.   What are some good World Wide Web facts I can impress my friends with?   [simon/2000-01-28]