# Mounting iPod Nano [SOLVED]

## scriptX

I plug in my iPod Nano:

```

scriptx@haktik ~ $ dmesg

   ...

usb 1-4: new high speed USB device using ehci_hcd and address 4

usb 1-4: configuration #1 chosen from 2 choices

ub(1.4): GetMaxLUN returned 0, using 1 LUNs

```

I've followed http://gentoo-wiki.com/HARDWARE_Using_an_iPod

And created /etc/udev/rules.d/10-ipod.rules (if that's got anything to do with it)

 :Sad: 

EDIT:

"UHCI HCD must be compiled as a module (named 'uhci_hcd') because loading and unloading this is what enables you to "mount" and "unmount" your iPod." - http://ipodlinux.org/Mounting_on_Linux

Is that true?Last edited by scriptX on Sun Apr 30, 2006 6:12 pm; edited 1 time in total

----------

## frostschutz

Module or built-in does not matter (as long as you take care of loading the required modules). Your ipod seems to be using EHCI (USB 2.0) anyway. Your dmesg is incomplete, though - you may not have waited long enough after plugging the device in (can take up to 30 seconds), or your kernel may be missing support for USB storage / SCSI discs / Apple partition tables (if your iPod is partitioned that way).

----------

## scriptX

 *frostschutz wrote:*   

> Your dmesg is incomplete

 

How so?

 *frostschutz wrote:*   

> you may not have waited long enough after plugging the device in (can take up to 30 seconds)

 

I think nine hours qualifies..  :Smile: 

 *frostschutz wrote:*   

> or your kernel may be missing support for USB storage / SCSI discs / Apple partition tables (if your iPod is partitioned that way).

 

```

 <*>   EHCI HCD (USB 2.0) support

  [ ]     Full speed ISO transactions (EXPERIMENTAL)

  [ ]     Root Hub Transaction Translators (EXPERIMENTAL)

--------

<*> USB Mass Storage support

--------

<*>   SCSI disk support

--------

<*> MSDOS fs support

<*> VFAT (Windows-95) fs support

<M> Apple Extended HFS file system support

```

EDIT:

Ehhh... maybe  I haven't rebooted? I can't remember, I recompiled my kernel with all that stuff last night at 1a. I'll reboot now   :Razz: 

EDIT2:

Nope. Same dmesg output

----------

## troymc

 *scriptX wrote:*   

>  *frostschutz wrote:*   Your dmesg is incomplete 
> 
> How so?
> 
> 

 

I think he is referring to the fact that we usually see more than the 3 lines you listed. Try posting the whole dmesg output, or something like this:

```

# dmesg | egrep -i "hci|usb"

usbcore: registered new driver usbfs

usbcore: registered new driver hub

ehci_hcd 0000:00:10.4: EHCI Host Controller

ehci_hcd 0000:00:10.4: new USB bus registered, assigned bus number 1

ehci_hcd 0000:00:10.4: irq 21, io mem 0xd2206c00

ehci_hcd 0000:00:10.4: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004

hub 1-0:1.0: USB hub found

USB Universal Host Controller Interface driver v2.3

uhci_hcd 0000:00:10.0: UHCI Host Controller

uhci_hcd 0000:00:10.0: new USB bus registered, assigned bus number 2

uhci_hcd 0000:00:10.0: irq 21, io base 0x00002000

hub 2-0:1.0: USB hub found

uhci_hcd 0000:00:10.1: UHCI Host Controller

uhci_hcd 0000:00:10.1: new USB bus registered, assigned bus number 3

uhci_hcd 0000:00:10.1: irq 21, io base 0x00002020

hub 3-0:1.0: USB hub found

uhci_hcd 0000:00:10.2: UHCI Host Controller

usb 1-2: new high speed USB device using ehci_hcd and address 3

uhci_hcd 0000:00:10.2: new USB bus registered, assigned bus number 4

uhci_hcd 0000:00:10.2: irq 21, io base 0x00002040

hub 4-0:1.0: USB hub found

uhci_hcd 0000:00:10.3: UHCI Host Controller

uhci_hcd 0000:00:10.3: new USB bus registered, assigned bus number 5

uhci_hcd 0000:00:10.3: irq 21, io base 0x00002060

hub 5-0:1.0: USB hub found

usb 1-4: new high speed USB device using ehci_hcd and address 4

usbcore: registered new driver hci_usb

usb 2-1: new low speed USB device using uhci_hcd and address 2

usb 4-1: new low speed USB device using uhci_hcd and address 2

usb 4-1: new full speed USB device using uhci_hcd and address 3

usb 4-1: new low speed USB device using uhci_hcd and address 4

usb 4-1: new full speed USB device using uhci_hcd and address 5

usbcore: registered new driver hiddev

Initializing USB Mass Storage driver...

input: USB HID v1.00 Mouse [Kensington Kensington PocketMouse Pro] on usb-0000:00:10.0-1

scsi2 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 4

usb-storage: waiting for device to settle before scanning

usbcore: registered new driver usb-storage

USB Mass Storage support registered.

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.6:USB HID core driver

  Vendor: GENERIC   Model: USB Storage-CFC   Rev: 019A

usb-storage: device scan complete

```

 *scriptX wrote:*   

>  *frostschutz wrote:*   or your kernel may be missing support for USB storage / SCSI discs / Apple partition tables (if your iPod is partitioned that way). 
> 
> ```
> 
>  <*>   EHCI HCD (USB 2.0) support
> ...

 

Does your 'lspci -v' show any other USB devices other than the EHCI one?  For example, my laptop shows mutiple UHCI devices along with the EHCI device and I needed the UHCI driver built as well.

troymc

----------

## scriptX

```
haktik scriptx # dmesg | egrep -i "hci|usb"

usbcore: registered new driver usbfs

usbcore: registered new driver hub

usbcore: registered new driver ub

ehci_hcd 0000:00:02.2: EHCI Host Controller

ehci_hcd 0000:00:02.2: debug port 1

ehci_hcd 0000:00:02.2: new USB bus registered, assigned bus number 1

ehci_hcd 0000:00:02.2: irq 4, io mem 0xec004000

ehci_hcd 0000:00:02.2: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

ohci_hcd: 2005 April 22 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

ohci_hcd 0000:00:02.0: OHCI Host Controller

ohci_hcd 0000:00:02.0: new USB bus registered, assigned bus number 2

ohci_hcd 0000:00:02.0: irq 11, io mem 0xec002000

usb usb2: configuration #1 chosen from 1 choice

hub 2-0:1.0: USB hub found

ohci_hcd 0000:00:02.1: OHCI Host Controller

ohci_hcd 0000:00:02.1: new USB bus registered, assigned bus number 3

ohci_hcd 0000:00:02.1: irq 9, io mem 0xec003000

usb usb3: configuration #1 chosen from 1 choice

hub 3-0:1.0: USB hub found

USB Universal Host Controller Interface driver v2.3

Initializing USB Mass Storage driver...

usbcore: registered new driver usb-storage

USB Mass Storage support registered.

usbcore: registered new driver hiddev

usbcore: registered new driver usbhid

drivers/usb/input/hid-core.c: v2.6:USB HID core driver

HUB0 HUB1 USB0 USB1 USB2 F139 MMAC MMCI 

usb 1-4: new high speed USB device using ehci_hcd and address 2

usb 1-4: configuration #1 chosen from 2 choices

```

I've got all the blahHCI options compiled in.

----------

## troymc

hmmm....do you not ever see the "scanning messages" when you plug something in?

```

usb-storage: waiting for device to settle before scanning

...

usb-storage: device scan complete

```

Have your tried another USB device? HDD or keychain?

troymc

----------

## scriptX

My Apacer flashdrive works.

----------

## troymc

Re-plug the IPOD.

Do you see new messages detecting the unplug/plug events?

Do you see the "Scanning Messages" ?

Does it show up in 'lsusb' ?

Dumb question: The IPOD is on, right?    :Shocked: 

troymc

----------

## scriptX

dmesg:

```

usb 1-4: USB disconnect, address 2                                                                     UNPLUG

usb 1-4: new high speed USB device using ehci_hcd and address 3             PLUG

usb 1-4: configuration #1 chosen from 2 choices

ub(1.3): GetMaxLUN returned 0, using 1 LUNs

```

lsusb:

```

haktik scriptx # lsusb

Bus 003 Device 001: ID 0000:0000  

Bus 002 Device 001: ID 0000:0000  

Bus 001 Device 003: ID 05ac:120a Apple Computer, Inc. 

Bus 001 Device 001: ID 0000:0000  

```

The iPod turns on whenever it's plugged in

----------

## troymc

How about:

```

cat /proc/scsi/scsi

```

is it there?

troymc

----------

## scriptX

No

```

scriptx@haktik ~ $ cat /proc/scsi/scsi

Attached devices:

```

----------

## troymc

Wait a sec....

why is it loading the UB driver???

```

ub(1.3): GetMaxLUN returned 0, using 1 LUNs 

```

Do you have CONFIG_BLK_DEV_UB set in your kernel config?

If so, the device would show up as /dev/ub1 instead of /dev/sda1.

check here:

```

Device Drivers --->

    Block Devices --->

        < > Low Performance USB Block driver

```

You probably don't want this since it comes with this warning message:

```

 Warning: Enabling this cripples the usb-storage driver.

```

troymc

----------

## scriptX

 *troymc wrote:*   

> D
> 
> o you have CONFIG_BLK_DEV_UB set in your kernel config?
> 
> ```
> ...

 

Yes, I do. Recompiling without that now.

----------

## scriptX

dmesg:

```

usb 1-4: new high speed USB device using ehci_hcd and address 2

usb 1-4: configuration #1 chosen from 2 choices

scsi0 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 2

usb-storage: waiting for device to settle before scanning

  Vendor: Apple     Model: iPod              Rev: 1.62

  Type:   Direct-Access                      ANSI SCSI revision: 00

SCSI device sda: 7999487 512-byte hdwr sectors (4096 MB)

sda: Write Protect is off

sda: Mode Sense: 68 00 00 08

sda: assuming drive cache: write through

SCSI device sda: 7999487 512-byte hdwr sectors (4096 MB)

sda: Write Protect is off

sda: Mode Sense: 68 00 00 08

sda: assuming drive cache: write through

 sda: unknown partition table

sd 0:0:0:0: Attached scsi removable disk sda

sd 0:0:0:0: Attached scsi generic sg0 type 0

usb-storage: device scan complete

```

heh  :Razz: 

...bleh, where is in /dev? 

ie: mount /dev/??? /mnt/ipod

EDIT:

```

scriptx@haktik ~ $ sudo mount /dev/sda0 /mnt/ipod

mount: special device /dev/sda0 does not exist

scriptx@haktik ~ $ sudo mount /dev/sda1 /mnt/ipod

mount: /dev/sda1 is not a valid block device

scriptx@haktik ~ $ sudo mount /dev/sda2 /mnt/ipod

mount: /dev/sda2 is not a valid block device

scriptx@haktik ~ $ sudo mount /dev/sd0 /mnt/ipod

mount: special device /dev/sd0 does not exist

scriptx@haktik ~ $ sudo mount /dev/sd1 /mnt/ipod

mount: special device /dev/sd1 does not exist

scriptx@haktik ~ $ sudo mount /dev/sd2 /mnt/ipod

mount: special device /dev/sd2 does not exist

```

----------

## troymc

 *scriptX wrote:*   

> 
> 
> ```
> 
>  ...blah...
> ...

 

You probably need to enable the Apple partition table:

```

File Systems --->

    Partition Types --->

        [ * ]   Macintosh partition map support

```

troymc

----------

## scriptX

Yay more recompiling. I'll post the results after I've rebooted.

----------

## scriptX

```
usb 1-4: new high speed USB device using ehci_hcd and address 2

usb 1-4: configuration #1 chosen from 2 choices

scsi0 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 2

usb-storage: waiting for device to settle before scanning

  Vendor: Apple     Model: iPod              Rev: 1.62

  Type:   Direct-Access                      ANSI SCSI revision: 00

SCSI device sda: 7999487 512-byte hdwr sectors (4096 MB)

sda: Write Protect is off

sda: Mode Sense: 68 00 00 08

sda: assuming drive cache: write through

SCSI device sda: 7999487 512-byte hdwr sectors (4096 MB)

sda: Write Protect is off

sda: Mode Sense: 68 00 00 08

sda: assuming drive cache: write through

 sda: [mac] sda1 sda2 sda3

sd 0:0:0:0: Attached scsi removable disk sda

sd 0:0:0:0: Attached scsi generic sg0 type 0

usb-storage: device scan complete

```

ehh??

```

scriptx@haktik ~ $ sudo mount /dev/mac /mnt/ipod

Password:

mount: special device /dev/mac does not exist

scriptx@haktik ~ $ sudo mount /dev/sda1 /mnt/ipod

mount: you must specify the filesystem type

scriptx@haktik ~ $ sudo mount /dev/sda2 /mnt/ipod

mount: you must specify the filesystem type

scriptx@haktik ~ $ sudo mount /dev/sda3 /mnt/ipod

mount: you must specify the filesystem type

scriptx@haktik ~ $ sudo mount -t hfs /dev/sda1 /mnt/ipod

mount: unknown filesystem type 'hfs'

scriptx@haktik ~ $ sudo mount -t vfat /dev/sda1 /mnt/ipod

mount: wrong fs type, bad option, bad superblock on /dev/sda1,

       missing codepage or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

scriptx@haktik ~ $ sudo mount -t mac /dev/sda1 /mnt/ipod

mount: unknown filesystem type 'mac'

```

----------

## frostschutz

Filesystem enabled in the kernel? IIRC on iPods only one partition is actually meant for mounting, probably the third one.

----------

## scriptX

 *frostschutz wrote:*   

> Filesystem enabled in the kernel? IIRC on iPods only one partition is actually meant for mounting, probably the third one.

 

Correctamundo. Thank you both VERY much.   :Cool: 

```
scriptx@haktik ~ $ sudo mount /dev/sda3 /mnt/ipod

Password:

scriptx@haktik ~ $ ls /mnt/ipod

Calendars  Contacts  Notes  iPod_Control

```

----------

## troymc

Ok, now we're getting somewhere.  It sees the Mac partition table with 3 partitions now:

 *scriptX wrote:*   

> 
> 
> ```
> 
> ...blah...
> ...

 

And from this:

```

scriptx@haktik ~ $ sudo mount -t vfat /dev/sda1 /mnt/ipod

mount: wrong fs type, bad option, bad superblock on /dev/sda1,

       missing codepage or other error

       In some cases useful info is found in syslog - try

       dmesg | tail  or so

```

[/quote]

it appears your IPOD is windows formatted, but you're missing the ASCII codepage.

Make sure you default iocharset for VFAT is "ascii" and that both the iocharset & codepage are being built.

(they can be modules if you want)

```

File Systems--->

    DOS/FAT/NT Filesystems--->

        <M> VFAT (Windows 95) fs support

            (437) Default codepage for FAT

            (ascii) Default iocharset for FAT

    Native Language Support  ---> 

        <*>   Codepage 437 (United States, Canada)

        <*>   ASCII (United States)

```

troymc

----------

