Abhishek Mahanty's WeblogSunny Days... |
|
Saturday Mar 24, 2007
FAT32 filenames in Linux
I have a multi-boot machine with Solaris, Linux & Windows installed. So my hard disk currently has all different sorts of filesystems.
root@lnx(~)# fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 1912 15358108+ 7 HPFS/NTFS
/dev/sda2 4086 8682 36925402+ f W95 Ext'd (LBA)
/dev/sda3 1913 4080 17414460 bf Solaris
/dev/sda4 * 8683 9729 8410027+ 83 Linux
/dev/sda5 4086 6635 20482843+ b W95 FAT32
/dev/sda6 6636 8420 14337981 b W95 FAT32
/dev/sda7 8421 8682 2104483+ 82 Linux swap / Solaris
When using Linux, I've been struggling to work with any NetBeans web application projects that were stored in my FAT32 partitions. Upon opening a web project, NetBeans would complain that WEB-INF folder is missing.
After a quick
root@lnx(~)# vi /etc/fstab
. . .
/dev/sda5 /mnt/win_d/ vfat users,gid=users,umask=0002,utf8=true 0 0
/dev/sda6 /mnt/win_e/ vfat users,gid=users,umask=0002,utf8=true 0 0
. . .
So I remounted the FAT32 partitions with the option
root@lnx(~)# umount /mnt/win_d/
root@lnx(~)# umount /mnt/win_e/
root@lnx(~)# vi /etc/fstab
. . .
/dev/sda5 /mnt/win_d/ vfat users,gid=users,umask=0002,utf8=true,shortname=mixed 0 0
/dev/sda6 /mnt/win_e/ vfat users,gid=users,umask=0002,utf8=true,shortname=mixed 0 0
. . .
root@lnx(~)# mount -a
The WEB-INF folder now appears as it is (i.e. in uppercase).
The default behaviour of a FAT32 mount uses shortname=lower, so any file/folder with a shortname i.e. less than 8 chars (excluding file extension) would appear in lowercase.
Posted at 12:00AM Mar 24, 2007 by Abhishek Mahanty in Technical | Comments[1] |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Disclaimer: This is a personal weblog, I do not speak for my employer, Sun Microsystems.
Posted by Anonymous on May 21, 2007 at 03:26 PM IST #