Changes

Partition and Format a USB Flash Drive with Linux

2,193 bytes added, 17:50, 10 April 2020
/* Format USB Drive via USB Stick Formatter */
The following lines were added (+) and removed (-):
This page is part of [[Linux and Your USB Flash Drive]] and applies to [[Solid State Removable Storage]].  Although the new USB Flash Drive that you just took out of the bubble pack is already formatted and ready to use, I would suggest you delete the existing partition, and start over.  This is a good idea to protect you from getting a virus.  In the past users have had to cope with companies like Sandisk and their [[U3 Flash Drive Virus]].  They really did intentionally install a virus on all of the flash drives they sold people!  Other times rogue employees have been behind factory new flash media having a virus pre-installed.  If you partition and format your flash drive before use then you know what's on it.This page is part of [[Linux and Your USB Flash Drive]] and applies to [[Solid State Removable Storage]].  Although the new USB Flash Drive (''pendrive pen drive flash stick'') that you just took out of the bubble pack is already formatted and ready to use, I would suggest you delete the existing partition, and start over.  This is a good idea to protect you from getting a virus.  In the past users have had to cope with companies like Sandisk and their [[U3 Flash Drive Virus]].  They really did intentionally install a virus on all of the flash drives they sold people!  Other times rogue employees have been behind factory new flash media having a virus pre-installed.  If you partition and format your flash drive before use then you know what's on it.You can read about Recommend File System for Linux Use on your [[USB Flash Drive]] for some background.  NTFS or FAT32 is recommended due to its compatibility with Windows however if you only plan to use the flash drive on linux systems then you can also use EXT4.You can read about Recommend File System for Linux Use on your [[USB Flash Drive]] for some background.  NTFS or FAT32 is recommended due to its compatibility with Windows however if you only plan to use the flash drive on linux systems then you can also use EXT4.  Also read [[USB Flash Drive Formats]] for more information on partition and format options for this type of flash memory.In the absence of having a partition on the flash drive you will observe only the device assignment:In the absence of having a partition on the flash drive you will observe only the block device node assignment:* exFAT *** sudo mkfs.exfat /dev/sdc1*<nowiki>***</nowiki> note on exFAT: requires exfat-utils (sudo apt install exfat-utils) read [[exFAT on Linux]] for details.  Both exFAT and NTFS are Microsoft proprietary file systems.Using this method and applying a FAT32 file system is verified to allow you to read and write to the flash drive under Linux and Windows 7.  There is a file size limitation with FAT32.  You cannot transfer a file that is greater than 4GB in size to a FAT32 file system.  Files larger than 4GB can NOT be stored on a FAT32 volume. Formatting the flash drive as exFAT or NTFS will resolve this issue.=== Format USB Drive via USB Stick Formatter ===mintstick - A utility included with the Mint Linux distribution that allows for the quick format of a USB flash drive from an easy to use graphical interface within the cinnamon desktop.  There is also USB Image Writer as well as USB Stick Formatter.  It is located in the MENU under:* Menu -> Accessories -> USB Stick Formatter $ /bin/sh /usr/bin/mintstick Usage: mintstick [--debug] -m [format|iso]              : mode (format usb stick or burn iso image)        mintstick [--debug] -m iso [-i|--iso] iso_path        mintstick [--debug] -m format [-u|--usb] usb_device                           [-f|--filesystem] filesystemLinux Mint Package Install - https://community.linuxmint.com/software/view/mintstickThis utility is very easy to operate and works well.  You will be prompted for elevated privileges to perform actual format.=== Writing an ISO Image to USB Stick ===There are a number of [[Bootable USB flash drive utilities]] that you can use for this purpose, even if it is not necessary to have a bootable image.  Some things to keep in mind include the tip, don't use USB Image Writer to burn a windows ISO image to flash media.  For this purpose WoeUSB is recommended.  Even the popular Etcher aka balenaEtecher is not recommended for creating bootable USB media from a Windows ISO image.[[Category:Solid_State_Media]]
Bureaucrat, administrator
16,192
edits