Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390617 - >sys-kernel/gentoo-sources-2.6.38-r6 - Cannot mount Ipod Nano with HFSplus partition
Summary: >sys-kernel/gentoo-sources-2.6.38-r6 - Cannot mount Ipod Nano with HFSplus pa...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-15 13:51 UTC by bonesy
Modified: 2012-01-02 05:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bonesy 2011-11-15 13:51:35 UTC
Ever since updating my kernel I've been unable to mount my 5th generation Ipod Nano. I can mount it perfectly using kernel 2.6.32-r29. I've been unable to mount it using kernels with version 2.6.38-r6 and above. My current kernel is 3.0.6.

dmesg after plugging in nano:

[   84.299497] scsi 2:0:0:0: Direct-Access     Apple    iPod             1.62 PQ: 0 ANSI: 0
[   84.299773] sd 2:0:0:0: Attached scsi generic sg1 type 0
[   84.304006] sd 2:0:0:0: [sdb] Spinning up disk....ready
[   85.808462] sd 2:0:0:0: [sdb] 1946049 4096-byte logical blocks: (7.97 GB/7.42 GiB)
[   85.809019] sd 2:0:0:0: [sdb] Write Protect is off
[   85.809019] sd 2:0:0:0: [sdb] Mode Sense: 68 00 00 08
[   85.810020] sd 2:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   85.811461] sd 2:0:0:0: [sdb] 1946049 4096-byte logical blocks: (7.97 GB/7.42 GiB)
[   85.833449]  sdb: [mac] sdb1 sdb2
[   85.835016] sd 2:0:0:0: [sdb] 1946049 4096-byte logical blocks: (7.97 GB/7.42 GiB)
[   85.837012] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[   87.060697] sd 2:0:0:0: [sdb] Bad block number requested
[   87.060697] hfs: unable to find HFS+ superblock

Dmesg after mounting:

[   91.903154] sd 2:0:0:0: [sdb] Bad block number requested
[   91.903154] hfs: unable to find HFS+ superblock

Error message after "mount /mnt/nano" 

mount: wrong fs type, bad option, bad superblock on /dev/sdb2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

I have enable the necessary support for HFS/(plus) in the kernel:

CONFIG_HFS_FS=y
CONFIG_HFSPLUS_FS=y
CONFIG_MAC_PARTITION=y

Entry in /etc/fstab:
/dev/nano   /mnt/nano   hfsplus      noauto,rw,user   0 0



Reproducible: Always

Steps to Reproduce:
1.Plug in Ipod Nano.
2.Mount with the "mount /mnt/nano" command

Actual Results:  
mount: wrong fs type, bad option, bad superblock on /dev/sdb2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

(Dmesg error messages have been shown above)

Expected Results:  
Ipod should be able to be mounted without any error messages.

Emerge --info

Portage 2.1.10.11 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.12.2-r0, 3.0.6-gentoo x86_64)
=================================================================
System uname: Linux-3.0.6-gentoo-x86_64-AMD_Turion-tm-_64_X2-with-gentoo-2.0.3

Do you need all the information from emerge --info? It's pretty long.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2011-11-15 17:20:32 UTC
(In reply to comment #0)
> Do you need all the information from emerge --info? It's pretty long.

Yes.
Comment 2 bonesy 2011-11-16 11:33:34 UTC
OK, here's my emerge --info

Portage 2.1.10.11 (default/linux/amd64/10.0/desktop, gcc-4.5.3, glibc-2.12.2-r0, 3.0.6-gentoo x86_64)
=================================================================
System uname: Linux-3.0.6-gentoo-x86_64-AMD_Turion-tm-_64_X2-with-gentoo-2.0.3
Timestamp of tree: Sun, 13 Nov 2011 15:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:          4.1_p9
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.1.4-r3
dev-util/ccache:          2.4-r9
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.10.3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.39 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA skype-eula dlj-1.1 AdobeFlash-10 AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles fixpackages news nodoc parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="ftp://gentoo.cs.nctu.edu.tw/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://mirror.switch.ch/ftp/mirror/gentoo/ http://ftp.swin.edu.au/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cjk cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr dvdread emboss encode exif fam firefox flac fortran gdbm gdu gif gpm gtk iconv jpeg lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf png policykit ppds pppd qt3support readline sdl session spell sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype udev unicode usb vorbis x264 xcb xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 3 Göktürk Yüksek archtester gentoo-dev 2011-11-17 19:20:13 UTC
I cannot reproduce this with gentoo-sources-3.0.6. I formatted a flash disk using Disk Util in Mac OS Snow Leopard, booted into linux and mounted the filesystem successfully. I can also mount my local Mac OS partition. If you have a Mac OS installation, can you try this:

# diskutil info <disk>

where <disk> is possibly something like /dev/disk1s2.

Can you try mounting it without referring to fstab like this:
# mount -t hfsplus /dev/sdb2 /mnt/floopy

One more question: Is /dev/nano a udev rule?
Comment 4 bonesy 2011-11-19 09:47:33 UTC
1. Sorry, I don't have a MAC OS. The only time I used disk util was when I first bought the nano when I used it to disable journalling for the nano.

2. I've tried: mount -t hfsplus /dev/sdb2 /mnt/nano with the same result (After disabling my udev rule):

mount: wrong fs type, bad option, bad superblock on /dev/sdb2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

3. Yes, /dev/nano is a udev rule which reads as follows:

SUBSYSTEM=="block", ATTRS{serial}=="000A27001D03B23A" KERNEL=="sd?2", SYMLINK="nano", RUN+="/sbin/fsck.hfsplus -r /dev/nano"


4. Some users had the same problem like mine with the Ubuntu system. A bug was filed here:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/734883

Could it be the same problem?
Comment 5 Göktürk Yüksek archtester gentoo-dev 2011-12-30 03:21:25 UTC
The corresponding LKML discussion points to:
http://lkml.org/lkml/2011/5/25/248

This is fixed in 3.1:

commit 6596528e391ad978a6a120142cba97a1d7324cb6
Author: Seth Forshee <seth.forshee@canonical.com>
Date:   Mon Jul 18 08:06:23 2011 -0700

    hfsplus: ensure bio requests are not smaller than the hardware sectors
    
    Currently all bio requests are 512 bytes, which may fail for media
    whose physical sector size is larger than this. Ensure these
    requests are not smaller than the block device logical block size.
    
    BugLink: http://bugs.launchpad.net/bugs/734883
    Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
    Signed-off-by: Christoph Hellwig <hch@lst.de>

Can you try any of the >=sys-kernel/gentoo-sources-3.1.0 to confirm this?
Comment 6 bonesy 2012-01-02 05:29:15 UTC
Hello!

I've just compiled kernel 3.1.6-gentoo and would like to confirm that this problem has indeed been solved. I don't get anymore errors and am able to mount my ipod correct.

Thanks a lot for the follow-ups.