Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 79579 - not able to mount vfat partition on amd64.
Summary: not able to mount vfat partition on amd64.
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 142667 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-26 07:58 UTC by Ewoud Canniere
Modified: 2006-11-10 23:52 UTC (History)
2 users (show)

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


Attachments
Strace log while mounting (st.log,5.61 KB, text/plain)
2005-01-31 06:23 UTC, Ewoud Canniere
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ewoud Canniere 2005-01-26 07:58:55 UTC
I'm not able to mount a vfat partition on my amd64. 
I get the error: mount: wrong fs type, bad option, bad superblock on /dev/hdc2,
       or too many mounted file systems
while trying mount -t vfat /dev/hd.. /mnt/..
I created a partition whit Partition Magic, windows, but it doesn't work.
When i try to do mkfs.vfat i get: mkfs.vfat 2.10 (22 Sep 2003)
mkfs.vfat: Attempting to create a too large file system



Reproducible: Always
Steps to Reproduce:
Mount an vfat partition on amd64

Actual Results:  
Still got the same errors

Expected Results:  
Mounting my partition so i can play some song ;)

Portage 2.0.51-r15 (default-linux/amd64/2004.3, gcc-3.4.3,
glibc-2.3.4.20040808-r1, 2.6.9-gentoo-r14 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r14 x86_64 AMD Athlon(tm) 64 Processor 3400+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Jan 26 2005, 14:49:30)]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r5
sys-devel/automake:  1.8.5-r1
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=k8 -pipe -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="http://ftp.belnet.be/packages/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.belnet.be/gentoo-portage"
USE="amd64 X acpi alsa arts berkdb bitmap-fonts crypt esd f77 fam font-server
fortran gdbm gif gpm gtk imagemagick imlib ipv6 java jp2 jpeg kde lzw lzw-tiff
mad mikmod motif multilib ncurses nls oggvorbis opengl oss pam perl png python
qt readline sdl slang ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts
usb userlocales xml2 xmms xpm xrandr xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS, PORTDIR_OVERLAY

I tried also other kernels but still it doesn't work.
Comment 1 Roland Bär 2005-01-26 08:40:30 UTC
Googled following tip "-F 32"
mkfs.vfat -F 32 /dev/hdc2
Comment 2 SpanKY gentoo-dev 2005-01-26 14:19:16 UTC
so, it looks like `mount` failed because it hadnt yet been formatted ...

mkfs.vfat documents the fact that it defaults to FAT12/FAT16 and that if you want
FAT32, you must explicitly run with -F 32 ...
Comment 3 Ewoud Canniere 2005-01-27 10:51:01 UTC
I'm not able to mount it, even when i did an mkfs.vfat - F 32.
He's giving me still the same error.

A friend of mine who has also an amd64, has also the same problem.

I really don't know what i could try else...
Comment 4 Roland Bär 2005-01-28 04:47:59 UTC
What't the output ot "fdisk /dev/hdc" ?
Comment 5 Roland Bär 2005-01-28 04:48:52 UTC
Sorry, output of "fdisk -l /dev/hdc" ...
Comment 6 Ewoud Canniere 2005-01-28 11:04:43 UTC
The output is of fdisk -l /dev/hdc is:

/dev/hdc2          204376      238216    17055864    c  W95 FAT32 (LBA).

But i cannot mount is cause i'll get this message then:

mount: wrong fs type, bad option, bad superblock on /dev/hdc2,
      or too many mounted file systems

Thanx for your help by the way :)
Comment 7 Jason Huebel (RETIRED) gentoo-dev 2005-01-28 15:18:53 UTC
Same issue here. I can't mount a USB key that's formatted VFAT.

Portage 2.0.51-r14 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r10 x86_64)
=================================================================
System uname: 2.6.9-gentoo-r10 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.8
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Aug  2 2004, 19:10:29)]
ccache version 2.3 [disabled]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r2, 1.6.3, 1.7.9, 1.4_p6, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r2
virtual/os-headers:  2.6.8.1-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-march=athlon64 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon64 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig cvs distlocks sandbox"
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/ http://gentoo.mirrors.pair.com/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://localhost/portage"
USE="amd64 X acpi alsa apache2 arts berkdb bitmap-fonts bzlib calendar cdr crypt cups dba dvd dvdr dvdread encode esd f77 fam flatfile font-server fortran gd gdbm gif gphoto2 gpm imagemagick imlib java jp2 jpeg kde ldap libwww lzw lzw-tiffmad mikmod motif moznocompose moznoirc moznomail mozsvg mpeg multilib mysql ncurses nls noreiserfs nptl nvidia oggvorbis opengl oss pam pdflib perl php png ppds python qt readline samba scanner sdl session slang sqlite ssl tcpd tidy tiff truetype truetype-fonts type1-fonts usb userlocales xml2 xmlrpc xmms xpm xrandr xv zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LDFLAGS, PORTDIR_OVERLAY
Comment 8 Roland Bär 2005-01-31 03:00:50 UTC
Do you have 
- vfat in /proc/filesystems ?
- Probably doublicated entries for the /dev/hdc2 in /etc/fstab 
Could you run mount:
strace -o st.log -v -f mount rest_of_ususal_:mount_command_line
and attach st.log
Comment 9 Ewoud Canniere 2005-01-31 04:49:09 UTC
Yes i have vfat in /proc/filesystems

...nodev   hugetlbfs
        msdos
        vfat
        iso9660
nodev   devfs
        ntfs
nodev   mqueue
...

@Roland bar: strace seems not to work, can you explain again please?
Thx

Comment 10 Roland Bär 2005-01-31 05:12:10 UTC
emerge strace
With strace using as a prefix to your "mount" command, you can trace/log all system calls.
-o st.log #Output to st.log (text file)
-v #verbose
-f #follows fok()'s
So if your regular mount command is:
 mount -t vfat /dev/hdc2 /mnt/hdc2
then issue:
 strace -o st.log -v -f  mount -t vfat /dev/hdc2 /mnt/hdc2
then we have in file st.log all system calls and hopeful seeing whats going wrong....

Otherwise:
- What's the complete command line for the mount command?
  (It properly takes some omitted parameters from /etc/fstab)
- Any entries regarding that partition in /etc/fstab?

Otherwise:
- You are sure, that it contains a valid vfat filesystem? 
- Or are we still stuck at the mkfs.vfat -F 32 /dev/hdc2?
- Can you boot from any live-cd or knoppix or from Windows and that system mounts there?

Comment 11 Ewoud Canniere 2005-01-31 06:23:42 UTC
Created attachment 50048 [details]
Strace log while mounting
Comment 12 Ewoud Canniere 2005-01-31 06:26:53 UTC
So Roland, i uploaded the st.log as attachement. 
I don't understand some of your further questions, but /dev/hdc2 isn't in my fstab. 
The mkfs.vfat -F 32 works fine too me, it gives no errors.

When i do your strace command i still get the same error, but i hope you can get a hint when you read the st.log.

Thanx
Comment 13 Roland Bär 2005-01-31 06:59:29 UTC
Just an idea, http://bugs.gentoo.org/show_bug.cgi?id=76203 
but doubt that this is the problem...

I have reviewed the source code, and when syscall mount() returns EINVAL, it 
makes an ioctl BLKGETSIZE at the device node. If the return value is 0 (as here),
then following code snippet:
             error(_(
                 "       (could this be the IDE device where you in fact use\n"
                 "       ide-scsi so that sr0 or sda or so is needed?)"));
So, probably /dev/sdb2 (something /dev/sd?2) would be the correct device node.

Jason, this could also be the the hint for you usb-device. Here it's also an (pseudo)SCSI device.....
Comment 14 Paul de Vrieze (RETIRED) gentoo-dev 2005-02-06 11:56:03 UTC
I experienced similar issues on a normal p3 computer (and a usb stick). This is an older kernel, so it probably is a userland issue.
Comment 15 Ewoud Canniere 2005-02-07 05:58:45 UTC
Guys i tryed really everything (i think) but still i cannot mount the fat partition. 
Does anyone has booked some progress, or have some other ideas?

Greetz

Comment 16 Roland Bär 2005-02-07 06:47:29 UTC
Have you tried to get a corresponding SCSI devices (Comment #13 )
fdisk -l /dev/sda 
fdisk -l /dev/sdb
fdisk -l /dev/sdc
If this doesn't show up anything, then:
dd if=/dev/hdc2 of=myhdc count=1 
and attach myhdc to this bug-report 
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2006-08-03 09:15:23 UTC
*** Bug 142667 has been marked as a duplicate of this bug. ***
Comment 18 SpanKY gentoo-dev 2006-11-10 23:52:57 UTC
old bug ... you might want to try updating e2fsprogs/glibc/strace/kernel/util-linux as the strace output looks screwed up:
1923  stat("/sbin/mount.vfat", 0x7fbfffee40) = -1 ENOENT (No such file or directory)
1923  mount("/dev/hdc2", "/mnt/windows/", "vfat", 0xc0ed0000, 0) = -1 EINVAL (Invalid argument)