Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: FAT32 Driving Me Crazy

Hybrid View

  1. #1

    Default FAT32 Driving Me Crazy

    OK, so I have to copy a few gigs onto a USB 2.0 external drive, which happens (and has to for reasons omitted here) to be formated as a single 1TB FAT32 partition.

    While the drive mounts correctly and I can read all of its contents, my problems started with the 'cp' command terminating with a SEGV or freezing my entire machine (no keyboard or mouse working). Oh, and I'm on OpenSUSE 11, if that makes a difference.

    The error does not occur always at the same point, as I can reboot my machine and try again with the same files/directories and it eventually works.

    The first time my 'cp -R' command failed, I wanted to do a recursive diff, to figure out which files were successfully copied.

    Craziness number #1: Diff thinks most files do not match! The problem is that 'cp' seems to translate files to lower case while copying to a FAT32 partition. Diff does not know this, so says that the 'same' file only exits on the FAT32 and the Linux partition.

    Craziness number #2: Case sometimes preserved! Try 'mkdir V1' and it creates 'v1' (lower case). Try 'mkdir Volume1' and it creates 'Volume1' (mixed case preserved). Do 'mv Volume1 V1' and the directory becomes 'v1' (lower case).

    So, I'm hoping someone has any idea of how to fix or avoid some or all of these problems. Ideally, cp would copy files with the right case, mkdir would create dirs of the right case and diff would work as a consequence. If not, perhaps there are non-standard system tools that can help. BTW, I tried to copy with the Gnome file manager and it froze itself once and froze the machine the other time.

    Thanks in advance,

    - Itai

  2. #2
    Join Date
    Jun 2008
    Location
    West Yorkshire, UK
    Posts
    3,448

    Default Re: FAT32 Driving Me Crazy

    I cannot answer all your problems but I find that all FAT32 files with one case, whether upper or lower, are copied over as lower and those with both upper and lower are copied as they are. But I have no idea at what point in the copying process that decision is made.

  3. #3
    Join Date
    Jul 2008
    Location
    Ljubljana
    Posts
    522

    Default Re: FAT32 Driving Me Crazy

    You mean FAT32 actually supports partitions over 32GB? Good for you!
    http://stopsoftwarepatents.eu/
    Even if free software were ****, it should still get our preference over the non-free **** secreted by IT corporations.
    A free rephrasing of RMS

  4. #4
    Join Date
    Jun 2008
    Location
    The English Lake District. UK - GMT/BST
    Posts
    36,729
    Blog Entries
    20

    Default Re: FAT32 Driving Me Crazy

    FYI
    Limitations of the FAT32 File System in Windows XP

    The maximum disk size is approximately 8 terabytes
    You cannot format a volume larger than 32 gigabytes (GB) in size using the FAT32 file system during the Windows XP installation process. Windows XP can mount and support FAT32 volumes larger than 32 GB (subject to the other limits), but you cannot create a FAT32 volume larger than 32 GB by using the Format tool during Setup
    Are you doing this from a CLI, a terminal in X or from a GUI?

    What size are the files you are moving/copying?
    Leap 15.1_KDE
    My Articles Was I any help? If yes: Click the star below

  5. #5

    Default Re: FAT32 Driving Me Crazy

    The files I am copying vary in size from a few KB to a few hundred megs. There may be a very small number above 1GB but less than 2GB. There are roughly 40,000 files totaling a bit under 200GB.

    Initially I tried 'cp -R' on the command-line (tcsh) for the whole thing at once. In 4 tried this causes 2 SEGVs and 2 times my machine froze. When I tried to copy the whole thing via the Gnome file-browser instead, the system froze (no keyboard or mouse, so I could not even go to a console session).

    What ended up getting the job painfully done it to do 'cp -R' on smaller chunks (1-20GB). Still, I had to try multiple times as 1 time out of 2, 'cp' failed with a SEGV. When that happens the file-system became read-only, so I had to reboot for my second try.

  6. #6

    Default Re: FAT32 Driving Me Crazy

    Quote Originally Posted by JosipBroz View Post
    You mean FAT32 actually supports partitions over 32GB? Good for you!
    Yes. It was formatted on an Intel Mac and this also works (but you can't format it) on Windows XP.

  7. #7

    Default Re: FAT32 Driving Me Crazy

    Quote Originally Posted by john_hudson View Post
    I cannot answer all your problems but I find that all FAT32 files with one case, whether upper or lower, are copied over as lower and those with both upper and lower are copied as they are. But I have no idea at what point in the copying process that decision is made.
    Actually, I was copying TO FAT32. The case was preserved that way. What is driving me nuts the most is that file-operation (mkdir for example) does not create the file/directory in the requested case.

  8. #8
    Join Date
    Sep 2008
    Location
    Near Brussels, Belgium N50 50.394 E4 29.462
    Posts
    318

    Default Re: FAT32 Driving Me Crazy

    On Saturday 13 December 2008 23:16, idanan wrote:

    > OK, so I have to copy a few gigs onto a USB 2.0 external drive, which
    > happens (and has to for reasons omitted here) to be formated as a single
    > 1TB FAT32 partition.



    > While the drive mounts correctly and I can read all of its contents, my
    > problems started with the 'cp' command terminating with a SEGV or
    > freezing my entire machine (no keyboard or mouse working). Oh, and I'm
    > on OpenSUSE 11, if that makes a difference.

    No, it doesn't.
    First thing: I'd use rsync, if I where you. Better at handling such
    volumes, perhaps, but certainly much better to resume, if thing stop
    mid-may.

    > The error does not occur always at the same point, as I can reboot my
    > machine and try again with the same files/directories and it eventually
    > works.

    No ready-made solution for that. Can be anything from drive overheating,
    to file size, to clashing name cases, ....

    > The first time my 'cp -R' command failed, I wanted to do a recursive
    > diff, to figure out which files were successfully copied.

    No need, with rsync.

    > Craziness number #1: Diff thinks most files do not match! The problem
    > is that 'cp' seems to translate files to lower case while copying to a
    > FAT32 partition. Diff does not know this, so says that the 'same' file
    > only exits on the FAT32 and the Linux partition.
    > Craziness number #2: Case sometimes preserved! Try 'mkdir V1' and it
    > creates 'v1' (lower case). Try 'mkdir Volume1' and it creates 'Volume1'
    > (mixed case preserved). Do 'mv Volume1 V1' and the directory becomes
    > 'v1' (lower case).

    A simple ruile: FAT (32 or otherwise) has NO case. Anything resmbling case
    is merely display gloss. Don't ever rely on it for anything.

    > So, I'm hoping someone has any idea of how to fix or avoid some or all
    > of these problems. Ideally, cp would copy files with the right case,
    > mkdir would create dirs of the right case and diff would work as a
    > consequence. If not, perhaps there are non-standard system tools that
    > can help. BTW, I tried to copy with the Gnome file manager and it froze
    > itself once and froze the machine the other time.

    Use rsync, you'll still get a reasonably 'cased' set of dirs/files.

    FAT32 on a 1 TB partition is new to me, but I've done a 640GB one, so...

    With FAT32, you get a max file size of 4GB(-1 byte).

    Mind the depth of the paths: the specs seem to say you can get a fullpath
    length of up to 64KB. But any Windows machine I've worked with stops at
    255 chars. So, avoid crossing that limit, too.


    --
    There is an art, it says, or rather, a knack to flying.
    The knack lies in learning how to throw yourself at the ground and miss.
    Douglas Adams

  9. #9

    Default Re: FAT32 Driving Me Crazy

    As someone suggested, I tried rsync.... It does not help because of the case issue unfortunately (explanation below). It turns out even if rsync could work, it wouldn't solve all the problems either.

    So what I really need is a way to tell the (OpenSUSE) FAT32 driver to show files on a FAT32 device in their actual case. Anyone would know what option that would be and how to set it? That would be greatly appreciated

    Thanks in advance,

    - Itai

    PS: For the curious, here is why rsync doesn't work:
    - Say I sync 'SOMEPIC.JPG' and 'somedoc.txt' from Linux to FAT32 on Monday.
    - On Tuesday, I rync again WITHOUT anything having changed. rsync will try to sync SOMEPIC.JPG again because it cannot find it on the FAT32 drive, it only has 'somepic.jpg'.
    - As I undestand this, it is because the FAT32 driver enumerates "single case" files as lower-case! So all lower-case files have no problems but all upper-case files do. Mixed case is another case.

  10. #10
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: FAT32 Driving Me Crazy

    What is your ultimate goal in this? To transport files to another Linux system using a FAT32 external disk, or to backup your files?

    If to transport files, you'd be better off using tar to write archives on the disk, using split to keep the size of the chunks within limit. Something like:

    Code:
    tar zcf - * | (cd /media/DISK; split -b 1G)
    At the other end you can recombine with cat and extract with tar.

    If to backup your files, sorry, IMO backing up Linux files on FAT32 is an inherently bad idea.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •