Can't mount iPod (HFS)

Getting your soundcard to work, using Debian on non-i386 hardware, etc

Can't mount iPod (HFS)

Postby milomak » 2011-06-11 17:51

When I plug in my iPod, dmesg returns
Code: Select all
sd 5:0:0:0: [sdd] Bad block number requested
hfs: unable to find HFS+ superblock


I am using the 2.6.39.1 kernel
Code: Select all
$ uname -a
Linux debian 2.6.39.1 #1 SMP PREEMPT Sat Jun 11 19:22:14 SAST 2011 x86_64 GNU/Linux


with these HFS settings in the kernel
Code: Select all
$ cat /boot/config-2.6.39.1 | grep HFS
CONFIG_NET_SCH_HFSC=m
CONFIG_HFS_FS=y
CONFIG_HFSPLUS_FS=y
CONFIG_SQUASHFS=m
CONFIG_SQUASHFS_XATTR=y
CONFIG_SQUASHFS_LZO=y
CONFIG_SQUASHFS_XZ=y
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3


and manual mounting returns
Code: Select all
# mount -t hfsplus /dev/sdd /mnt/disk
mount: wrong fs type, bad option, bad superblock on /dev/sdd,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so


This Arch Linux post points to the problem and a solution for Arch. How do I implement this in a Debian environment?
Laptop (64-bit) - Debian Sid and Win8
Desktop (64-bit) - Debian Sid, ArchLinux, Win8 and Fedora 19
MythTV BE/FE - Debian Stable
MythTV FE - Debian Sid
milomak
 
Posts: 1388
Joined: 2009-06-09 22:20

Re: Can't mount iPod (HFS)

Postby bw123 » 2011-06-11 18:50

what does fdisk -l say? and break down of the solution you found on arch wiki would help. That way people don't have to click around, and try to figure which post you're talking about.
wheezy/fluxbox, GNU/Linux 3.10-0.bpo.3-amd64
User avatar
bw123
 
Posts: 1826
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Can't mount iPod (HFS)

Postby 4D696B65 » 2011-06-11 19:03

User avatar
4D696B65
 
Posts: 1760
Joined: 2009-06-28 06:09

Re: Can't mount iPod (HFS)

Postby milomak » 2011-06-17 21:02

@bw123 - the 3rd post of 3 in the archlinux link basically says either downgrade to 2.6.37 and it works (for some reason trying to compile a 2.6.37 kernel fails). Or use the hfsplus module from the 2.6.37 kernel in 2.6.38+ kernels.

@4D696B65 - they have been installed for some time before the problem started. should have made it clear in my op i used to be able to access the ipod. i mostly actuallly update it from my mbp. but when on this day i tried to update from my desktop pc, the ipod was not mounting.
Laptop (64-bit) - Debian Sid and Win8
Desktop (64-bit) - Debian Sid, ArchLinux, Win8 and Fedora 19
MythTV BE/FE - Debian Stable
MythTV FE - Debian Sid
milomak
 
Posts: 1388
Joined: 2009-06-09 22:20

Re: Can't mount iPod (HFS)

Postby milomak » 2011-07-16 13:53

So my 2.6.32.43 self compiled kernel can mount the ipod. In KDE I choose the option to open it in a File Manager (Thunar) and it opens. dmesg then shows:

Code: Select all
debian ~ # dmesg
Linux version 2.6.32.43 (root@debian) (gcc version 4.6.1 (Debian 4.6.1-3) ) #1 SMP PREEMPT Sat Jul 16 12:18:06 SAST 2011
.
.
<snip>
.
.
usb 1-5.4: new high speed USB device using ehci_hcd and address 7
usb 1-5.4: New USB device found, idVendor=05ac, idProduct=1265
usb 1-5.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-5.4: Product: iPod
usb 1-5.4: Manufacturer: Apple Inc.
usb 1-5.4: SerialNumber: 000A2700208409CD
usb 1-5.4: configuration #1 chosen from 2 choices
scsi6 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 6:0:0:0: Direct-Access     Apple    iPod             1.70 PQ: 0 ANSI: 0
sd 6:0:0:0: Attached scsi generic sg5 type 0
sd 6:0:0:0: [sde] 3924928 4096-byte logical blocks: (16.0 GB/14.9 GiB)
sd 6:0:0:0: [sde] Write Protect is off
sd 6:0:0:0: [sde] Mode Sense: 68 00 00 08
sd 6:0:0:0: [sde] Assuming drive cache: write through
sd 6:0:0:0: [sde] 3924928 4096-byte logical blocks: (16.0 GB/14.9 GiB)
sd 6:0:0:0: [sde] Assuming drive cache: write through
sde: detected capacity change from 0 to 16076505088
 sde: [mac] sde1 sde2
sd 6:0:0:0: [sde] 3924928 4096-byte logical blocks: (16.0 GB/14.9 GiB)
sd 6:0:0:0: [sde] Assuming drive cache: write through
sd 6:0:0:0: [sde] Attached SCSI removable disk
hfs: write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only.
hfs: write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only.


mount shows
Code: Select all
/dev/sde2 on /media/iPod type hfsplus (ro,nosuid,nodev,uhelper=udisks)


I then compiled a 3.0-rc5 kernel. When I plug the device

Code: Select all
debian ~ # dmesg
Linux version 3.0.0-rc5 (root@debian) (gcc version 4.6.1 (Debian 4.6.1-3) ) #1 SMP PREEMPT Sat Jul 16 13:06:46 SAST 2011
.
.
<snip>
.
.
usb 1-5.4: new high speed USB device number 7 using ehci_hcd
usb 1-5.4: New USB device found, idVendor=05ac, idProduct=1265
usb 1-5.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-5.4: Product: iPod
usb 1-5.4: Manufacturer: Apple Inc.
usb 1-5.4: SerialNumber: 000A2700208409CD
scsi6 : usb-storage 1-5.4:1.0
scsi 6:0:0:0: Direct-Access     Apple    iPod             1.70 PQ: 0 ANSI: 0
sd 6:0:0:0: Attached scsi generic sg5 type 0
sd 6:0:0:0: [sde] Spinning up disk....ready
sd 6:0:0:0: [sde] 3924928 4096-byte logical blocks: (16.0 GB/14.9 GiB)
sd 6:0:0:0: [sde] Write Protect is off
sd 6:0:0:0: [sde] Mode Sense: 68 00 00 08
sd 6:0:0:0: [sde] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sd 6:0:0:0: [sde] 3924928 4096-byte logical blocks: (16.0 GB/14.9 GiB)
 sde: [mac] sde1 sde2
sd 6:0:0:0: [sde] 3924928 4096-byte logical blocks: (16.0 GB/14.9 GiB)
sd 6:0:0:0: [sde] Attached SCSI removable disk


I then try to mount it
Code: Select all
debian ~ # mount -t hfsplus /dev/sde2 /mnt/disk
mount: wrong fs type, bad option, bad superblock on /dev/sde,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so


Code: Select all
debian ~ # dmesg
Linux version 3.0.0-rc5 (root@debian) (gcc version 4.6.1 (Debian 4.6.1-3) ) #1 SMP PREEMPT Sat Jul 16 13:06:46 SAST 2011
.
.
<snip>
.
.
sd 6:0:0:0: [sde] Bad block number requested
hfs: unable to find HFS+ superblock


So it really does seem as though the HFS code in the kernels after 2.6.32 has changed to cause the problem. Or at least to my untrained eye that's what I would guess.

I'm going to see what happens when I copy hfs and hfsplus directories from the 2.6.32 source to newer kernel sources and then compiling.
Laptop (64-bit) - Debian Sid and Win8
Desktop (64-bit) - Debian Sid, ArchLinux, Win8 and Fedora 19
MythTV BE/FE - Debian Stable
MythTV FE - Debian Sid
milomak
 
Posts: 1388
Joined: 2009-06-09 22:20

Re: Can't mount iPod (HFS)

Postby milomak » 2011-07-16 17:07

unsurprisingly it is not as easy as that

Code: Select all
fs/hfs/btree.c: In function ‘hfs_btree_open’:
fs/hfs/btree.c:29:2: error: implicit declaration of function ‘init_MUTEX’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

make[3]: *** [fs/hfs/btree.o] Error 1
make[2]: *** [fs/hfs] Error 2
make[1]: *** [fs] Error 2
make[1]: *** Waiting for unfinished jobs....
Laptop (64-bit) - Debian Sid and Win8
Desktop (64-bit) - Debian Sid, ArchLinux, Win8 and Fedora 19
MythTV BE/FE - Debian Stable
MythTV FE - Debian Sid
milomak
 
Posts: 1388
Joined: 2009-06-09 22:20


Return to Hardware

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable