Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Get your iPod working with USB
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Elm0
Apprentice
Apprentice


Joined: 24 Nov 2002
Posts: 281
Location: UK

PostPosted: Wed Dec 31, 2003 3:56 pm    Post subject: HOWTO: Get your iPod working with USB Reply with quote

UPDATE: Fri 2nd Jan 2004. eject as root

This guide will explain how to get your 3rd Generation iPod working with the optional USB connector. Its a pretty easy process.

My system is a 1.4Ghz Athlon with 512Mb of RAM and a KT600 mobo with an integrated USB2 controller, running Gentoo and 2.6-mm1 (should work fine on any 2.4 system as well though). My iPod is a 10Gig model formatted with the FAT32 file system. I STRONGLY recommend the FAT32 filesystem over HFS, support is much mature on linux.

First of all is getting the iPod recognised and correctly mounted by the PC. Your going to need the following options compiled into your Kernel. Note that you may use modules or built-in for your USB, but I prefer modules for USB, and therefore for the purposes of this guide I will be using modules.

From the USB submenu:

    Support for USB <m>
    USB Device Filesystem <*>
    EHCI Support (USB 2.0) <m>
    UHCI Support (USB 1.0) <m>
    USB Mass Storage support <m>


NOTE: You need both HCD types even if you have USB 2.0. If you ONLY have USB 1.0, you only need UHCI support.

From the SCSI submenu:

    SCSI Device Support <*>
    SCSI Disk Support <*>


You will also need vfat support from the filesystems menu (either as modules or built in, doesn't really matter, I hardly use it though, so modules for me)

    DOS FAT FS Support <M>
    MSDOS fs Support <M>
    VFAT fs Support <M>


Now compile your kernel and install the modules in the usual manner. Here you have three options:


    1. Add the modules to modules.autoload so they boot up every time you use the system.
    2. Add the basic modules into modules.autoload for boot loading and manually modprobe usb_storage and vfat when you want to use your ipod. This is best done before the iPod is plugged in.
    3. emerge hotplug and let it handle modprobe for you. This seems to work well for me using the 2.6 kernel. You'll still have to modprobe vfat manually, or have it in modules.autoload however. I also have all the core USB modules loaded from modules.autoload at startup, but I expect hotplug would handle all this for you as well.


If you've followed all this correctly, reboot to load the new kernel, modprobe the necessary modules, and when you plug your iPod in:

Code:

# dmesg


You should roughly get the following output:

Code:

hub 2-0:1.0: new USB device on port 1, assigned address 3
usb 2-1: device not accepting address 3, error -110
hub 2-0:1.0: new USB device on port 1, assigned address 4
usb 2-1: device not accepting address 4, error -110
hub 1-0:1.0: new USB device on port 1, assigned address 2
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: Apple     Model: iPod              Rev: 1.50
  Type:   Direct-Access                      ANSI SCSI revision: 02
sda: Spinning up disk....ready
SCSI device sda: 19531260 512-byte hdwr sectors (10000 MB)
sda: Write Protect is off
sda: Mode Sense: 00 36 00 00
sda: assuming drive cache: write through
 /dev/scsi/host0/bus0/target0/lun0: p1 p2
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
drivers/usb/core/usb.c: registered new driver usb-storage
USB Mass Storage support registered.


Now, you need to make a mount point and modify /etc/fstab.

Code:

# mkdir /mnt/ipod


Add the following line to /etc/fstab

Code:

/dev/sda2      /mnt/ipod   vfat      noauto,user,uid=1000,gid=100      0 0


Where uid is equal to the uid of the user who will be mounting the ipod, and the same for the gid. As the first user, and in the users group, this is 1000 and 100 respectively for me. If you have more than one SCSI device it might have an entry /dev/sdb2 or /dev/sdc2 so modify the fstab line accordingly. Be careful not to mount the a partition, this contains the ipod firmware!

Now it should simply be a matter of

Code:

# mount /mnt/ipod


(THIS SHOULD BE DONE AS THE USER WHO WILL BE RUNNING gtkpod, not root!)

Now you can use a program like gtkpod to upload your mp3s to the ipod. This should be relatively straightforward, gtkpod has a good UI.

When you've finished uploading to your ipod:

Code:

# umount /mnt/ipod
# eject /dev/sda


Note that eject has its permissions set for root access only. You could carry on running as root or change the group to users and allow them to execute the program, or set the suid bit.

Your ipod should now say OK to Disconnect have a big tick mark.

Enjoy your ipod :)


Last edited by Elm0 on Fri Jan 02, 2004 12:53 pm; edited 2 times in total
Back to top
View user's profile Send private message
Ledneh
n00b
n00b


Joined: 08 Jun 2003
Posts: 72
Location: Las Vegas, NV USA

PostPosted: Thu Jan 01, 2004 2:07 am    Post subject: Reply with quote

[img:9d9680f723]http://www.radix-lecti.net/img/thumbsup.gif[/img:9d9680f723]

Only two comments/questions:

1) When I do eject /dev/sda at the end of it, I get the following:
Code:

eject: unable to open `/dev/scsi/host0/bus0/target0/lun0/disc'

Even though I KNOW I unmounted it. I just unplugged the iPod at that point; nothing seem to be broken, but an explanation as to why eject failed would be nice. :)

2) Any of you holier-than-I programmers want to make an ebuild for gtkpod? Please? I'll be your bestest friend. ;)

(edit) Aww, why didn't that IMG tag work? Should just be a little thumbs up icon. :/
_________________
LAZOR ATTACK OLOZL ^_________________^
Back to top
View user's profile Send private message
Elm0
Apprentice
Apprentice


Joined: 24 Nov 2002
Posts: 281
Location: UK

PostPosted: Thu Jan 01, 2004 11:14 am    Post subject: Reply with quote

Hmmm... Maybe try doing the eject command as the root user?

gtkpod is definetly in portage:

Code:

# emerge gtkpod


:)
Back to top
View user's profile Send private message
Ledneh
n00b
n00b


Joined: 08 Jun 2003
Posts: 72
Location: Las Vegas, NV USA

PostPosted: Fri Jan 02, 2004 1:58 am    Post subject: Reply with quote

Oh.

So it is.

>_> <_<

*runsawayreallyfast*

Incidentally, using eject with root permissions did the trick. Guess I could just chmod +s /usr/bin/eject, not like there's anything particularly nasty that can be done with that. :)

Here's an odd one for ya. Every time I unplug my iPod (whether properly ejected or not), this bar of, I guess, corruption appears on the top of my screen, and the rest is pushed down (like you tried to "scroll up" beyond the screen's limit and you got garbage in return). It's not a big deal, since switching to/from a VT fixes it, just something odd I thought I'd bring up.
_________________
LAZOR ATTACK OLOZL ^_________________^
Back to top
View user's profile Send private message
Elm0
Apprentice
Apprentice


Joined: 24 Nov 2002
Posts: 281
Location: UK

PostPosted: Fri Jan 02, 2004 12:55 pm    Post subject: Reply with quote

Thats very odd :D A few ideas that pop up for me:

Not enough wattage from your PSU, meaning adding your ipod is creating strain on the mobo.

Poor mobo power regulation

Bad mobo USB support (how recent is your mobo?)

I seriously doubt this has anything to do with the iPod itself.
Back to top
View user's profile Send private message
Ledneh
n00b
n00b


Joined: 08 Jun 2003
Posts: 72
Location: Las Vegas, NV USA

PostPosted: Sat Jan 03, 2004 6:56 am    Post subject: Reply with quote

Actually, I'm beginning to think it's ACPI. Again. Same thing happens if I use Knoppix (with ACPI on) and close the laptop (thus turning on the screen); when it comes up, bam, 1" of corruption fixable by switching in and out of a VT.

I turned off ACPI in the kernel (like I ever really used it anyway), traded in APM, and bam, problem solved.
_________________
LAZOR ATTACK OLOZL ^_________________^
Back to top
View user's profile Send private message
tucolino
Tux's lil' helper
Tux's lil' helper


Joined: 12 Jun 2003
Posts: 90

PostPosted: Wed Jan 21, 2004 1:00 am    Post subject: Reply with quote

all of this works well for me except one thing. one i run

Code:
eject /dev/sda


i get the nice message saying that i can disconnect my ipod. however, if i connect it again, i get the usual "Do not disconnect" message. Then i try to mount it again and my device disappeared (sda2). Only sda is there.

Any suggestions?

tuco
_________________
Alvaro Ramirez
http://www.xenodium.com/blog
eye candy corner
Back to top
View user's profile Send private message
Elm0
Apprentice
Apprentice


Joined: 24 Nov 2002
Posts: 281
Location: UK

PostPosted: Wed Jan 21, 2004 10:39 pm    Post subject: Reply with quote

I have the same problem, and I don't have a fix I'm afraid. I haven't really tried troubleshooting, but try removing your USB modules, reloading them and plugging the ipod back in again and seeing if the right /dev entries come up...

I rarely plug my pod in to the computer (maybe once every 3-4 days) so this isn't a problem I experience much.
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Mon Feb 02, 2004 6:24 am    Post subject: Reply with quote

can anyone help with this problem?

cheers
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
floam
Veteran
Veteran


Joined: 27 Oct 2002
Posts: 1067
Location: Vancouver, WA USA

PostPosted: Mon Feb 02, 2004 7:12 am    Post subject: Reply with quote

How about a way to do this without going through the nasty scsi emulation layer?
_________________
Think about your breathing.
http://floam.sh.nu
Back to top
View user's profile Send private message
Elm0
Apprentice
Apprentice


Joined: 24 Nov 2002
Posts: 281
Location: UK

PostPosted: Mon Feb 02, 2004 3:36 pm    Post subject: Reply with quote

As far as I am aware, thats not possible. I wouldn't really call it nasty either, I can't see any better way of doing this really, the SCSI subsystem is very capable.
Back to top
View user's profile Send private message
Dalius
n00b
n00b


Joined: 25 Feb 2004
Posts: 40
Location: Canadia

PostPosted: Sat Mar 06, 2004 4:27 am    Post subject: Reply with quote

Hey all,

When I backed up my Windows hard drive, I had it in a folder called /Files/ on the iPod. Any ideas on how to acess it?
Back to top
View user's profile Send private message
taskara
Advocate
Advocate


Joined: 10 Apr 2002
Posts: 3763
Location: Australia

PostPosted: Sat Mar 06, 2004 4:31 am    Post subject: Reply with quote

Dalius wrote:
Hey all,

When I backed up my Windows hard drive, I had it in a folder called /Files/ on the iPod. Any ideas on how to acess it?


you shoudl just be able to mount the scsi device and access it as a normal usb hdd..
_________________
Kororaa install method - have Gentoo up and running quickly and easily, fully automated with an installer!
Back to top
View user's profile Send private message
t1deman
n00b
n00b


Joined: 10 May 2003
Posts: 65
Location: california

PostPosted: Sun Apr 04, 2004 8:12 pm    Post subject: Reply with quote

I've gone this route, trying to use the linux tools for my iPod. I hooked up through firewire, and was using gtkpod etc. But I was dissapointed with them.
So in my quest to find a solution, I cheated a bit. Some of you may want to join me. I emerged vm-ware. installed windows and itunes on that. Under the VM menu, you can attach your USB devices. I checked my ipod, windows picked it up and I've got itunes. no special kernel stuff, except the vmware install.

Now I know that vmware isn't free, and windows isn't free. but there are ways around that <wink> <wink> If you look around you can find what you need. I can tell you I'm a lot happier.

My music is on a reiserfs partition, shared to vm with samba. So I can play tunes with xmms.

I think it's a little less frustrating this way, plus you get the joy of iTunes, which is a great program.
_________________
t1deman
Back to top
View user's profile Send private message
AquaAmber
n00b
n00b


Joined: 06 Apr 2004
Posts: 9
Location: New Orleans, LA

PostPosted: Tue Apr 06, 2004 11:52 pm    Post subject: Reply with quote

Forgive me for being so horribly unknowledgable (and I am)

but I cannot get my ipod to mount in my account (i.e. non-root -- I'm not down with the lingo yet).

It mounts ok in root but I don't have a GUI set up for root and I'd rather find a quick fix than have to do that.


By the way, this has been the most helpful thing on the entire internet in relation to this problem.
Back to top
View user's profile Send private message
nerdbert
l33t
l33t


Joined: 09 Feb 2003
Posts: 981
Location: Berlin

PostPosted: Wed Apr 14, 2004 9:25 pm    Post subject: Reply with quote

here's my line, which works for my non-root account:
Code:
/dev/sda2               /mnt/ipod       vfat            noauto,user,owner,umask=027,uid="your user name",gid=users       0 0

_________________
I'm really wondering what Lovechild is doing nowadays...
Back to top
View user's profile Send private message
AquaAmber
n00b
n00b


Joined: 06 Apr 2004
Posts: 9
Location: New Orleans, LA

PostPosted: Thu Apr 22, 2004 2:40 am    Post subject: Reply with quote

Okay. I changed my fstab to what nedbert said and it still is giving me the error:

Code:
mount:  only root can mount /dev/sda2 on /mnt/ipod


gtkpod gives me the error:

Could not open "/mnt/ipod/iPod_Control/iTunes/iTunesDB.ext" for reading extended info.
Extended info will not be used.
Could not open iTunesDB "/mnt/ipod/iPod_Control/iTunes/iTunesDB" for reading.


the mount, umount and eject bit works in root.

Thanks guys.
Back to top
View user's profile Send private message
johnson_steve
n00b
n00b


Joined: 30 Apr 2005
Posts: 62

PostPosted: Thu May 05, 2005 11:04 pm    Post subject: Reply with quote

My iPod works great in gentoo with gtkpod it's a hfsplus mac ipod and i share it with itunes on the mac. also the windows itunes sucks next mac. it's missing lots of stuff why would you want to use that in windows(more crap) when the newest gtkpod does almost everything itunes can do on a mac?
Back to top
View user's profile Send private message
Not Derrich
n00b
n00b


Joined: 29 Jan 2005
Posts: 36

PostPosted: Sat May 28, 2005 10:17 pm    Post subject: Reply with quote

AquaAmber wrote:
Okay. I changed my fstab to what nedbert said and it still is giving me the error:

Code:
mount:  only root can mount /dev/sda2 on /mnt/ipod


gtkpod gives me the error:

Could not open "/mnt/ipod/iPod_Control/iTunes/iTunesDB.ext" for reading extended info.
Extended info will not be used.
Could not open iTunesDB "/mnt/ipod/iPod_Control/iTunes/iTunesDB" for reading.


the mount, umount and eject bit works in root.

Thanks guys.


I'm having this problem too. I'm not sure why, but the iPod filesystem is telling me it's read-only. I've mounted the device with the -o rw option just to be sure I'm going for read-write, I've done all of the mounting/gtkpodding as root and I'm still getting the read-only errors. I'm confused about this and haven't figured out what's going on.

Anyone seen this before?
_________________
sup /b/
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum