Bug 187409 - cannot mount iPod on FC5 via Firewire
cannot mount iPod on FC5 via Firewire
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Brian Brock
NeedsRetesting
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-03-30 14:28 EST by Vladimir Kotal
Modified: 2008-08-02 19:40 EDT (History)
4 users (show)

See Also:
Fixed In Version: 2.6.18-1.2200.fc5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-11-08 12:21:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
messages that are written after iPod is attached via Firewire cable (17.35 KB, application/octet-stream)
2006-03-30 14:28 EST, Vladimir Kotal
no flags Details

  None (edit)
Description Vladimir Kotal 2006-03-30 14:28:49 EST
Description of problem:

I am no longer able mount my iPod mini connected with Firewire cable after upgrading to FC5 from 
FC4. This worked like a charm in FC4.

Version-Release number of selected component (if applicable):

kernel-2.6.15-1.2054_FC5

How reproducible:

connect iPod via Firewire cable and try to mount it

Steps to Reproduce:
1. connect iPod via Firewire cable
2. mount it : mount -t vfat /dev/sdb2 /mnt/ipod/
  
Actual results:

after iPod is connected, kernel displays lots of messages about I/O errors (see attached file ipod-
disfunct.log) and after mount attempt fails:

[root@erazim techie]# mount -t vfat /dev/sdb2 /mnt/ipod/
mount: /dev/sdb2: can't read superblock

and kernel displays the following:

Mar 30 21:28:03 erazim kernel: end_request: I/O error, dev sdb, sector 70308
Mar 30 21:28:03 erazim kernel: FAT: unable to read boot sector


Expected results:

should be able to mount iPod without any problem (it did work in FC4)

Additional info:
Comment 1 Vladimir Kotal 2006-03-30 14:28:49 EST
Created attachment 127066 [details]
messages that are written after iPod is attached via Firewire cable
Comment 2 Stefan Richter 2006-04-01 09:22:59 EST
Does FC5 include EFI partition support? If yes, the reason for the IO errors is
a bug of the iPod's firmware. A workaround has been discussed at
linux1394-devel: http://marc.theaimsgroup.com/?t=114233262300001
A patch has been posted:
http://marc.theaimsgroup.com/?l=linux1394-devel&m=114277488927272
The patch and all patches it depends on is available as a patchset:
http://me.in-berlin.de/~s5r6/linux1394/updates/
The patch has not been forwarded to -mm or Linus yet. I would appreciate if you
could build the kernel from sources with the patch(set) applied and confirm or
deny that the patch helps.
Comment 3 Vladimir Kotal 2006-04-01 10:29:42 EST
Don't know if kernel in Fedora contains EFI part. support. How can I reliably verify that it does ?

BTW my model ID of my iPod is:

[techie@erazim ~]$ cat /sys/bus/ieee1394/devices/000a27001425cccd-0/model_name_kv 
iPod
[techie@erazim ~]$ cat /sys/bus/ieee1394/devices/000a27001425cccd-0/model_id 
0x000023

Could you write some notes how to compile kernel module(s) with your patch and install it ? (I don't really 
want to replace whole kernel)
Comment 4 Stefan Richter 2006-04-01 12:32:26 EST
Thanks for reporting the model_id of your iPod. The patch won't catch this id,
but to test the patch regardless, you could either edit the patch manually or
you could leave it as it is and load sbp2 with "modprobe sbp2 workarounds=8"
before you connect the iPod. But you need the driver patches in either case.

There are ways to patch only the driver modules and install them without
changing the kernel. However I really do not know how to do this on Fedora Core
since I never had Fedore Core installed myself. Therefore I can tell you only
how to do a complete kernel installation, without distro-specific details
though. Maybe somebody else reading this can give advice.

If you do not feel comfortable with this, please do *not* attempt to build an
own kernel. Otherwise, here are the steps:

1. Install the kernel source RPM which matches your running kernel.

2. Obtain the configuration file of your currently running kernel and copy it
into the kernel source tree's main directory. Name it ".config".

3. Change into the kernel source tree's main directory. Edit the "Makefile":
Append something like "-custom" to the EXTRAVERSION string to distinguish the
custom-built kernel from the installed kernel.

4. Fetch a patchset from my 1394 updates site, matching your kernel. Apply the
patchset by "bzcat path_to_downloaded_file | patch -p1".

5. Build kernel and modules by "make".

6. Install the kernel modules: "make modules_install". Run this as root or
prepend "sudo ".

7. Install the kernel image (and if applicable, the initrd). This is usually
accomplished by "make install", run as root or with sudo. However the actual
steps may differ from distro to distro.

8. Configure the boot loader to let you select between the old kernel(s) and the
newly built custom kernel. This may already have been accomplished by step 7.

9. Reboot and select the new kernel from the bootloader's menu.
Comment 5 Stefan Richter 2006-04-01 12:38:08 EST
The kernel supports EFI partition tables if CONFIG_EFI_PARTITION=y is set in the
.config file. I can't tell how this can be found out without having the .config
file available.
Comment 6 Vladimir Kotal 2006-04-04 15:57:20 EDT
I have just tried to mount the iPod via USB cable (I have both USB and Firewire) and it works like a charm (it 
is mounted via HAL to /media/) so this is definitely 1394 issue.
Comment 7 Stefan Richter 2006-04-06 16:32:20 EDT
How does the kernel log message "SCSI device sd#: ####### 512-byte hdwr sectors
(4096 MB)" look like when you connected the iPod via USB?
Comment 8 Vladimir Kotal 2006-04-06 16:45:56 EDT
when connected via USB:

Apr  6 20:40:25 erazim kernel: SCSI device sde: 7999487 512-byte hdwr sectors (4096 MB)
Apr  6 20:40:25 erazim kernel: SCSI device sde: 7999487 512-byte hdwr sectors (4096 MB)

Let me know if you need something more.
Comment 9 Stefan Richter 2006-04-06 17:54:27 EDT
7999487 sectors via USB vs. 7999488 sectors via FireWire --- this is
usb-storage's iPod sector count workaround in action. We have to add the same
workaround to sbp2. The patch which I mentioned above is the start, though we
need to add more if not all iPods to it.

Alas I see no possibility of a temporary workaround, other than patching the
kernel (or presumably recompiling the kernel without EFI partition support so it
does avoid to access sectors near the end of the disk).

Thanks for the reports.
Comment 10 Faisal Malallah 2006-05-09 05:46:43 EDT
Stefan,

Does your patch set applies to the redhat kernels? I would like to try out the
patches myself.
Comment 11 Stefan Richter 2006-05-09 17:16:14 EDT
If you can figure out which kernel.org version the RedHat kernel was derived
from, and if I have a patchset for that version, then it should most likely apply.

If you cannot find out the version for sure or if I don't have patches for that
version, point me to a download link of the respective RedHat kernel source RPM
and I could certainly adapt the patches to it.

Test results would be very welcome.
Comment 12 Faisal Malallah 2006-05-12 14:20:07 EDT
Stefan, 

I applied patchset 2.6.16.x_ieee1394_v68.patch.bz2 to Fedora's kernel
2.6.16-1.2111_FC5smp and I'm very happy to report SUCCESS!!

As soon as I linked my firewire cable to the ipod, Fedora's hal daemon picked it
up and mounted it. I performed a couple of read/write operations on the ipod and
it worked.
Comment 13 Stefan Richter 2006-05-13 06:36:00 EDT
Thanks for testing. I hope these patches will go into the official kernel soon.
Comment 14 Faisal Malallah 2006-05-17 14:13:24 EDT
Examining dmesg after the mounting of the ipod gives an error "Buffer I/O" not
sure how severe this error can be. The ipod, which is an Ipod Photo 60GB,
mounted just fine as I stated before. 

Any way to fix this stefan?

ieee1394: Node added: ID:BUS[0-00:1023]  GUID[000a2700147bcf3c]
ieee1394: Node changed: 0-00:1023 -> 0-01:1023
ieee1394: sbp2: Driver forced to serialize I/O (serialize_io=1)
ieee1394: sbp2: Try serialize_io=0 for better performance
scsi2 : SBP-2 IEEE-1394
ieee1394: sbp2: Workarounds for node 0-00:1023: 0x8 (firmware_revision 0x0a2700,
 vendor_id 0x000a27, model_id 0x00007e)
ieee1394: sbp2: Logged into SBP-2 device
ieee1394: Node 0-00:1023: Max speed [S400] - Max payload [2048]
  Vendor: Apple     Model: iPod              Rev: 1.62
  Type:   Direct-Access-RBC                  ANSI SCSI revision: 00
sdb: Spinning up disk......ready
SCSI device sdb: 117210239 512-byte hdwr sectors (60012 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 08 00 00
SCSI device sdb: drive cache: write through
SCSI device sdb: 117210239 512-byte hdwr sectors (60012 MB)
sdb: Write Protect is off
sdb: Mode Sense: 00 08 00 00
SCSI device sdb: drive cache: write through
 sdb: sdb1 sdb2
sd 2:0:0:0: Attached scsi removable disk sdb
sd 2:0:0:0: Attached scsi generic sg2 type 14
Buffer I/O error on device sdb2, logical block 117129914
Buffer I/O error on device sdb2, logical block 117129914
Buffer I/O error on device sdb2, logical block 117129914
Buffer I/O error on device sdb2, logical block 117129914
Buffer I/O error on device sdb2, logical block 117129914
Buffer I/O error on device sdb2, logical block 117129914
Buffer I/O error on device sdb2, logical block 117129912
Buffer I/O error on device sdb2, logical block 117129913
Buffer I/O error on device sdb2, logical block 117129914
Buffer I/O error on device sdb2, logical block 117129912
Comment 15 Stefan Richter 2006-05-31 14:53:06 EDT
Hm, these errors are about 40 MBytes away of the end of the disk. They are
logged by filesystem code (i.e. not by the SCSI subsystem or IEEE 1394
subsystem) apparently after a read operation. I don't know what could cause them
or how it could be farther diagnosed.
Comment 16 Stefan Richter 2006-06-07 10:06:41 EDT
The fix for the initial problem (end_request: I/O error, FAT: unable to read
boot sector) is available in kernel.org's sources since Linux 2.6.17-rc5 and
2.6.16.20.
Comment 17 Dave Jones 2006-10-16 16:52:06 EDT
A new kernel update has been released (Version: 2.6.18-1.2200.fc5)
based upon a new upstream kernel release.

Please retest against this new kernel, as a large number of patches
go into each upstream release, possibly including changes that
may address this problem.

This bug has been placed in NEEDINFO state.
Due to the large volume of inactive bugs in bugzilla, if this bug is
still in this state in two weeks time, it will be closed.

Should this bug still be relevant after this period, the reporter
can reopen the bug at any time. Any other users on the Cc: list
of this bug can request that the bug be reopened by adding a
comment to the bug.

In the last few updates, some users upgrading from FC4->FC5
have reported that installing a kernel update has left their
systems unbootable. If you have been affected by this problem
please check you only have one version of device-mapper & lvm2
installed.  See bug 207474 for further details.

If this bug is a problem preventing you from installing the
release this version is filed against, please see bug 169613.

If this bug has been fixed, but you are now experiencing a different
problem, please file a separate bug for the new problem.

Thank you.
Comment 18 Jarod Wilson 2006-11-08 12:21:39 EST
I'm able to mount an iPod just fine via FireWire under FC6, kernel
2.6.18-1.2798.fc6. I'm operating under the assumption that whatever fixed this
went in upstream, and is in 2.6.18-1.2200.fc5 as well.

  Vendor: Apple     Model: iPod              Rev: 1.62
  Type:   Direct-Access-RBC                  ANSI SCSI revision: 00
sdb: Spinning up disk.......ready
SCSI device sdb: 78126047 512-byte hdwr sectors (40001 MB)
sdb: Write Protect is off
SCSI device sdb: drive cache: write through
SCSI device sdb: 78126047 512-byte hdwr sectors (40001 MB)
sdb: Write Protect is off
SCSI device sdb: drive cache: write through
sd 8:0:0:0: Attached scsi removable disk sdb
sd 8:0:0:0: Attached scsi generic sg2 type 14
hfs: write access to a jounaled filesystem is not supported, use the force
option at your own risk, mounting read-only.

# df -h /media/jPod/
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb3              38G   28G  9.3G  76% /media/jPod

Note You need to log in before you can comment on or make changes to this bug.