Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Creating a FAT32 partition

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
24 posts • Page 1 of 1
Author
Message
Tsuki
n00b
n00b
Posts: 42
Joined: Thu May 27, 2004 7:40 pm
Location: Southampton, England
Contact:
Contact Tsuki
Website

Creating a FAT32 partition

  • Quote

Post by Tsuki » Wed Jun 09, 2004 12:47 pm

I've finally got fed up with having all my important files on an NTFS partition, I've decided to format it FAT32. (ext3 is tempting, but I figure that if I do need to use Windows again, FAT32 is the best choice.)

Using fdisk in Linux, I removed the old partition and created a new one (and rebooted, as it asked). The new partition is formatted as type "W95 FAT32 (LBA)". Here's the full output from fdisk:

Code: Select all

Disk /dev/hdc: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1               1       10011    80413326    c  W95 FAT32 (LBA)
So far so good. Now I'm trying to mount it - my fstab file contains the following line:

Code: Select all

/dev/hdc1               /mnt/documents  vfat            defaults,uid=tsuki,gid=users      0  0
When I "mount /mnt/documents" I get the following error:

Code: Select all

mount: wrong fs type, bad option, bad superblock on /dev/hdc1,
       or too many mounted file systems
...can anyone help a poor Linux newbie out here? What am I doing wrong? (There are only four mounted filesystems, I assume this isn't too many!)

P.S. Sorry if this is in the wrong forum!
Top
Admiral LSD
Guru
Guru
User avatar
Posts: 522
Joined: Fri Jun 27, 2003 3:53 am
Location: Northam, W.A., Australia

  • Quote

Post by Admiral LSD » Wed Jun 09, 2004 12:54 pm

Nothing, and I mean nothing, could ever tempt me to format my Windows drives as FAT32 again. Given a choice between data integrity and cross-OS compatibility I'll choose data integrity every time.
Wasurenaide...
...watashi ga iru koto o.
Itsudatte soba ni iru yo.

Registered Linux user #319839
Top
saccory
Apprentice
Apprentice
User avatar
Posts: 176
Joined: Wed Feb 18, 2004 10:08 am
Location: Göttingen, Germany

  • Quote

Post by saccory » Wed Jun 09, 2004 1:04 pm

You have to create a filesystem on the partition:

Code: Select all

mkfs.vfat -F 32 /dev/hdc1
This is comparable to the format command under DOS/Windows. Fdisk just divides your harddisk into partitions.
Warning: All data on /dev/hdc1 will be lost!
Top
molander
Tux's lil' helper
Tux's lil' helper
Posts: 110
Joined: Fri Jun 20, 2003 6:43 pm
Location: St. Louis

  • Quote

Post by molander » Wed Jun 09, 2004 4:25 pm

saccory wrote:You have to create a filesystem on the partition:

Code: Select all

mkfs.vfat -F 32 /dev/hdc1
This is comparable to the format command under DOS/Windows. Fdisk just divides your harddisk into partitions.
Warning: All data on /dev/hdc1 will be lost!
The "-F 32" is essential as otherwise it will use a 16bit fat size. I am suprised 32bit (Actually 28bit I believe) is not the default nowadays.

Who would actually be using a partition under 2 gig anyway? ;)
Top
Tsuki
n00b
n00b
Posts: 42
Joined: Thu May 27, 2004 7:40 pm
Location: Southampton, England
Contact:
Contact Tsuki
Website

  • Quote

Post by Tsuki » Wed Jun 09, 2004 4:34 pm

Ah, thanks! I'd assumed that setting the type in fdisk would have done that - but thinking about it, I should have remembered having to use mke2fs and mkswap during the install ^_^;
Top
Pythagoras1
Guru
Guru
User avatar
Posts: 352
Joined: Mon Jul 29, 2002 10:38 am
Location: Burgas, Bulgaria
Contact:
Contact Pythagoras1
Website

  • Quote

Post by Pythagoras1 » Thu Jun 17, 2004 2:11 pm

the only expirences i made with fat/vfat were that sometimes windows couldn't read files written by linux. as a result i wasn't able to use the exchange partition between both os. even floppy disks and usb mass storages suffer this bug/feature.
the windows error was something like Could not open. File not found. when i tried to open a file.
Is this a known issue, since this happens on ALL gentoo boxes i tried it on?
Top
yngwin
Retired Dev
Retired Dev
User avatar
Posts: 4572
Joined: Thu Dec 19, 2002 1:22 pm
Location: Suzhou, China

  • Quote

Post by yngwin » Thu Jun 17, 2004 3:39 pm

Pythagoras1 wrote:the only expirences i made with fat/vfat were that sometimes windows couldn't read files written by linux. ...
Is this a known issue, since this happens on ALL gentoo boxes i tried it on?
I've never had such a problem.
Top
molander
Tux's lil' helper
Tux's lil' helper
Posts: 110
Joined: Fri Jun 20, 2003 6:43 pm
Location: St. Louis

  • Quote

Post by molander » Thu Jun 17, 2004 4:01 pm

yngwin wrote:
Pythagoras1 wrote:the only expirences i made with fat/vfat were that sometimes windows couldn't read files written by linux. ...
Is this a known issue, since this happens on ALL gentoo boxes i tried it on?
I've never had such a problem.
Me neither. I perform those types of functions all day long. It is possible that when the original partion was formatted the binary was broken that performed it. I dont use any filesystem tools other than what is available in linux but hat could be another culprit (Norton, Windows itself, defrogger, scandisk).
Top
Cintra
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Apr 03, 2004 3:49 pm
Location: Norway

  • Quote

Post by Cintra » Thu Jun 17, 2004 6:14 pm

Hei all

Problem I'm having is with fat32 filenames being shortened to 8-bits.. have hunted everywhere for the reason, which is no doubt obvious to someone.
Its making use of this shared 'win partition' a lot less valuable to me, and recently made a hash of a 35MB SUN java download... :-(

regards
Top
molander
Tux's lil' helper
Tux's lil' helper
Posts: 110
Joined: Fri Jun 20, 2003 6:43 pm
Location: St. Louis

  • Quote

Post by molander » Thu Jun 17, 2004 7:05 pm

Cintra wrote:Hei all

Problem I'm having is with fat32 filenames being shortened to 8-bits.. have hunted everywhere for the reason, which is no doubt obvious to someone.
Its making use of this shared 'win partition' a lot less valuable to me, and recently made a hash of a 35MB SUN java download... :-(

regards
Could you do an "fdisk -l /dev/hda" (or whatever the HD is) and post it? I am curious what partition id you are using. I used to have this problem about 6 years ago too.
Top
Cintra
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Apr 03, 2004 3:49 pm
Location: Norway

  • Quote

Post by Cintra » Fri Jun 18, 2004 4:45 am

Hei molander

Thanks for answering.. here are all 3 disks, hdb as you see has the fat32 partition.

btw, the same thing happens with an usb flashdisk in fat16 (?) format.

bash-2.05b# fdisk -l /dev/hdb
Disk /dev/hdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 73 586341 83 Linux
/dev/hdb2 801 19457 149862352+ f W95 Ext'd (LBA)
/dev/hdb3 74 800 5839627+ 83 Linux
/dev/hdb5 801 862 497983+ 82 Linux swap
/dev/hdb6 863 866 32098+ 83 Linux
/dev/hdb7 867 928 497983+ 82 Linux swap
/dev/hdb8 929 1536 4883728+ 83 Linux
/dev/hdb9 1537 2022 3903763+ 83 Linux
/dev/hdb10 3104 14211 89224978+ b W95 FAT32
/dev/hdb11 14212 19457 42138463+ bc Unknown
Partition table entries are not in disk order

bash-2.05b# fdisk -l /dev/hda
Disk /dev/hda: 160.0 GB, 160041885696 bytes
16 heads, 63 sectors/track, 310101 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 94733 47745148+ 7 HPFS/NTFS
/dev/hda2 94765 138526 22055859 5 Extended
/dev/hda3 94733 94765 16065 83 Linux
/dev/hda5 94765 96837 1044193+ 82 Linux swap
/dev/hda6 96837 119149 11245468+ 83 Linux
/dev/hda7 119151 138526 9765472+ 83 Linux
Partition table entries are not in disk order

bash-2.05b# fdisk -l /dev/sda
Disk /dev/sda: 66 MB, 66224128 bytes
2 heads, 32 sectors/track, 2021 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2022 64672 4 FAT16 <32M

I have also checked XP files on dvd in udf/InCD format, and they have long filenames OK.

regards

ps. just mounted the ntfs disk and that shows long filenames ok
Top
Sastraxi
Apprentice
Apprentice
User avatar
Posts: 258
Joined: Tue Feb 25, 2003 9:23 pm

  • Quote

Post by Sastraxi » Fri Jun 18, 2004 5:01 am

Usually means it's loading the FAT16 and not the FAT32 driver (though I could be mistaken).
Top
Toris
n00b
n00b
Posts: 58
Joined: Mon Mar 22, 2004 3:14 pm

  • Quote

Post by Toris » Fri Jun 18, 2004 10:58 am

Yes, I had the same problem happen with me - either remove the DOS FAT support from your kernel, or mount the partition as 'vfat' instead of anything else, like 'auto'. As auto likes to mount it as DOS FAT instead of the more recent, long filename supporting, vfat.
Top
Cintra
Advocate
Advocate
User avatar
Posts: 2111
Joined: Sat Apr 03, 2004 3:49 pm
Location: Norway

  • Quote

Post by Cintra » Fri Jun 18, 2004 12:24 pm

Thank you very much Sastraxi and Toris

vfat instead of auto did the trick :-D

regards

Edit: it did the trick with the harddisk but not the flashdisk :-(
Top
Pythagoras1
Guru
Guru
User avatar
Posts: 352
Joined: Mon Jul 29, 2002 10:38 am
Location: Burgas, Bulgaria
Contact:
Contact Pythagoras1
Website

  • Quote

Post by Pythagoras1 » Sat Jun 19, 2004 4:18 pm

it didn't make the trick at me. some files copied on vfat can't be read by windows (2000). the whole directory i copied on this drive didn't work. Windows said "The directory may be deleted or moved" but it's still there and Linux can access it complainless. i'll copy the floppy image on bugzilla as soon as possible.
Top
Pythagoras1
Guru
Guru
User avatar
Posts: 352
Joined: Mon Jul 29, 2002 10:38 am
Location: Burgas, Bulgaria
Contact:
Contact Pythagoras1
Website

  • Quote

Post by Pythagoras1 » Sat Jun 19, 2004 5:00 pm

http://bugs.gentoo.org/show_bug.cgi?id=54428
Top
mlybarger
Guru
Guru
User avatar
Posts: 482
Joined: Wed Sep 04, 2002 1:03 am

  • Quote

Post by mlybarger » Mon Jun 21, 2004 11:49 am

this is an interesting thread.

over the weekend, i've been installing/setting up gentoo on my laptop. i shrunk the xp partition down, and created a fat32 shared drive using qtparted. i put some mp3's using XP on the new partition before using it under gentoo. i mounted the new partition (/dev/hda2) as vfat under gentoo. good to go. i copied some photo albums to the partition. i can see the files there under linux just fine. i boot to xp, and they don't even show up at all. no errors, nothing. all the files are under /mnt/hda2/albums (or under XP at E:). even DIR /A under the XP cmd prompt doesn't show the folder there. i've never really encountered this before. i've used lots of USB Mass storage devices, copying files from linux to be later used ok by windows boxes (though mostly ME).

i have a separate issue on this laptop with the USB Mass storage devices. i haven't been able to mount an of them. they're saying too many filesystems open, or it says /dev/stick is not a block device. i'm using udev to handle the nice dev names for me. i stick the device in to the usb, and the /dev/stick shows up, but some reason it's not a block device. odd.

btw, i'm using the gentoo-dev-sources from a 2004.1 networkless install, which ever version that is (2.6.4?)

[edit] after coming back to the machine later, it seems that Xp can see the files now that gentoo put onto the vfat shared partition. strange.
Top
Kevin72594
Guru
Guru
User avatar
Posts: 307
Joined: Tue Dec 30, 2003 8:17 am
Contact:
Contact Kevin72594
Website

  • Quote

Post by Kevin72594 » Wed Jun 23, 2004 2:35 am

I don't seem to have the mkfs.vfat command. Where would I go about getting it? Thanks

EDIT: I just found it, it's in dosfstools. I love how I find it right after I post after about a half hour of searching :oops: thanks anyways
Top
srs5694
Guru
Guru
Posts: 434
Joined: Mon Mar 08, 2004 5:08 pm
Location: Woonsocket, RI
Contact:
Contact srs5694
Website

  • Quote

Post by srs5694 » Wed Jun 23, 2004 2:43 pm

Pythagoras1 wrote:the only expirences i made with fat/vfat were that sometimes windows couldn't read files written by linux.
I've experienced that in the past, but only with hard disk partitions that were created and written to first by Linux. If the partition is created in Windows and/or if Windows is the first to write files to the partition, I've had no such problems. I've also never had this problem with floppies. OTOH, I've not investigated this problem in depth, and my last experience with it was literally years ago.

On another matter, there seems to be some confusion in some posts in this thread about certain terminology. FAT varies in two orthogonal ways: FAT size (12-, 16-, or 32-bit, aka FAT-12, FAT-16, or FAT-32; note that in this context, "FAT" refers to a specific critical data structure in the FAT filesystem) and long filename (LFN) support (short, aka "8.3," filenames; VFAT long filenames; and UMSDOS long filenames). Linux's drivers auto-detect the FAT size; there's no such thing as separate FAT-32 vs. FAT-16 drivers. There is a mount option to force the driver to use a particular FAT size, though. Where the Linux does use separate drivers is in the long filename arena. The "msdos" filesystem type code implements 8.3 filenames, the "vfat" driver implements VFAT long filenames, and the "umsdos" driver implements UMSDOS long filenames. (UMSDOS is a somewhat rarely-used way to store Linux long filenames, file permissions, file ownership, and other features on a FAT filesystem). Note that these two issues (FAT size and LFN support) are entirely independent; you can have 12-bit FATs with VFAT (as in a floppy disk), 32-bit FATs without LFNs (rare, but do-able), or any other combination. Also, the LFN support is handled at mount time by the OS support. DOS can read a VFAT or UMSDOS disk just fine, but it'll only see 8.3 filenames. Linux or Windows can take a DOS floppy and mount it using LFN options, in which case existing filenames won't be changed but LFN files can be added to the disk.
Top
Pythagoras1
Guru
Guru
User avatar
Posts: 352
Joined: Mon Jul 29, 2002 10:38 am
Location: Burgas, Bulgaria
Contact:
Contact Pythagoras1
Website

  • Quote

Post by Pythagoras1 » Thu Jun 24, 2004 9:40 am

well.... i created the file system with the windows 2000 management console and i'm shure that i wrote files on it with windows at first.
Top
Pythagoras1
Guru
Guru
User avatar
Posts: 352
Joined: Mon Jul 29, 2002 10:38 am
Location: Burgas, Bulgaria
Contact:
Contact Pythagoras1
Website

  • Quote

Post by Pythagoras1 » Thu Jun 24, 2004 10:09 am

http://bugme.osdl.org/show_bug.cgi?id=2946
Top
Corona688
Veteran
Veteran
User avatar
Posts: 1204
Joined: Sat Jan 10, 2004 7:51 pm

  • Quote

Post by Corona688 » Thu Jun 24, 2004 6:34 pm

Cintra wrote:Thank you very much Sastraxi and Toris

vfat instead of auto did the trick :-D

regards

Edit: it did the trick with the harddisk but not the flashdisk :-(
I had the same problem with my flashdisk. The filesystem itself may be limited to short filenames, not just the linux filesystem driver. I solved it by formatting my flash disk with 'mkfs.vfat' instead of 'mkfs.msdos', I didn't think there was a difference until the msdos one started butchering long filenames.
Petition for Better 64-bit ATI Drivers - Sign Here
http://www.petitiononline.com/atipet/petition.html
Top
tscolari
l33t
l33t
User avatar
Posts: 602
Joined: Sun May 02, 2004 10:43 pm
Location: curitiba - pr - Brazil
Contact:
Contact tscolari
Website

  • Quote

Post by tscolari » Fri Sep 17, 2004 4:48 am

Just ressurecting the topic. But i got a problem here...

Im reinstalling all my gentoo to my new HD and im going to make a fat32 partition to use in the both OS.
But, i dont have that mkfs.vfat file...
i tryed this also:
mkfs -t vfat -F 32 /dev/hdb6
but returned a error saying that it could not find the mkfs.vfat file...

what should i do to have this file here?
------------------------------------
Tiago Scolari
Top
codergeek42
Bodhisattva
Bodhisattva
Posts: 5142
Joined: Mon Apr 05, 2004 4:44 am
Location: Anaheim, CA (USA)
Contact:
Contact codergeek42
Website

  • Quote

Post by codergeek42 » Fri Sep 17, 2004 5:43 am

tscolari wrote:Just ressurecting the topic. But i got a problem here...

Im reinstalling all my gentoo to my new HD and im going to make a fat32 partition to use in the both OS.
But, i dont have that mkfs.vfat file...
i tryed this also:
mkfs -t vfat -F 32 /dev/hdb6
but returned a error saying that it could not find the mkfs.vfat file...

what should i do to have this file here?
You need to emerge sys-fs/dosfstools.
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF
Top
Post Reply

24 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic