Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
iPod and Gentoo
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Thu Dec 29, 2005 8:56 pm    Post subject: iPod and Gentoo Reply with quote

[*]To get your iPod device node to show up as "/dev/ipod", create the file "/etc/udev/rules.d/00-ipod.rules" and paste the following code into it.

    PC Formated iPod (vfat)
    Code:
    BUS="scsi", SYSFS{model}="iPod*", KERNEL="sd?2", NAME="%k", SYMLINK="ipod"

    Mac Formated iPod (hfs)
    Code:
    BUS="scsi", SYSFS{model}="iPod*", KERNEL="sd?3", NAME="%k", SYMLINK="ipod"



[*]To set the permissions so that non-root users can mount/unmount and read/write to the iPod paste the following code into the file "/etc/security/console.perms".

Code:
<ipod>=/dev/ipod
<console>  0600 <ipod>       0600 root



[*]To easily mount your iPod add the following code to "/etc/fstab".

Code:
/dev/ipod /media/ipod vfat users,exec,noauto,managed 0 0



[*]To disconnect your iPod properly run the following command:
    Eject your iPod as root
    Code:
    eject /media/ipod

    To run eject as a non-root user run this once
    Code:
    chmod +s /usr/bin/eject

_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
cappycdn
n00b
n00b


Joined: 15 Sep 2005
Posts: 20

PostPosted: Fri Dec 30, 2005 1:11 am    Post subject: Reply with quote

Just implemented your suggestions and I wanted to report a success!
I was able to plug-in my wife's ipod shuffle and it showed up immediately. I then copied the files over and they all played successfully.
Thank you for the great info.
Back to top
View user's profile Send private message
CptnObvious999
Apprentice
Apprentice


Joined: 19 Dec 2004
Posts: 292

PostPosted: Fri Dec 30, 2005 3:02 am    Post subject: Reply with quote

Cool, don't have an iPod but with some minor modifications works with my iAudio X5L. Heres the rule:
Code:
BUS="scsi", SYSFS{model}="MK3006GAL", KERNEL="sd?1", NAME="%k", SYMLINK="iaudio"

then change all the other stuff to use iaudio instead of ipod and you're golden. 8)
Back to top
View user's profile Send private message
cappycdn
n00b
n00b


Joined: 15 Sep 2005
Posts: 20

PostPosted: Fri Dec 30, 2005 3:24 am    Post subject: Reply with quote

Quote:

PC Formated iPod (vfat)
Code:
BUS="scsi", SYSFS{model}="iPod*", KERNEL="sd?2", NAME="%k", SYMLINK="ipod"

Mac Formated iPod (hfs)
Code:
BUS="scsi", SYSFS{model}="iPod*", KERNEL="sd?3", NAME="%k", SYMLINK="ipod"


Out of curiousity...the only difference here is that KERNEL="sd?2/3 is different? Why note the difference here? Does it matter? Or is this to account for more then one ipod connected with different filesystems?
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Fri Dec 30, 2005 4:02 am    Post subject: Reply with quote

cappycdn wrote:
Quote:

PC Formated iPod (vfat)
Code:
BUS="scsi", SYSFS{model}="iPod*", KERNEL="sd?2", NAME="%k", SYMLINK="ipod"

Mac Formated iPod (hfs)
Code:
BUS="scsi", SYSFS{model}="iPod*", KERNEL="sd?3", NAME="%k", SYMLINK="ipod"


Out of curiousity...the only difference here is that KERNEL="sd?2/3 is different? Why note the difference here? Does it matter? Or is this to account for more then one ipod connected with different filesystems?


From what I have read, if your iPod was formatted using Mac software it creates 3 partitions, sd?1 is for the firmware (same as on the PC formatted iPods), sd?2 has some other sorta of data probably associated with MacOS or HFS+ journal type of info, and then sd?3 which contains all the data on your iPod. Since we are only interested in the data partition being mapped to /dev/ipod we uses that KERNEL= line to specify the partition number. Also, since some iPods come preformated with HFS and some with VFAT I thought I should mention both. I don't have a Mac so I can't reformat mine to prove this so if I am wrong someone please let me know so I can fix things.
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
furanku
l33t
l33t


Joined: 08 May 2003
Posts: 874
Location: Hamburg, Germany

PostPosted: Fri Dec 30, 2005 7:22 pm    Post subject: Reply with quote

rmh3093 wrote:
Also, since some iPods come preformated with HFS and some with VFAT I thought I should mention both. I don't have a Mac so I can't reformat mine to prove this so if I am wrong someone please let me know so I can fix things.


AFAIK the newer iPods come all with a HFS filesystem, it's just iTunes for Windows that reformats them silently in the background if it detects a "virgin" iPod.
Back to top
View user's profile Send private message
LordArthas
Guru
Guru


Joined: 01 Nov 2004
Posts: 494
Location: Maniago, Friûl, Italia

PostPosted: Sat Dec 31, 2005 12:50 pm    Post subject: Reply with quote

Hello!

This works like a charm on my iPod Nano (VFAT). Thank you for the excellent tutorial.

I only have a minor problem. When I eject /mnt/ipod I get the following message:

Code:

eject: unable to eject, last error: Invalid argument


However, the device seems to be properly ejected as the iPod display stops showing the "do not disconnect" message.

Michele.
_________________
Michele Beltrame
Italian Perl Workshop 2011
http://www.perl.it/workshop/
Back to top
View user's profile Send private message
cappycdn
n00b
n00b


Joined: 15 Sep 2005
Posts: 20

PostPosted: Mon Jan 02, 2006 4:14 am    Post subject: Reply with quote

I too received that error message though it appeared to hae actually ejected fine as media:// in konqueror no longer showed the ipod. *shrugs* suggestions?
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Tue Jan 03, 2006 6:15 pm    Post subject: Reply with quote

furanku wrote:
rmh3093 wrote:
Also, since some iPods come preformated with HFS and some with VFAT I thought I should mention both. I don't have a Mac so I can't reformat mine to prove this so if I am wrong someone please let me know so I can fix things.


AFAIK the newer iPods come all with a HFS filesystem, it's just iTunes for Windows that reformats them silently in the background if it detects a "virgin" iPod.


Well I just bought a new video iPod and it has never been connected to a Windows or Mac computer and it was formatted with vFat... IIRC, you can buy them from stores in either format.
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
fluffyzzz
n00b
n00b


Joined: 21 May 2005
Posts: 11

PostPosted: Wed Jan 04, 2006 8:17 am    Post subject: write problems Reply with quote

i'm a relative newbie and i'm not sure whats going on, but I have followed the given instruction and am not able to write to my ipod:

miyazaki ipod # mkdir k
mkdir: cannot create directory `k': Read-only file system

and in KDE

Could not make folder /mnt/ipod/k.

What manages wether the device is read-only?
Back to top
View user's profile Send private message
rmh3093
Advocate
Advocate


Joined: 06 Aug 2003
Posts: 2138
Location: Albany, NY

PostPosted: Wed Jan 04, 2006 7:39 pm    Post subject: Reply with quote

are u a member of the users group?
_________________
Do not meddle in the affairs of wizards, for they are subtle and quick to anger.
Back to top
View user's profile Send private message
fluffyzzz
n00b
n00b


Joined: 21 May 2005
Posts: 11

PostPosted: Wed Jan 04, 2006 9:21 pm    Post subject: Reply with quote

yes, I just checked in /etc/group and I am a member of users.

how else might the system decide that the ipod is read-only?
Back to top
View user's profile Send private message
dgaffuri
Advocate
Advocate


Joined: 05 Jun 2005
Posts: 2078
Location: Italy

PostPosted: Fri Jan 06, 2006 10:35 am    Post subject: Reply with quote

cappycdn wrote:
I too received that error message though it appeared to hae actually ejected fine as media:// in konqueror no longer showed the ipod. *shrugs* suggestions?

Upgrade eject to (keyword masked) 2.1.0 to avoid the error message.
_________________
Adopt an unanswered post
If you feel that your problem has been solved please edit the top post and add [solved] to the subject
Back to top
View user's profile Send private message
TheSoko
n00b
n00b


Joined: 31 Dec 2003
Posts: 37
Location: Illinois

PostPosted: Sat Jan 07, 2006 4:23 am    Post subject: Reply with quote

Will KDE with the hal and dbus USE variables automagically detect an iPod?
_________________
"The illiterate of the 21st century will not be those who cannot read and write, but those who cannot learn, unlearn, and relearn."
-Alvin Toffler
Back to top
View user's profile Send private message
furanku
l33t
l33t


Joined: 08 May 2003
Posts: 874
Location: Hamburg, Germany

PostPosted: Sat Jan 07, 2006 4:35 pm    Post subject: Reply with quote

Yes, KDE will detect an iPod as a USB mass storage device, like an USB stick or an externel hard disc.

With amarok (as you asked for KDE based solutions, there's of course also gtkpod and some console based tools for that) you will be able to transfer your mp3s to the iPod and integrate them in the iTunes db on the iPod. AFAIK there's currently just basic video/photo integration for 5g/Photo iPods in gtkpod, but you can use transcode to convert videos into the formats needed by the iPod. Some projects (like MythTV) are currently working on iPod integration.
Back to top
View user's profile Send private message
Sophisto
n00b
n00b


Joined: 16 Jan 2006
Posts: 41
Location: Leicester, UK

PostPosted: Fri Jan 27, 2006 12:48 pm    Post subject: Reply with quote

Just to confirm and thank you for this nice little guide! My iPod works perfectly apart from when i try and eject it same thing that mefiele described happens but to me that problem is insignificant!

thanks again
Back to top
View user's profile Send private message
neenee
Veteran
Veteran


Joined: 20 Jul 2003
Posts: 1786

PostPosted: Fri Jan 27, 2006 3:22 pm    Post subject: Reply with quote

thanks for sharing this ;-)

it worked fine for me, though i use debian.
_________________
proud to be a scout and a chronic penguin hugger
Legion of Lore - site
Back to top
View user's profile Send private message
soulfire
n00b
n00b


Joined: 09 Apr 2004
Posts: 70
Location: Italy

PostPosted: Fri Jan 27, 2006 6:57 pm    Post subject: Reply with quote

great howto, thank you !!
Back to top
View user's profile Send private message
Kernel_Klink
n00b
n00b


Joined: 18 Jun 2004
Posts: 17

PostPosted: Sun Jan 29, 2006 3:33 pm    Post subject: Reply with quote

rmh3093 wrote:
furanku wrote:
rmh3093 wrote:
Also, since some iPods come preformated with HFS and some with VFAT I thought I should mention both. I don't have a Mac so I can't reformat mine to prove this so if I am wrong someone please let me know so I can fix things.


AFAIK the newer iPods come all with a HFS filesystem, it's just iTunes for Windows that reformats them silently in the background if it detects a "virgin" iPod.


Well I just bought a new video iPod and it has never been connected to a Windows or Mac computer and it was formatted with vFat... IIRC, you can buy them from stores in either format.


The 5th gen iPods are no longer sold in different formats. They will support both formats but I am not sure what format is default out of the box.
_________________
Gentoo, it is a way of life.
Back to top
View user's profile Send private message
irfanmohammed
n00b
n00b


Joined: 05 Aug 2005
Posts: 3

PostPosted: Sat Feb 04, 2006 12:27 am    Post subject: /dev/ipod doesnt show up Reply with quote

I followed the instructions for the udev rules and the /dev/ipod doesnt show up.

Code:
my dmesg output is as follows:

VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 212k freed
kjournald starting.  Commit interval 5 seconds
  Vendor: Apple     Model: iPod              Rev: 1.50
  Type:   Direct-Access                      ANSI SCSI revision: 00
usb-storage: device scan complete
Adding 1004052k swap on /dev/hda2.  Priority:-1 extents:1
EXT3 FS on hda3, internal journal
Adding 3145720k swap on /swapfile.  Priority:-2 extents:2035
eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
cisco_ipsec: module license 'Proprietary' taints kernel.
Cisco Systems VPN Client Version 4.6.00 (0045) kernel module loaded
usb 1-1: USB disconnect, address 2
usb 2-1: new full speed USB device using uhci_hcd and address 2
usb 2-1: device descriptor read/64, error -71
usb 2-1: device descriptor read/64, error -71
usb 2-1: new full speed USB device using uhci_hcd and address 3
usb 2-1: device descriptor read/64, error -71
usb 2-1: device descriptor read/64, error -71
usb 2-1: new full speed USB device using uhci_hcd and address 4
usb 2-1: device not accepting address 4, error -71
usb 2-1: new full speed USB device using uhci_hcd and address 5
usb 2-1: device not accepting address 5, error -71
usb 1-1: new high speed USB device using ehci_hcd and address 5
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
  Vendor: Apple     Model: iPod              Rev: 1.50
  Type:   Direct-Access                      ANSI SCSI revision: 00
usb-storage: device scan complete

doesnt show any information about the device. any help is appreciated.
Back to top
View user's profile Send private message
neenee
Veteran
Veteran


Joined: 20 Jul 2003
Posts: 1786

PostPosted: Sat Feb 04, 2006 10:18 am    Post subject: Reply with quote

if you are plugging in your ipod in one of your front usb
ports, try one of the back ports instead. i and several
others have had this problem as well and switching to
a back port helped.
_________________
proud to be a scout and a chronic penguin hugger
Legion of Lore - site
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2517
Location: Germany

PostPosted: Sat Feb 04, 2006 10:30 am    Post subject: Reply with quote

Doesn't work for me either. Do I have to do something to udev to make it see the new rules? Can I somehow add a debug message to a rule so I can see wether it's been checked or not, or are they supposed to work right when I change the rule files? I also tried following the writing udev rules guide to no avail...

EDIT:
Found the problem - for some reason, the rules line posted above works for me only if I use == instead of = for comparisons. According to manpage, a single = means assignment.
Back to top
View user's profile Send private message
irfanmohammed
n00b
n00b


Joined: 05 Aug 2005
Posts: 3

PostPosted: Sun Feb 05, 2006 2:41 pm    Post subject: Reply with quote

Can you post the exact changes after the "==" changes in all the files posted in the original message?

I couldnt get to it to work.

Thanks.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2517
Location: Germany

PostPosted: Sun Feb 05, 2006 5:14 pm    Post subject: Reply with quote

Okay. The rules I'm using now are slightly different from the one posted above, though.

In /etc/udev/rules.d/00-custom.rules:

Code:
BUS=="scsi", KERNEL=="sd*", SYSFS{model}=="*iPod*", SYMLINK+="usb/ipod%n"


Creates a /dev/usb/ipod, as well as /dev/usb/ipod<number> (one device per partition, like with harddisks you have hda, hda1, hda2, ...).

If it doesn't work, check if and how your iPod is detected. You can then use udevinfo to verify the SYSFS entries (maybe your model description is differently written?), for example if your iPod is /dev/sda, you can issue the following command:
Code:
udevinfo -p /sys/block/sda -a /dev/sda
- if your iPod is not detected at all, your problem lies elsewhere.

Please note that for exact string matches, you have to respect upper/lower case as well as spaces (I'm just using wildcards instead though).
Back to top
View user's profile Send private message
torf
n00b
n00b


Joined: 27 Apr 2004
Posts: 65
Location: Constance/Germany

PostPosted: Mon Feb 06, 2006 7:49 pm    Post subject: Reply with quote

Although you guys gave me a good starting point I'm not able to get my iPod Shuffle to work. It is detected fine by the system and I can mount it manually using
Code:
# mount -t vfat /dev/sda1 /mnt/ipod

Also, udevtest tells me my rules (which are placed in /etc/udev/rules.d/10-local.rules) are working fine:
Code:
# udevtest /sys/block/sda/sda1 usb
main: looking at device '/block/sda/sda1' from subsystem 'usb'
main: opened class_dev->name='sda1'
udev_rules_get_name: reset symlink list
udev_rules_get_name: add symlink 'ipod'
udev_rules_get_name: rule applied, 'sda1' becomes 'sda1'
create_node: creating device node '/dev/sda1', major = '8', minor = '1', mode = '0660', uid = '0', gid = '0'
create_node: creating symlink '/dev/ipod' to 'sda1'

Nevertheless, /dev/ipod is never created. Of course I ran udevstart after each modification of the rules file which now looks like this:
Code:
SYSFS{model}="iPod*", KERNEL="sd?1", NAME="%k", SYMLINK="ipod"

Changing the "=" in the comparisons to a "==" didn't change anything. Here's the output of udevinfo:
Code:
device '/sys/block/sda/sda1' has major:minor 8:1
  looking at class device '/sys/block/sda/sda1':
    KERNEL=="sda1"
    SUBSYSTEM=="block"
    SYSFS{dev}=="8:1"
    SYSFS{size}=="2032350"
    SYSFS{start}=="34"
    SYSFS{stat}=="      43       86        0        0"

follow the "device"-link to the physical device:
  looking at the device chain at '/sys/devices/pci0000:00/0000:00:02.1/usb2/2-3/2-3:1.0/host6/target6:0:0/6:0:0:0':
    BUS==""
    ID=="6:0:0:0"
    DRIVER=="sd"
    SYSFS{detach_state}=="0"
    SYSFS{device_blocked}=="0"
    SYSFS{max_sectors}=="240"
    SYSFS{model}=="iPod            "
    SYSFS{queue_depth}=="1"
    SYSFS{queue_type}=="none"
    SYSFS{rev}=="2.70"
    SYSFS{scsi_level}=="5"
    SYSFS{state}=="running"
    SYSFS{timeout}=="30"
    SYSFS{type}=="0"
    SYSFS{vendor}=="Apple   "

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:02.1/usb2/2-3/2-3:1.0/host6/target6:0:0':
    BUS==""
    ID=="target6:0:0"
    DRIVER=="unknown"
    SYSFS{detach_state}=="0"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:02.1/usb2/2-3/2-3:1.0/host6':
    BUS==""
    ID=="host6"
    DRIVER=="unknown"
    SYSFS{detach_state}=="0"

 looking at the device chain at '/sys/devices/pci0000:00/0000:00:02.1/usb2/2-3/2-3:1.0':
    BUS==""
    ID=="2-3:1.0"
    DRIVER=="usb-storage"
    SYSFS{bAlternateSetting}==" 0"
    SYSFS{bInterfaceClass}=="08"
    SYSFS{bInterfaceNumber}=="00"
    SYSFS{bInterfaceProtocol}=="50"
    SYSFS{bInterfaceSubClass}=="06"
    SYSFS{bNumEndpoints}=="02"
    SYSFS{detach_state}=="0"
    SYSFS{interface}=="Internal Device"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:02.1/usb2/2-3':
    BUS==""
    ID=="2-3"
    DRIVER=="usb"
    SYSFS{bConfigurationValue}=="1"
    SYSFS{bDeviceClass}=="00"
    SYSFS{bDeviceProtocol}=="00"
    SYSFS{bDeviceSubClass}=="00"
    SYSFS{bMaxPower}=="500mA"
    SYSFS{bNumConfigurations}=="2"
    SYSFS{bNumInterfaces}==" 1"
    SYSFS{bcdDevice}=="1001"
    SYSFS{bmAttributes}=="80"
    SYSFS{configuration}=="Apple iPod"
    SYSFS{detach_state}=="0"
    SYSFS{devnum}=="8"
    SYSFS{idProduct}=="1300"
    SYSFS{idVendor}=="05ac"
    SYSFS{manufacturer}=="Apple"
    SYSFS{maxchild}=="0"
    SYSFS{product}=="iPod            "
    SYSFS{serial}=="000A2700100908AE"
    SYSFS{speed}=="12"
    SYSFS{version}==" 2.00"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:02.1/usb2':
    BUS==""
    ID=="usb2"
    DRIVER=="usb"
    SYSFS{bConfigurationValue}=="1"
    SYSFS{bDeviceClass}=="09"
    SYSFS{bDeviceProtocol}=="00"
    SYSFS{bDeviceSubClass}=="00"
    SYSFS{bMaxPower}=="  0mA"
    SYSFS{bNumConfigurations}=="1"
    SYSFS{bNumInterfaces}==" 1"
    SYSFS{bcdDevice}=="0206"
    SYSFS{bmAttributes}=="e0"
    SYSFS{configuration}==""
    SYSFS{detach_state}=="0"
    SYSFS{devnum}=="1"
    SYSFS{idProduct}=="0000"
    SYSFS{idVendor}=="0000"
    SYSFS{manufacturer}=="Linux 2.6.11-gentoo-r5 ohci_hcd"
    SYSFS{maxchild}=="3"
    SYSFS{product}=="nVidia Corporation nForce2 USB Controller _#2_"
    SYSFS{serial}=="0000:00:02.1"
    SYSFS{speed}=="12"
    SYSFS{version}==" 1.10"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:02.1':
    BUS==""
    ID=="0000:00:02.1"
    DRIVER=="ohci_hcd"
    SYSFS{class}=="0x0c0310"
    SYSFS{detach_state}=="0"
    SYSFS{device}=="0x0067"
    SYSFS{irq}=="11"
    SYSFS{local_cpus}=="1"
    SYSFS{subsystem_device}=="0x5700"
    SYSFS{subsystem_vendor}=="0x1462"
    SYSFS{vendor}=="0x10de"

  looking at the device chain at '/sys/devices/pci0000:00':
    BUS==""
    ID=="pci0000:00"
    DRIVER=="unknown"
    SYSFS{detach_state}=="0"


Thanks in advance for any pointers on this!
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
Goto page 1, 2, 3  Next
Page 1 of 3

 
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