LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices



Reply
 
Search this Thread
Old 02-14-2009, 02:46 AM   #1
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Rep: Reputation: 30
Mounting fat32 in debian


I've tried everything I could find to replace and write in my fstab, and this is what I get when I mount one of the fat32

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

Also, when I go to see what's in the other fat32, when I do an ls, I see nothing.

Any ideas?
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 02-14-2009, 03:04 AM   #2
jdkaye
Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,024

Rep: Reputation: Disabled
Quote:
Originally Posted by SuperDude123 View Post
I've tried everything I could find to replace and write in my fstab, and this is what I get when I mount one of the fat32

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

Also, when I go to see what's in the other fat32, when I do an ls, I see nothing.

Any ideas?
It might be easier to first mount the fat32 drive manually using the mount command. If this works then you can worry about the fstab entry.
Code:
sudo mount -t vfat /dev/hdb1 /mnt
I've used /mnt as the mount point but you can change that if you prefer to mount it somewhere else. If that works then it should be a piece of cake to put the correct entry in your fstab file.
Cheers,
jdk

Last edited by jdkaye; 02-14-2009 at 03:16 AM.
 
Old 02-16-2009, 09:54 AM   #3
tothzp
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Rep: Reputation: 17
First of all, do you have FAT support in your kernel ? Try:
zcat /proc/config.gz | grep -i fat
You should see something like
Code:
...
# DOS/FAT/NT Filesystems
CONFIG_FAT_FS=m
CONFIG_VFAT_FS=m
...
I use the automounter to mount e.g. pendrives with FAT.
After installing the autofs package, put this into your /etc/auto.master:

Code:
/mnt/auto	/etc/auto.mnt	--timeout=10
and this to your /etc/auto.mnt:
Code:
fat	-fstype=vfat,rw	:/dev/hdb1
mkdir -p /mnt/auto, then restart autofs, and you should be able to access the partition under /mnt/auto/fat.

You also may run mmls /dev/hdb to see partition data.
(it's part of the sleuthkit package)

Last edited by tothzp; 02-16-2009 at 09:59 AM.
 
Old 02-16-2009, 10:40 AM   #4
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
When I do zcat /proc/config.gz | grep -i fat, I get

zcat: /proc/config.gz: No such file or directory

Could it be a different file in Debian?
 
Old 02-16-2009, 10:48 AM   #5
jdkaye
Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,024

Rep: Reputation: Disabled
Quote:
Originally Posted by SuperDude123 View Post
When I do zcat /proc/config.gz | grep -i fat, I get

zcat: /proc/config.gz: No such file or directory

Could it be a different file in Debian?
I don't have it either (in Debian) but I can and have mounted FAT devices.
cheers,
jdk
 
Old 02-17-2009, 04:45 AM   #6
tothzp
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Rep: Reputation: 17
/proc/config.gz is just a handy thing to build into the kernel, thereby it's easy to get the config of the running kernel.
It just stores your .config file in the kernel image.

It can be configured under General / Kernel .config support in the kernel configuration menus.

Nevertheless, that is not necessary for the FAT support.

If your fat support is built as a kernel module, then you might find some clues on it by typing modinfo vfat.
If it's built into the kernel monolithically, then this is no way to go.

As a last resort, you can build a kernel on your own, then configure the .config support (as above) and the VFAT support under Filesystems / DOS/FAT/NT Filesystems.
 
Old 02-17-2009, 01:43 PM   #7
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
When I did

sudo modinfo vfat

I got:

filename: /lib/modules/2.6.18-6-486/kernel/fs/vfat/vfat.ko
license: GPL
description: VFAT filesystem support
author: Gordon Chaffee
vermagic: 2.6.18-6-486 mod_unload 486 REGPARM gcc-4.1
depends: fat

So how do I get the system to mount the hard drive automatically? Can automounter be installed on Debian?
 
Old 02-18-2009, 04:54 AM   #8
tothzp
LQ Newbie
 
Registered: Apr 2006
Posts: 26

Rep: Reputation: 17
Well, it appears that your kernel supports VFAT.

Quote:
Originally Posted by SuperDude123 View Post

So how do I get the system to mount the hard drive automatically? Can automounter be installed on Debian?
It's in the package autofs.
Install with apt-get install autofs.

Then write the config files as I wrote above.
If you modify auto.master, you have to restart the automounter:

cd /etc/init.d
./autofs restart
 
2 members found this post helpful.
Old 08-14-2014, 08:05 AM   #9
therealola
LQ Newbie
 
Registered: Aug 2014
Posts: 1

Rep: Reputation: Disabled
Write something like this in the fstab:
/dev/sda8 /media/myfat vfat user,auto 0 0

Or you can do:
UUID=abcd-1234 /media/myfat vfat user,auto 0 0
You need to replace abcd-1234 with the UUID of the partition to be mounted. You can find this by running the command blkid.
 
Old 08-14-2014, 09:02 AM   #10
Randicus Draco Albus
Senior Member
 
Registered: May 2011
Location: Wallowing in a pit of despair.
Distribution: OpenBSD
Posts: 1,398
Blog Entries: 4

Rep: Reputation: 424Reputation: 424Reputation: 424Reputation: 424Reputation: 424
I am sure the OP is still waiting for an solution five years later.
 
  


Reply

Tags
autofs, mount, vfat


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting FAT32 JamesNewbie Linux - Newbie 19 01-21-2006 11:13 AM
Mounting FAT32 Proxy Hoar Linux - Newbie 7 11-22-2004 08:38 PM
mounting fat32 wellblue88 Linux - Hardware 3 05-28-2004 01:05 PM
mounting fat32 snow Linux - Software 25 09-07-2003 02:37 PM
mounting FAT32? FaLLeNSouL Linux - Newbie 2 03-28-2003 05:20 AM


All times are GMT -5. The time now is 11:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration