Jump to content

FAT 32 for USB key. Why?


viking777
 Share

Recommended Posts

Yesterday I decided to transfer my Clonezilla/SystemRescue CD onto a bootable USB key. Their website has a tutorial for that purpose and I simply had to adapt it to my circumstances and the result was successful.

 

One thing struck me as strange about it though, the tutorial was very insistent on this so I followed their advice, but they didn't say why this should be, so I wondered if anyone here can enlighten me. Here is an extract from the tutorial:

 

The only thing that's important is that your USB disk must contain a VFAT (Windows 98 or DOS) file system.

 

These instructions were Linux specific, not windows instructions that I adapted.

 

I understand the reason for not having a journalling filesystem on a USB key like ext3, but why not ext2? In fact this morning, flushed with my success of yesterday, I decided to transfer Puppy Linux onto USB key as well (which was also successful btw). Their installer specifically recommended ext2 as opposed to any FAT file system, so why would the Clonezilla people advise otherwise?

Edited by viking777
Link to comment
Share on other sites

If I think you're doing what I think you're doing - is you're getting a CD image, that you're putting on a USB stick, and then using syslinux to enable the USB stick to boot with the extracted ISO on the USB stick. These all tend to use FAT32, purely because of that's how it is rather than booting a system that would require a Linux kernel to give you access to the ext2 partition. At least that's why I think it's like this.

 

Also, check out unetbootin - it's a gui shell script that you can run, that tends to do it all perfect. When I tried the sysrescd notes on how to do this, I could never get the USB stick to boot. Using unetbootin, and various Linux ISO's it worked every single time.

Link to comment
Share on other sites

Using a journal in a sensitive medium like a pendrive is equivalent to asking for trouble. The life expectancy of a pendrive is way lower than a harddisk, and using a journal in it will reduce it even further. Of course you can still format it as ntfs, ext3/4, reiserfs or whatever, but this will likely mean it's lifespan will be shortened.

But yes, ext2 should be an equally good solution. The only con would be that it would be unreadable under windoze without an ex2fs driver installed. On the other hand, I can't see any huge advantage of ext2 over vfat, excluding the maximum filesize.

Link to comment
Share on other sites

Ian

 

Yes you are right I did it via the syslinux route. I'll have a look at that program you mentioned.

 

EDIT: Just did have a look at it, that is fascinating, I have got to have a go with that. I think I will use an old machine though in case I screw up!

 

Scarecrow.

 

You are right I suppose, if it were on ext2 you would not be able to access it from a windows machine, but then again it is a bootable rescue medium so the implication is that if it is running then windows (or linux for that matter) won't be, therefore you won't be needing to access it.

 

It is just that the thought of running Debian (that is what clonezilla is based on) on a FAT32 disk makes me shudder, in fact I am surprised it actually works, but it obviously does, I have done 4 images and 1 restore with it already, all perfect and certainly no slower than running from CD.

Edited by viking777
Link to comment
Share on other sites

If I may intrude on this thread, I have a related question.

I've read several times in the past two years (but can't remember where), that different Linux filesystems were being designed especially for USB sticks, with emphasis on wear-leveling and performance. Why then are we still stuck with fat or ext2 nowadays?

 

Yves.

Link to comment
Share on other sites

Which ones? Can you possibly elaborate?

On ext3/ext4 you can disable journalling, but then you effectively have ext2, with (probably- have not made any tests) some extra features. The other LInux filesystems I'm aware of use journalling. Maybe some exotic one?

But anyway, since all these imaging solutions do span images larger than 4GB if you wish so, I see no evil in using vfat on pendrives. Probably there will be an issue in the future, when pendrives larger than 32 GB will be widely available (vfat renders a lot of space as slack in any partition exceeding 30 GB), but ATM there's not much to complain about.

Link to comment
Share on other sites

Although this is not one of the articles I previously read, this one summarizes them all rather well:

http://www.ibm.com/developerworks/linux/li...sh-filesystems/

 

The filesystem I had heard about is “LogFSâ€, but “YAFFS2†seems interesting too, and “UbiFS†may as well.

 

Yves.

Link to comment
Share on other sites

With modern USB sticks, CF or SD cards, you don't need to worry about specific wear leveling filesystems, as this is done already in the firmware/controller chip of the stick or card.

 

You still should use ext2 (ext3 without log is ext2) or FAT(32) though, as less writes are always better on flash media.

Edited by tux99
Link to comment
Share on other sites

I see. So if I understand correctly, the best filesystem is the one with the least written bits for a given amount of data; all else is taken care of in hardware. Does anyone know if there is any way to compare ext2 and vfat in light of this, or if maybe the difference is bound to be negligible?

 

Yves.

Link to comment
Share on other sites

I see. So if I understand correctly, the best filesystem is the one with the least written bits for a given amount of data; all else is taken care of in hardware. Does anyone know if there is any way to compare ext2 and vfat in light of this, or if maybe the difference is bound to be negligible?

 

Yves.

 

I would think the difference is negligible, but with ext2 make sure you mount it with 'noatime' and 'nodiratime' options to avoid unnecessary writes!

Link to comment
Share on other sites

The most important difference is that FAT16 can hold files up to 2 GB, and FAT32 up to 4 GB. More than that, symbolic links do not work in either of them- if you want to use them, you are stuk with ext2.

But, in the case of a backup medium, none of the above is of any importance- I would go with FAT(32), for the sake of windoze compliance.

Link to comment
Share on other sites

The most important difference is that FAT16 can hold files up to 2 GB, and FAT32 up to 4 GB.

 

FAT16 volume size limit is 4GB and FAT32 is at least 2TB, did you maybe mean single file size (which is max 4GB on both)?

 

See here:

http://en.wikipedia.org/wiki/File_Allocation_Table

Edited by tux99
Link to comment
Share on other sites

FAT16 volume size limit is 4GB and FAT32 is at least 2TB, did you maybe mean single file size (which is max 4GB on both)?

 

See here:

http://en.wikipedia.org/wiki/File_Allocation_Table

 

These are the partition size limits, not the file size ones. The file size is limited as I said above. Maybe I did not express myself well, but I did mean sizes for a SINGLE file- not the whole partition.

More than that, just try to use any FAT32 partition larger than 30 GB... you will be very unpleasantly surprised. After all, Microsoft had a good reason to not let any of it's OS'es up to date to format any partition larger than 32 GB as FAT32.

Link to comment
Share on other sites

Microsoft MS-DOS versions 4.0 and later allow FDISK to partition hard disks up to 4 gigabytes (GB) in size. However, the MS-DOS file allocation table (FAT) file system can support only 2 GB per partition. Because of this fact, a hard disk between 2 and 4 GB in size must be broken down into multiple partitions, each of which does not exceed 2 GB.

 

This from Microsoft Help and Support.

 

Which effectively means that Fat 16 partition size limit is 2Gb without partitioning, not 4Gb.

Edited by viking777
Link to comment
Share on other sites

For MS-DOS, but Windows 2000 and higher don't use DOS (even Windows NT also), so this limit may not apply.

 

Normally, FAT16 was good enough for 2GB partitions and no higher, FAT32 if you had higher than this.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...