Changes

Talk:Partition and Format a USB Flash Drive with Linux

3,782 bytes added, 20:52, 4 December 2020
/* wipe your flash drive */ new section
The following lines were added (+) and removed (-):
    FAT12, a filesystem used on floppies since the late 1980s, in particular by MS-DOS;*    FAT12, a filesystem used on floppies since the late 1980s, in particular by MS-DOS;    FAT16, a small modification of FAT12 supporting larger media, introduced to support hard disks;*    FAT16, a small modification of FAT12 supporting larger media, introduced to support hard disks;    vFAT, which is backward compatible with FAT, but allows files to have longer names which only vFAT-aware applications running on vFAT-aware operating systems can see;*    vFAT, which is backward compatible with FAT, but allows files to have longer names which only vFAT-aware applications running on vFAT-aware operating systems can see;    FAT32, another modification of FAT16 designed to support larger disk sizes. In practice FAT32 is almost always used with vFAT long file name support, but technically 16/32 and long-file-names-yes/no are independent.*    FAT32, another modification of FAT16 designed to support larger disk sizes. In practice FAT32 is almost always used with vFAT long file name support, but technically 16/32 and long-file-names-yes/no are independent.== FAT32 4GB Size Limitation ==Transferring a 4GB or larger file to a USB flash drive or memory cardWhy can't I transfer a 4GB or larger file to my USB flash drive or memory card?This is due to FAT32 limitation. Files larger than 4GB can NOT be stored on a FAT32 volume. Formatting the flash drive as exFAT or NTFS will resolve this issue.WARNING: Backup your data. Formatting will delete all the data in your device.SOLUTION 1 - Format in exFATexFAT file system that allows a single file larger than 4GB to be stored on the device. This file system is also compatible with Mac.Windows 7 and Mac OS 10.6.6 and higher are compatible with exFAT out of the box. Older operating systems may need a patch installed for exFAT compatibility.NOTE: exFAT file system is NOT compatible with some host devices such as TV, game systems, older operating systems, car stereos etc.Formatting a drive in exFAT1. Double-click on My Computer.2. Right-click on the flash drive or memory card, then select Format.3. In the File System list, click exFAT.4. Click Start.5. Click OK to start formatting.Click Here for Instructions to format with MacSOLUTION 2 - Format in NTFSWARNING:- Formatting the device as NTFS will make it unwriteable on a Mac computer. Most Mac computers can read NTFS, but not write.- NTFS is a journaled file system, this creates more read/write activities. Therefore, it MAY decrease life expectancy of your device.- Once the device is formatted as NTFS, you MUST use "Safely Remove Hardware" to remove your device.STEP 1 - Optimize the flash drive for performance1. Plug in the device to the PC.2. Open The Computer Management Consolea) Windows 8b) Windows XP, Windows Vista, Windows 73. On the Left side select Device Manager4. On the right side expand Disk Drives5. Right-click on the flash drive, then select Properties.6. Click the Policy tab.7. Select Optimize for performance, then click OK.STEP 2 - Format the flash drive1. Double-click My Computer.2. Right-click on the flash drive, then select Format.3. In the File system list, click NTFS.4. Click Start.5. Click OK to start formatting.== ext4 on usb flash ==ext4 I use the ext4 file system and turn off journaling in USB drives and memory cards. I also set the mount option 'noatime' in /etc/fstab in an installed system. See these links,Installation/UEFI-and-BIOSPendrive lifetimeLifespan a flash drive running Ubuntu? # sudo mkfs.ext4 /dev/sdc1 mke2fs 1.42.13 (17-May-2015) /dev/sdc1 contains a vfat file system Proceed anyway? (y,n) y /dev/sdc1 is mounted; will not make a filesystem here! # umount /dev/sdc1 # sudo mkfs.ext4 /dev/sdc1 mke2fs 1.42.13 (17-May-2015) /dev/sdc1 contains a vfat file system Proceed anyway? (y,n) y Creating filesystem with 31358720 4k blocks and 7839744 inodes== wipe your flash drive ==Have you tried fdisk? In a terminal, run sudo fdisk /dev/sdxwhere /dev/sdx should be replaced with the device file for your flash drive. Once you get fdisk open, type p to list the partition table, and if the mysterious partition is listed, you can use d # to delete it. (# is the number of the partition, so e.g. d 1, d 2) w writes the partition table back to the disk and q quits. (hit m for help)If even fdisk fails, I guess you could just try zeroing out the first sector, which I think contains the partition table. sudo dd if=/dev/zero of=/dev/sdx bs=512 count=1where, again, /dev/sdx should be replaced with the actual device for your flash drive, will do that for you. You can increase the count= number to write zeros to more of the disk, or omit it entirely to overwrite the entire disk. Needless to say, if you do this, you irretrievably lose any files that may have been stored on the disk.
Bureaucrat, administrator
16,192
edits