Questions tagged [fat]

File Allocation Table (FAT) is a computer file system architecture now widely used on many computer systems and most memory cards, such as those used with digital cameras.

Filter by
Sorted by
Tagged with
44
votes
7answers
54k views

How to change the volume name of a FAT32 filesystem?

I know I can set the volume name when I format the partition with the -n option of mkfs.vfat. But how to just change the name without formatting? I especially want to be able to use lower and ...
37
votes
3answers
4k views

Why is the “ls” command showing permissions of files in a FAT32 partition?

I believe that the FAT32 file system does not support file permissions, however when I do ls -l on a FAT32 partition, ls -l shows that the files have permissions: -rw-r--r-- 1 john john 11 Mar 20 15:...
21
votes
1answer
716 views

dpkg replacing files on a FAT filesystem

When you upgrade or reinstall a package with dpkg (and ultimately anything that uses it, like apt-get etc) it backs up the existing files by creating a hard link to the file before replacing it. That ...
15
votes
1answer
1k views

create a corrupted FAT file system

I have an application which will search for a corrupted FAT file system and repair it. For testing the application I will need a corrupted file system. What is a good and reproducible way for ...
10
votes
2answers
6k views

A clever way to defragment a FAT filesystem?

What is the best way to defragment a FAT filesystem when running Linux/Unix (on usb stick for instance)? Copy all content elsewhere, format, copy back again? Use FreeDOS defrag utility, in a KVM ...
8
votes
2answers
2k views

Change file creation time on a FAT filesystem

I need a way to change the creation time of a file on a mounted FAT32 volume. I have to do that because my MP3 player will only read files sorted by this creation time. If I can find a way to set the ...
8
votes
2answers
4k views

Rsyncing files with special characters to USB FAT32

I want to copy a large number of files to a USB drive that is formatted FAT32 (and cannot be formatted anything else, unfortunately). Many of these files have names with characters such as : and ? ...
6
votes
3answers
9k views

Mount USB (FAT) in Gentoo

Can somebody show me how to make Gentoo mount my USB? This is what I got when trying mount /dev/sdb1 /mnt: mount: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage ...
6
votes
1answer
403 views

Can I install GNU/Linux on a FAT drive?

Out of curiosity, is this possible nowadays? I remember some old Slackware versions did support FAT root partition but I am not sure if this is possible with modern kernels and if there are any ...
5
votes
1answer
73 views

Renaming a file while it is being written

I'm wondering if this is considered safe. I know the file handles work just fine as long as a link remains, and I know the identifier is the inode rather than the name, but I am not sure how it works ...
5
votes
1answer
536 views

Why doesn't the Linux vfat driver allow certain characters?

The Linux vfat driver seems to disallow certain characters in vfat long file names: ?<>\:*|". I understand that Windows doesn't support these characters, but Wikipedia seems to indicate that the ...
4
votes
1answer
654 views

Why does Unix set the executable flag for FAT file systems? [closed]

I've noticed that when I mount a FAT filesystem on Linux, all of the files have their executable permissions set. Why is this? There's almost no chance that you can or want to directly execute any ...
4
votes
1answer
2k views

Where can I see the last mount time?

E.g: I need to know when was the last time a pendrive was mounted. Where could I see that? The pendrive has e.g.: FAT32, EXT3 filesystem.
4
votes
2answers
134 views

Restore a USB flash drive in a standard state for use in Linux, Windows, etc

Since this question, I'm using: dd if=/dev/zero of=/dev/sdb bs=1M # wipe the disk fdisk /dev/sdb <<< $'n\np\n\n\n\nt\nb\np\nw\n' # create a partition mkfs.fat /dev/sdb1 ...
3
votes
1answer
3k views

Why does Linux mark FAT as 'dirty' simply due to mounting it?

If I put a USB memory stick (FAT formatted) into a Windows PC, then unplug it without "ejecting" it, then put it in again, Windows is okay with that, without giving any warning about it "possibly ...
3
votes
2answers
23k views

Linux, fat32 and etc/fstab

I mounted a FAT32 drive onto my Linux computer using the following terminal command: > sudo mount /dev/sdb1 /media/exampleFolderName -o dmask=000, fmask=111 I did this so I could share / edit the ...
3
votes
1answer
11k views

mkfsdos: define the size of FAT16|32 file system on USB pendrive in Linux

Question: How does one define the size of a FAT16 / FAT 32 file system with mkdosfs in Linux I want to create a, say 2 GB FAT16|32 filesystem on a partition in the size of 8 GB or more? This is how ...
3
votes
1answer
279 views

Writing to exfat doesn't persist between mounts?

I... Bought a microSD card to store music on, for my Samsung Galaxy S4. Inserted it into the S4 and formatted the card (exFat). Installed fuse-exfat and exfat-utils and inserted the card into my ...
3
votes
2answers
247 views

failed to mount fat filesystem: codepage cp437 not found

I am experiencing the same problem described here: Fail to boot: Codepage not found. My error is: FAT-fs (sdx1): codepage cp437 not found My fstab mount command for the device is: LABEL=ESP /boot ...
3
votes
3answers
771 views

openSUSE Live USB with windows-accessible FAT32 partition

I have a 64gb flash drive. I want to set it up so I can use it for windows-accessible Fat32 data storage while also being able to boot to it using a large (20-30gb) persistent openSUSE live USB ...
2
votes
1answer
157 views

renaming a fat16 volume

What's the easiest way to rename (change the volume label of) a fat16 volume (e.g. on a USB drive) from linux? It seems like mlabel from the mtools package is meant to do this, but the documentation ...
2
votes
1answer
587 views

FAT Mountoption allow_utime explained

I trying to figure out what the following Mountoption for (v)FAT exactly does (in Linux): allow_utime=### -- This option controls the permission check of mtime/atime. 20 - If ...
2
votes
1answer
297 views

filefrag fibmap returning wrong physical offset for FAT

I am trying to get the map of empty space on any partition in a filesystem-agnostic way. To do this I create a file that uses all of the empty space, then use the 'filefrag -e' command (e2fsprogs v1....
2
votes
0answers
54 views

Completely defragmenting a FAT32 filesystem [duplicate]

Is there any Linux tool that allows defragmenting a FAT32 filesystem not on a best effort basis, but so that all files are guaranteed to be stored contiguously with no exceptions? Possibly writing the ...
2
votes
0answers
623 views

Corrupt FAT32 cluster chain after resizing with parted

I have a 500GB external USB drive formatted with a single FAT32 partition. I wanted a partition that would support normal Linux filesystem permissions, so I shrank the existing partition using parted: ...
2
votes
1answer
212 views

Sizing a disk image/filesystem to hold exactly a certain set of files with near-zero free space

I need to construct, in code suitable for scripting/make/automation, a disk image (two partitions, a FAT filesystem and an ext4 filesystem, for UEFI/Syslinux USB Linux booting [OS installer], which ...
2
votes
0answers
275 views

Disable atime and diratime on USB flash drive with udev

I have a USB flash drive which is used for doing backups. I've noticed that when I do the backups, the access times for files and folders are getting updated. Is there any way I can disable the ...
2
votes
0answers
496 views

VFAT FS Sync/Flush Behaviour

In order to increase the life of my VFAT flash drives, I have them set to mount as async. One of these drives sometimes deals with large data changes, and as a result, the writes that occur on umount ...
1
vote
2answers
676 views

Copying to USB drive modifies filename

I have a bash script which copies data across to a USB stick. It works. The data is copied across fine, but the filenames are always changed. They are the same as they were before, but any longer ...
1
vote
1answer
43 views

How FAT16 worked on a 16 GB thumbdrive flawlessly?

So, I created a FAT16 partition in the following way I plugged in my 16 GB thumbdrive. dd if=/dev/zero of=/dev/sdX count=1 Opened up cfdisk for simplicity. Selected dos label type Created new ...
1
vote
2answers
8k views

Reserved characters in file names

I was under the impression that the only character not allowed in file names was /, but I don't seem to be able to create a file whose name contains characters such as *, \, ", :, |, < or > ...
1
vote
2answers
6k views

No space left on device / No Inodes free OR used / Double mounting

For about a day now I can only create/cp/mv (through terminal or various GUI programs) files on my FAT16 formatted USB stick, of about a few bytes. Doing so with larger files reports cannot create ...
1
vote
1answer
163 views

Why don't FAT filesystems support links? [closed]

FAT filesystems represent files via linked lists of clusters (linked file allocation). They have a region on disk for one or more tables (File Allocation Table) which have as many entries as ...
1
vote
1answer
78 views

How does unix / linux format an SD card?

How does a Linux OS format an SD card and magically fix everything? I have an STM32 running FreeRTOS and FAT-FS. When I have a corrupted SD card and FAT-FS can't do anything about it, I format the ...
1
vote
2answers
699 views

/etc/fstab/ rw option is being ignored for mircosd card partition in ArchLinux

I have ArchLiinux Linux comp001 3.18.7-1-ARCH #1 PREEMPT Wed Feb 11 11:38:34 MST 2015 armv6l GNU/Linux for Arm installed on rPi and here is my /etc/fstab file: # # /etc/fstab: static file system ...
1
vote
1answer
973 views

Repair or recover seemingly damaged partition on USB external disk

A friend brought this WD My Passport external harddrive to me to see if I could recover her files. The device is "not working" after a power outage. As per her testimony, when the device is connected ...
1
vote
1answer
236 views

Fedora: cp: Invalid argument while coping a file named with Chinese characters to a vfat filesystem

I want to use cp to copy a file named with Chinese characters to my fat32 usb stick. This is done using a script, so using nautilus is not a solution for me. I do not want to rename the files, too. I ...
1
vote
1answer
4k views

How to finally mount FAT16 USB flash drive

I have 4GB USB flash drive stick plugged into laptop on debian 8.1. It contains one bootable partition 2GB created and formatted as FAT16 in Windows. What only I did try everything didn't. Maybe I am ...
1
vote
0answers
23 views

Cannot mount usb stick after putting a Yosemite bootable image on it

I was trying to put a bootable image on a USB stick so I could reinstall Mac OS Yosemite on my Macbook Pro (I am doing this all in in Linux so that's why this question is here). Once I finally ...
1
vote
0answers
32 views

How do I create an img image just big enough to hold one specific file?

I need to create an img disk image (using mkfs.fat) that will contain only one file. I know I need to do this: dd if=/dev/zero of=disk.img bs=1 count=SIZE mkfs.fat disk.img sudo mkdir /tmp/bla sudo ...
1
vote
1answer
274 views

Can't use fatsort as unprivileged user anymore

I'm running fatsort on Debian Jessie. It only works when being logged in as root. As unprivileged user: fatsort /dev/sdh openFileSystem: Permission denied! sortFileSystem: Failed to open file system!...
1
vote
0answers
57 views

Possible memory leak when writing files to SD with FAT fs

I have a HI3516A SoC based IP camera with SD card slot. The operation system on camera is custom 3.4.45 Linux kernel. Everything works well, but I need to have a copy of video from camera on my remote ...
1
vote
2answers
798 views

FAT file-system between the MBR and first partition

I have an old 64MB USB flash-disk which seems to have MBR: root@3:~# fdisk -lu /dev/sdd Disk /dev/sdd: 64 MB, 64880640 bytes 2 heads, 54 sectors/track, 1173 cylinders, total 126720 sectors Units = ...
1
vote
0answers
444 views

Howto configure autofs to work with usbsticks formatted with differend filesystems

I have some USB-sticks using fat32 as filesystem and others using ext4. Now I want to configure autofs to mount the sticks automatically. To make sure that the user can write to fat32 sticks I use ...
0
votes
1answer
350 views

Is it possible to run basic Linux on file permissionless file system(ex. Fat32)

So I would like to be able run Linux an a Fat32(preferably ExFat) partition is this possible? It appears this has been done Can I install GNU/Linux on a FAT drive? Couldn't shorcuts be used in place ...
0
votes
1answer
154 views

Difference in file system type on mount and Disk Utility

Here the type is fuseblk: $ mount /dev/sdb1 on /media/me/MY-DEVICE type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2) Can see ...
0
votes
1answer
197 views

FreeBSD's mount: how to get umask functionality?

In FreeBSD, similar to Linux, a FAT32 formatted external volume (da0) is mounted by root with: mount -t msdosfs /dev/da0 /media/usb But all files and directories in /media/usb/ now have the ...
0
votes
2answers
77 views

Unable to mount an sdcard

I wanted to mount an sdcard. Upon inserting the dmesg logs gives me this: [Thu Oct 25 10:59:44 2018] sd 0:0:0:0: [sdb] 30318592 512-byte logical blocks: (15.5 GB/14.5 GiB) [Thu Oct 25 10:59:44 2018] ...
0
votes
1answer
182 views

Windows doesn't like resized FAT filesystem

I resized a FAT filesystem. Then the filesystem stopped working as a Windows 10 Recovery Drive. ("This may be due to a recent change in your hardware or software..."). And a running Windows is ...
0
votes
1answer
301 views

Making a FAT disk write-only or “hidden” [closed]

I have a USB device that by itself writes to some built-in flash memory. When it's plugged into a PC, it works like a USB mass storage device with a FAT fs. The device cannot be configured in any ...