# Problems mounting iPod

## smellycheeseboy

I just got a 10GB iPod and I am having trouble getting it to mount.  I'm pretty sure that I have all the right stuff compiled into my kernel like USB stuff and SCSI stuff. 

I have it connected through a regular USB cable.  When I try to mount it with 

```
mount -t vfat /dev/sda /mnt/ipod
```

 I get this error 

```
mount: wrong fs type, bad option, bad superblock on /dev/sda, or too many mounted file systems
```

When I try to mount it using the line that I put into fstab 

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

 I get the same error.

What am I doing wrong?

Me

----------

## xr31Daisy

/dev/sda is the whole drive, you need to select a partition:

```
mount -t vfat /dev/sda2 /mnt/ipod
```

----------

## smellycheeseboy

I have tried that before from another forum and it says that the device doesn't exist.  So I looked in /dev and the only one in there is sda.  There is no sda1, sda2 and so forth.

Do you know how to fix this?

Me

----------

## uglyb0b

plug in the ipod and then run dmesg and show what the dmesg says. it could be that you don't have everything in the kernel.

EDIT: it could also be your cable, are you using the mac one and plugging the firewire end of hte cable into the wall outlet, the USB into your computer? and also show the output of lsmod (if you compiled stuff as modules.)

----------

## smellycheeseboy

```
usb 2-1: USB disconnect, address 11

hub 2-0:1.0: new USB device on port 1, assigned address 12

usb 2-1: device not accepting address 12, error -110

hub 2-0:1.0: new USB device on port 1, assigned address 13

usb 2-1: device not accepting address 13, error -110

hub 2-0:1.0: new USB device on port 1, assigned address 14

scsi4 : SCSI emulation for USB Mass Storage devices

  Vendor: Apple     Model: iPod              Rev: 1.40

  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/host4/bus0/target0/lun0: unknown partition table

Attached scsi removable disk sda at scsi4, channel 0, id 0, lun 0

Attached scsi generic sg1 at scsi4, channel 0, id 0, lun 0,  type 0

WARNING: USB Mass Storage data integrity not assured

USB Mass Storage device found at 14

```

That is what my dmesg says when I plug it in.  And I am using the cable where the firewire goes to the wall and the usb goes to my computer.

I have everything built into my kernel.  I'm not a big fan of modules.

Me

----------

## nofx911

From the dmesg output that you posted it looks like you do not have the correct filesystem / partition layout that the ipod uses compiled into your kernel. Make sure that you have support for the different types of fat file systems and the different partition types enabled in your kernel config.

----------

## smellycheeseboy

What partition types are you talking about?  I have all the fat fs stuff compiled in.

Me

----------

## HighOnBonsai

Ist your iPod mac-formated? So mounting it as a vfat-partition doesn't make much sense. Just use the Apple-iPod update-software to format your iPod with a fat-partition (thats the easiest way) - but all your data on the iPod will be destroyed.

Bye

Christopher

----------

## uglyb0b

```
 /dev/scsi/host4/bus0/target0/lun0: unknown partition table
```

that looks to be a big problem, likely why you couldn't mount it. did you initially plug it in to a mac or PC first? it looks like you just took it out of the box and plugged it in, which wont work. just plug it into a windoze machine and run ipod updater. don't use mac, HFS support is shaky under any kernel. hope that helps.

----------

## smellycheeseboy

So basically there is absolutely no way to use it unless I format it under windows first?  That seems rather crappy because the only windows thing I have going is one where the usb stuff doesn't work and because its windows you can't fix anything.

If that is the only way though I guess I will make due.

Thanks

Me

----------

## SPY_jmr1

i'm sure i've seen something in portage for updating ipod software???

something else you could look into is finding a disk image, and dd'ing it over, after fdisking it.... should work the same as the windows updater.

----------

## garn

recompile your kernel with hfs support and also go to advanced partition map something and turn on Macintosh partition table.

That should let you mount sda1 without a windows box.

But I don't have an ipod, this is just guess work. Good luck

----------

## uglyb0b

partition setup needs to be with windows. this is the parition table:

/dev/sda1 starts at 1, ends at 5, is 40131 blocks long, system ID is 0, and the system is empty.

/dev/sda2 starts at 6, ends at 4863 (for me on my 40gig) and is 39021885 long with an id of b and it's win95 FAT32

the first partition contains the firmware. the second contains the data for the music, and it either Win95 FAT32 of HFS+ depending on what platform the inital format/partitioning was done on. so, as unfortunate as it is, I've never heard of an ipod updater for linux, plus such a program would likely be a bit shaky. I'd just go to a friend's house and update it there (thats what I did.)

hope that helps.

----------

## smellycheeseboy

Ok now I can mount my ipod and copy crap to it but when I go to eject it using 

```
umount /mnt/ipod

eject -s /dev/sda
```

 then it says ok to disconnect forever and will not get past it.  None of the buttons will work and I can't turn it off and back on or anything.

Suggestions?

Me

----------

## Das Damen

fuck. same here. it keeps on poering up and then powering done over and over again.

----------

## smellycheeseboy

Try holding down the menu and pause/play button after you reboot your computer and see if that works.  Let me know

Me

----------

## Das Damen

nope

----------

## smellycheeseboy

Does it show a picture of a folder with an exclamation point next to it?

Me

----------

## Elm0

Try searching:

https://forums.gentoo.org/viewtopic.php?t=119901&highlight=usb+ipod

To get rid of the problem of the 'You can now disconnect screen' simply disconnect your ipod from the usb port and it will spring back to life.

----------

## Das Damen

No dice. I'm going to try to locate a Windows XP computer today to see if restroing the ipod will work. If not, I guess I'll be bringing it back to the store.

----------

## Elm0

OK, well, if your ipod simply hasn't touched a windows PC since you bought it thats definetly the problem. You HAVE to use a Windows PC to format the harddisc to fat32 and upgrade the firmware to 2.1 i'm afraid, after that it will run with no probs though. Your PC is correctly recognising the ipod by the looks of your dmesg output.

----------

## uglyb0b

Let me get this straight, you can unplug the iPod, and it STILL has the OK to disconnect thing? Forkin weird. Elm0 is right, you NEED to do the partitioning on windoze, else the firmware barfs on the filesystem. Thats why you recieved that folder exclamation point thing.

----------

## Das Damen

I fixed it!. You have to hold in the rewind and fastforward button to put it in disk mode. From there, i mounted the ipod and then ejected it using the eject command (i failed to do this before). All works perfectly now. Hope this helps.

Edit: BTW, you have to use gtkpod as a normal user and eject as root (otherwise you're not able to write to the ipod-from my experience anyway).

----------

## WhimpyPeon

Here is a site that details how to change the filesystem to FAT32 without having to hook up to a windows PC. It also explains the whole process very well, and lists some useful links.

http://pag.lcs.mit.edu/~adonovan/hacks/ipod.html

I have not done it this way myself (still dual boot)  :Embarassed:  so I can't verify the instructions but they seem to make sense.

You may have to compile the sbp2 as a module in order to remove the iPod without having to turn off the pc.  It is explained at the site.

----------

## AquaAmber

Hey guys --

I'm having an iPod problem.  I had to take similar routes to get the thing to mount but now it will only let me do so in root.

#  mount -t vfat /dev/sda2 /mnt/ipod

mount:  only root can do that

Any suggestions?

----------

## bumpert

 *AquaAmber wrote:*   

> Hey guys --
> 
> I'm having an iPod problem.  I had to take similar routes to get the thing to mount but now it will only let me do so in root.
> 
> #  mount -t vfat /dev/sda2 /mnt/ipod
> ...

 

nobody? all working fine but i want my user to be able to mount it (run gtkpod), cause now only root can

???

thx

----------

## smellycheeseboy

In order for the user to be able to mount the ipod you can use this line in your fstab:

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

Me

----------

## bumpert

did i need to reboot or something cause if not it doesn't seems to work

i add to my line the "uid=1000,gid=100" cause the reste was ok

thx

----------

## smellycheeseboy

I don't think you need to reboot.  You just need to re-mount the ipod because it should call this line when you try to mount it.  If nothing else works, a reboot wouldn't be a bad idea but I personally would save it as a last resort because I like large uptimes.

Me

----------

## bumpert

don't work, still need root to mount the ipod or run gtkpod correctly (cause when you run gtkpod it try to mount ipod automaticly)

thx

----------

## smellycheeseboy

The only other thing I can think of is that the permissions on your mount point are not correct.  Try to 

```
chmod 777 /(mount point)
```

 and see if that works.

If that doesn't work then try 

```
chown username mount_point
```

Me

----------

## johndoe_1995

In a semi-unrelated note, Is it possible to mount the iPod via firewire in Gentoo just as 'easily' as it is with USB?

Where do I start?

Thanks.

----------

## smellycheeseboy

I'm sure that it is.  I would guess that you would just need to make sure that all the necessary things are compiled into your kernel to make the firewire work and then it is just a matter of mounting it.  

Read back in this post for more information on that.

Me

----------

## bumpert

 *smellycheeseboy wrote:*   

> The only other thing I can think of is that the permissions on your mount point are not correct.  Try to 
> 
> ```
> chmod 777 /(mount point)
> ```
> ...

 

sorry for the late answer, but that didn't work

thx

----------

## smellycheeseboy

Can you post your /etc/fstab for me?

Me

----------

## bumpert

```
/dev/hda1               /boot           ext2            noauto,noatime          1 1

/dev/hda3               /               xfs             noatime                 0 0

/dev/hda2               none            swap            sw                      0 0

/dev/hdb1               /home           ext2            noatime                 0 0

/dev/cdroms/cdrom0      /mnt/cdrom      iso9660         noauto,user,ro          0 0

/dev/sdb                /mnt/ipod       hfsplus         noauto,user,uid=1000,gid=1000           0 0

# NOTE: The next line is critical for boot!

none                    /proc           proc            defaults                0 0

none                    /dev/shm        tmpfs           defaults                0 0

```

thx for help

----------

## smellycheeseboy

You need to have 

```
/dev/sdb2
```

 instead of 

```
/dev/sdb
```

 because the ipod is in two partitions.  The first partition (sdb1 in your case) has the firmware for the ipod on it and the second partition (sdb2) is where the music is stored.  

Let me know if this works.  The only other difference I have is that gid=100 and my fs type is vfat.  If the partition thing doesn't work I would try the gid=100 but the fs type shouldn't matter I don't think.

Me

----------

## bumpert

ok i changed this line with sdb2, but do i need to reboot to my new fstab take effect?

if no that dont work

thx

----------

## nightm4re

no you don't need to reboot for changes to your fstab.

If I'm not mistaken, an ipod formatted with hfsplus is actually in three partitions.  I'm not sure which one contains the files.

you DO have hfs support in your kernel, right?  Someone else mentioned it earlier, hfs support is pretty poor in linux, you really should be formatting it in fat32 (vfat).

----------

## smellycheeseboy

I concur.  My ipod is in vfat and it works great.  I'm not sure if there is a difference in the partitions, however, but its possible.

Me

----------

## bumpert

my ipod working really great if i mount it by myself and after run gtkpod, the problem is that gtkpod should mount it by itself and now it work only if i start gtkpood in root

thx

----------

## bumpert

nobody?

----------

## smellycheeseboy

I have to mount my ipod manually also.  As far as gtkpod only working in root, you should check your permissions on the mount point for the ipod.

----------

## christsong84

 *bumpert wrote:*   

> nobody?

 

try replacing that 

```
 noauto,user,uid=1000,gid=1000
```

with the following...

```
 noauto,user,umask=0
```

I'm not 100% sure what it does however my theory is that it makes you pretend your root when you mount it.  That's what I use on my windows partition, however I'm still working on the formatting step of my brand spankin new ipod (I love my parents ^_^)

----------

## bumpert

thx for the answer, sorry i didn't receive a mail for this watch topic...

i tried your post, but that didn't work...  :Sad: 

another idea?

thx for help

----------

## Ubizubi

Does it help if you do:

```
 mount /mnt/ipod
```

Instead of the whole command up above?  (not sure if it calls fstab if you enter the whole mount command?)

----------

## desertstalker

You have to do mount /mnt/ipod or it will NOT look at the fstab entry

----------

## bumpert

The solution worked...

i'm leaving this topic

thx

----------

## shadow255

For what it's worth, my solution to the problem of the permissions on the iPod when using hfsplus is to go ahead and mount it (I used /mnt/ipod), then as root do 

```
chmod 755 /mnt/ipod
```

After doing that, now whenever I mount the iPod I have the ability as non-root to traverse the iPod's filesystem.  Hope that helps someone!

----------

## cmburns

EDIT: If you have a working hotplug system (like I do now  :Smile:  ), don't do it like I said here. See my other post a bit further down for The Right WayTM to do it.

 *johndoe_1995 wrote:*   

> In a semi-unrelated note, Is it possible to mount the iPod via firewire in Gentoo just as 'easily' as it is with USB?

 

I'm mounting my iPod via firewire on my Debian system. It should work the same on Gentoo, I guess, but I haven't tried it yet (still preparing for my first Gentoo install...).

I followed the instructions at gnupod.

In short I do 

```
modprobe ohci1394

modprobe sbp2

```

Then I run a script called 

```
rescan-scsi-bus.sh
```

 that comes with the gnupod suite of tools to actually discover the new drive. Maybe there are nicer ways to do this (?) but it works for me. After that I can mount /dev/sda2

The "Do not disconnect" message on the iPod screen does not disappear until I unmount and do 

```
rmmod sbp2
```

 so I guess you have to compile sbp2 as a module.Last edited by cmburns on Mon Feb 07, 2005 1:06 pm; edited 1 time in total

----------

## displaced

Hi everyone...  Looks like a good thread.

I'll be wanting to get my iPod working over Firewire once I've got everything emerged and working.  It seems that everything I'll need to know's already in this thread, but just a quick question or two...

My 2nd-generation 20GB iPod is HFS+ formatted.  What's the state of HFS+ filesystem support at the moment?  If it's anything less than stable, I'd really like to keep iPod accesses read-only.

I'm hoping I'll be safe by just adding 'ro' to the iPod's entry in fstab?  I presume there's no attempts at modifying the disk until it's mounted correctly?

Thanks!

----------

## cmburns

Hi!

I'd like to revise the information in my previous post about connecting the iPod via Firewire, since there's a much better/easier way. I have now finished my first Gentoo install. On my previous system (Debian kernel 2.4.something) the hotplug system was kinda broken, I think. (Not blaming Debian - that was probably my own fault.   :Wink:  )

So here's how it works with a working hotplug system:

Of course you need to compile Firewire support into you kernel. Go to Device Drivers --> IEEE 1394 (FireWire) support. I have OHCI-1394 support compiled into the kernel and SBP-2 support compiled as a module. I also checked Raw IEEE1394 I/O support, but you probably don't need it for the iPod (?).

Whenever I plug the iPod in, the sbp2 module gets loaded automatically and the new scsi drive is found. (The 'Do not disconnect' sign is displayed, too.) I only need to mount /dev/sda2.

When I'm done syncing (using for example gtkpod), I just umount the drive and call 

```
eject /dev/sda
```

 as root. (Then the 'Do not disconnect' sign disappears.) There's no need to rmmod sbp2.

Works like a charm!

displaced: I can't say anything about HFS+ since I have a FAT-formatted iPod. You should probably be on the safe side with ro, but that's just my uneducated guess!

BTW: Is there a way to be able to call eject /dev/sda as a regular user? It works for cdrom drives, so there must be a way to configure it, right?

Christian

----------

## barry

If you install hal and start up hald, it'll take care of adding the correct entry to /etc/fstab and removing it afterwards. Much easier!

----------

## morset

I have been trying to eject my iPod, trying to eject the iPod causes my system to freeze. Everytime I did it while in X and in a simple terminal it never gave me an error message. Kernel Panic - not syncing PCI-DMA high address but no IOMMU. I did a quick search on google but turned up nothing of use.

----------

## morset

 *morset wrote:*   

> I have been trying to eject my iPod, trying to eject the iPod causes my system to freeze. Everytime I did it while in X and in a simple terminal it never gave me an error message. Kernel Panic - not syncing PCI-DMA high address but no IOMMU. I did a quick search on google but turned up nothing of use.

 

I think my problem has stemmed from using the Firewire cable.  I have switched to the USB and it's working fine now.

----------

## shadow255

 *displaced wrote:*   

> My 2nd-generation 20GB iPod is HFS+ formatted.  What's the state of HFS+ filesystem support at the moment?  If it's anything less than stable, I'd really like to keep iPod accesses read-only.

 

I have the same hardware as you (iPod, that is).  HFS+ filesystem support seems very good.  In order to make it work you'll need to choose Advanced partition selection and both Mac partition and PC BIOS (MSDOS) support in your kernel config. Prior to 2.6.10 the kernel didn't warn you that you needed the MSDOS selection when doing this, so I'm repeating it to help you avoid the trouble I had in case you're on a less recent kernel version (kernel panic at boot because it couldn't read /)  :Wink:   See below for more on read-only for your iPod.

 *displaced wrote:*   

> I'm hoping I'll be safe by just adding 'ro' to the iPod's entry in fstab?  I presume there's no attempts at modifying the disk until it's mounted correctly?

 

Unless you want to run gtkpod or whatever iPod app you prefer as root, you're going to have to mount the iPod rw at least initially because the filesystem's root defaults to having no execute privilege for world, making it impossible for anyone other than root to get to the iTunes database folder, which has wide-open permissions, oddly enough.  I have suffered no problems after doing chmod 755 /mnt/ipod, but I haven't bothered to restrict mounting to ro either.  Good luck, hope this helps!

----------

