Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question originally start at

Summary: My client has a PHP web application that was written and is served from a Windows environments. Unfortunately the past developer didn't obey naming conventions so file includes are of the form "/file/At/SomethingHere.php" when on disk the path is actually "/File/at/Somethinghere.php". I do not want to use Windows for development but the filesystems I use (ext2, ext3 ) are case sensitive.

I think the solution will be to create a filesystem like FAT 32 or similar, but I am somewhat clueless how to accomplish that. Starting to read up on DD and fdisk to figure out if those are the correct tools I will need.

update: I totally agree that it would be better to fix the real problem then use a potentially unstable fix. But the client isn't really receptive to the idea of paying me to make their code base linux friendly when it works fine for their Windows server.

share|improve this question
up vote 7 down vote accepted

I think you would be better off fixing the root cause rather than working around it. However, you can create a filesystem in a file using the following commands. This example creates a FAT32 filesystem. You can vary the format command and mount type parameter for other filesystem types.

# Create a 100 MB file named fatfs to store the filesystem
dd if=/dev/zero of=fatfs bs=1M count=100

# Format the file system as FAT32
mkdosfs -F 32 fatfs

# Mount the filesystem using the loop device
mkdir fatmount
mount -t vfat -o loop fatfs fatmount
share|improve this answer
+1 -- Otherwise, use fdisk on a disk and make the filesystem there. – Warner Apr 12 '10 at 21:39
Using the seek predicate of dd and a count of 0 will allow you to create a sparse file, which will only use up blocks in the underlying filesystem that are actually in use at the cost of having to allocate them as the inner filesystem is written to. – Ignacio Vazquez-Abrams Apr 12 '10 at 22:06
+1 for fixing the root cause, which will otherwise continue to cause problems in the future. – John Gardeniers Apr 13 '10 at 5:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.