[Techtalk] iPod with Linux - again

John Clarke johnc+linuxchix at kirriwa.net
Mon Jul 12 11:48:09 EST 2004


On Mon, Jul 12, 2004 at 01:19:15AM +0100, David Sumbler wrote:
> On Mon, 12 Jul 2004, John Clarke wrote:
> 
> > On Mon, Jul 12, 2004 at 12:24:26AM +0100, David Sumbler wrote:
> >
> > > Usually when I put the iPod into its dock, (which is connected to the
> > > firewire card on my FC1 box), and always when I try to mount it on
> > > /mnt/ipod, I get messages such as:
> > >
> > > sda: Unit Not Ready, sense:
> >
> > If you try to mount it a second time, does it then work?
> 
> No - I get the same result.

Sorry David, I missed this in your original message:

> Additional sense indicates Medium not present

This means that the device isn't there i.e. there is no /dev/sda.  I
don't have an ipod usb cable here so I can't hook it up and trace
exactly what happens, but I've grabbed the log messages from an old
session at home and this is what happens (RH7.3, 2.4 kernel).  First,
the usb and scsi drivers are started and report finding the ipod:

    kernel: usb.c: USB device 13 (vend/prod 0x5ac/0x1201) is not claimed by any active driver.
    kernel: Initializing USB Mass Storage driver...
    kernel: usb.c: registered new driver usb-storage
    kernel: scsi1 : SCSI emulation for USB Mass Storage devices
    kernel:   Vendor: Apple     Model: iPod              Rev: 1.50
    kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
    kernel: WARNING: USB Mass Storage data integrity not assured
    kernel: USB Mass Storage device found at 13
    kernel: USB Mass Storage support registered.

This next message tells you which device to use:

    kernel: Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
                                         ^^^
Then there are a few messages indicating that the drive isn't yet ready
(these messages may be repeated a few times):

    kernel: sda : READ CAPACITY failed.
    kernel: sda : status = 1, message = 00, host = 0, driver = 08 
    kernel: Current sd00:00: sense key Not Ready
    kernel: Additional sense indicates Logical unit is in process of becoming ready
    kernel: sda : block size assumed to be 512 bytes, disk size 1GB.  
    kernel:  sda: I/O error: dev 08:00, sector 0
    kernel:  I/O error: dev 08:00, sector 0
    kernel:  unable to read partition table

That's the end of the first attempt to mount it.  When I try again, I
get:

    kernel: SCSI device sda: 78126048 512-byte hdwr sectors (40001 MB)
    kernel: sda: Write Protect is off
    kernel:  sda: sda1 sda2

You could try using scsiadd (from http://llg.cubic.org/tools/) to scan
your scsi bus.  If it doesn't tell you anything useful (I've never used
it so I can't be certain it will), you might find something in
/var/log/messages. 

Or you could simply try sdb, sdc, sdd, etc until you find which one
works :-)

> > > Also, what would a suitable entry in /etc/fstab be?
> >
> >     [johnc at dropbear ~]$ grep ipod /etc/fstab
> >     /dev/sda2         /mnt/ipod           auto    noauto,user,nosuid  0 0
> 
> OK, that's what I had put, except I hadn't included 'nosuid'.

It prevents users running suid binaries from the device.  Without it,
there's nothing to stop someone from copying an suid binary onto the
device from another system and running it on yours.

> And I assume (because of the error messages) that mine should be
> /dev/sda.  But then, I get the same error messages if I try "cat
> /dev/sda", "cat /dev/sda1", "cat /dev/sda2" etc.  So how do I find out
> which device I should actually be looking at?

You want the second partition on the device.  If it's sda, you want
sda2, if it's sdb, you want sdb2, etc.


Cheers,

John
-- 
I'm collecting all those wiry hairs that you find in between keyboard
keys, and saving them up until I have enough for a beard of my own.
                    -- Kirrily 'Skud' Robert


More information about the Techtalk mailing list