Home News Suggestions How To Fix How To Format A Disk In Fat32 In...

Suggestions How To Fix How To Format A Disk In Fat32 In Linux

51
0

 

If you know how to format fat32 drive in Linux on your PC, this article can help you.

 

 

While in theory no one else should be using these filesystems,In practice, sometimes one thing is enough – for example, to blink.BIOS on the motherboard or other incomprehensible task. Or maybe just forwith a Windows compatible player.

Whatever the reason, here are instructions on how to do it on Linux.

Open a terminal and enter the following:

  sudo fdisk -l 

You will see a list of storage devices connected to your computer.and their partitions, if applicable.

You need to define the one you just connected. Although it is very simpleYour devices have different sizes because they are precisely locatedthe drive you want to work with.

MAKE SURE you have identified the drive correctly as followsThe procedure deletes ALL beyond recovery.
You have been warned!

For this tutorial, I will be using a 1GB drive.
Data from this device, using sudo fdisk -l , looks like this:

  Disk / dev / sdb: 983.51 MiB, 1031274496 bytes, 2014208 sectors.Hard Drive Model: DataTraveler IIDisks: 1 * 512 sectors = 512 bytesSector size (logical / physical): 512 bytes / 512 bytesI / O size (minimum / optimal): 512 bytes / 512 bytes 

So my reader is / dev / sdb . Yours could be / dev / sdc or something like thatif not.

Be very careful.

This is optional.

For security and verification purposesThere are no open questions with the reader, I recommendDo this from time to time.

For this we use the venerable dd command:

  sudo dd if = / dev / zero from = / dev / sdb bs = 1M status = progress conv = fdatasync 

When you’re done, you should see something like this:

  889000000 bytes (889 MB, 848 MB) copied, 2 sec, 444 MB / fromdd: write error '/ dev / sdb': not enough space on device1032   0 entries in1031   0 records1031274496 bytes (1.0 GB, 984 MB) copied, 126.28 s, 8.2 MB / s 

Write speed varies greatly by drive type.

Open your hard drive with fdisk .

  sudo fdisk / dev / sdb 

how to format a drive to fat32 in linux

You will see something like:

  Welcome to fdisk (util-linux 2.34).Changes remain in memory only when you write them.Be sharpRequired before using the write command.The device does not contain a recognized partition table.Creates a new DOS volume label with volume ID 0xad186630.Command (m for reference): 

As you can see, a new blank DOS was created automaticallyPartition table for us.

To see the available options, enter m for help:

  Command (m for reference): mHelp:  DOS (MBR)   toggle boot flag   b Change the nested BSD disc   c Activate the Dos compatibility indicator  Universal   d Delete partition   F lists free and unallocated spaces   l lists known types of sections   n Add a new section   p Print the partition table   t Change partition type   v Check partition table   I am typing score information  Other   m Print this menu   u Change display / input units   x additional features (only for experts)  scenario   I am loading disk layout from sfdisk script file   O Save the memory dump in the sfdisk script file  Safe exit   w Write the table to your hard drive and exit   q Exit without saving Making changes  Create new label   g Create a new empty GPT partition table   G Create a new empty SGI partition table (IRIX)   o Create a new empty DOS partition table   s Create a new empty Sun partition table 

Pressing o gets the same result – a new blank DOSPartition table.

Now let’s write this new partition table in / dev / sdb Hard drive by pressing w :

  Command (m for reference): wThe partition table has been changed.Call ioctl () to reread the partition table.Synchronize hard drives. 

When finished, the process ends automatically.
Open the disc again and enter in the following orderNumber of commands:

  sudo fdisk / dev / sdbnottbPw 
  1. n => New partition – accept all default partition type settings.Partition number, first sector and last sector, so you need everythingFree space on the device
  2. t => Change section type
  3. b => Select F95 FAT32
  4. p => Show section information
  5. w => Save changes and exit

Here p Output from the above commands:

  Welcome to fdisk (util-linux 2.34).Changes remain in memory only when you write them.Be careful before using the write command.Command (m for reference): nPartition type   p primary (0 primary, 0 extended, 4 free)   e extended (container for logical partitions)Select (Standard p):Use the standard answer p.Partition number (1-4, default 1):First sector (2048-2014207, benchmark 2048):Last sector,  /- sectors or  /- size {K, M, G, T, P} (2048-2014207, standard 2014207):Create a new Type 1 "Linux" partition with a size of 982.5 MB.Command (m for reference): tSelected section 1Hexadecimal code (enter L to list all codes): L. 0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris 1 FAT12 27 Hidden NTFS Win 82 Linux swap / So c1 DRDOS / sec. (FAT- 2 XENIX root 39 Plan 9 83 Linux c4 DRDOS / s (FAT- 3 XENIX usr 3c PartitionMagic 84 OS / 2 hidden or c6 DRDOS / sec. (FAT- 4 FAT16 <32M 40 Venix 80286 85 Linux Extended C7 Syrinx 5 Extended 41 PPC PReP Boot 86 NTFS volume set as non-FS data 6 FAT16 42 SFS 87 NTFS volume set db CP / M / CTOS /. 7 HPFS / NTFS / exFAT 4d QNX4.x 88 Dell Linux Utility Plain Text 8 AIX 4th QNX4.x Part 2 8th Linux LVM df BootIt 9 BootAIX 4f QNX4.x Part 3 93 Accessing Amoeba e1 DOS a Boot Management OS / 2 50 OnTrack DM 94 Amoeba BBT e3 DOS-R / O. b W95 FAT32 51 OnTrack DM6 Aux 9 f BSD / OS e4 SpeedStor c W95 FAT32 (LBA) 52 CP / M a0 IBM Thinkpad Hi ea Rufus Alignment e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD eb BeOS fs f W95 Ext'd (LBA) 54 OnTrackDM6 a6 OpenBSD ee GPT10 OPUS 55 EZ drive a7 NeXTSTEP ef EFI (FAT-12/16 /11 Hidden FAT12 56 Golden Arch a8 Darwin UFS f0 Linux / PA-RISC b12 Compaq 5c Priam Edisk a9 NetBSD f1 SpeedStor Diagnostics14 FAT16 hidden <3 61 SpeedStor by Darwin boot f4 SpeedStor16 Hidden FAT16 63 GNU HURD or Sys af HFS / HFS   f2 DOS secondary17 Hidden HPFS / NTF 64 Novell Netware b7 BSDI fs fb VMware VMFS18 AST SmartSleep 65 Novell Netware b8 BSDI Exchange for VMware VMKCORE1b Hidden W95 FAT3 70 Multbb Boot Wizard DiskSecure hid fd linux raid auto1c Hidden W95 FAT3 75 PC / IX bc Acronis FAT32 L fe LANstep1e Hidden W95 FAT1 80 Old Minix be Solaris boot ff BBTHexadecimal code (enter L to list all codes): bThe partition type "W95 FAT32" has been changed to "W95 FAT32".Command (m for reference): pDisk / dev / sdb: 983.51 MiB, 1031274496 bytes, 2014208 sectorsHard Drive Model: DataTraveler IIDisks: 1 * 512 sectors = 512 bytesSector size (logical / physical): 512 bytes / 512 bytesI / O size (minimum / optimal): 512 bytes / 512 bytesDisc Label Type: BackHard Drive ID: 0x02294794Device start Start End Sectors Size ID Type/ dev / sdb1 2048 2014 207 2012 160 982.5 MB b W95 FAT32Command (m for reference): wThe partition table has been changed.Call ioctl () to reread the partition table.Synchronize hard drives. 

If you now display player information with sudo fdisk -l , you will see something like this:

  Disk / dev / sdb: 983.51 MiB, 1031274496 bytes, 2014208 sectorsHard Drive Model: DataTraveler IIDisks: 1 * 512 sectors = 512 bytesSector size (logical / physical): 512 bytes / 512 bytesI / O size (minimum / optimal): 512 bytes / 512 bytesDisc Label Type: BackHard Drive ID: 0x02294794Device start Start End Sectors Size ID Type/ dev / sdb1 2048 2014 207 2012 160 982.5 MB b W95 FAT32 

Now let's create a FAT32 file system on it so we can use it.disk and copy the files to it.

  sudo mkfs.vfat -F 32 -n MYDRIVE / dev / sdb1 

The result looks like this:

  mkfs.fat 4.1 (2017-01-24) 

That's it, your player should already be available through the file explorer andGet ready to copy the annoying BIOS firmware file over it!

What If Mkusb Crashes?