Format Thumb Drive Mac Command Line

If you’re still using a Mac OS X the time will come when your computer won’t boot, or a problem may arise where you can’t take control of the device, and booting from an OS X installation media will be required.

  1. Using Thumb Drive On Mac
  2. How To Format Hard Drive For Mac
  3. Format Flash Drive Mac Command Line

This is why it’s recommended that you make a Mac OS X bootable USB when your Mac is in working conditions. However, if you find yourself on a scenario where your device (iMac, MacBook Pro, Air, Mac Pro or Mini) is not responding and you happen to have a Windows 10 device, then you can still be able to make a USB bootable installation media for your Mac OS X to reinstall the operating system using the Recovery Assistant.

Formatting a USB drive in Ubuntu using Terminal commands is much easier as formatting it in Windows systems. Some of the Ubuntu users are not familiar with terminal commands. This tutorial will help Ubuntu (Linux) users with the simple steps of USB flash drive formatting via command line. Step 1 – Attach USB to System. Create Mac OS X bootable USB installation media. Before you can use TransMac, you first need to partition your USB flash drive with a GPT partition, as a normal MBR partition may not work. To do this, you’ll need to use the Diskpart command-line utility on Windows 10. Setting up GPT partition. Use these steps to set up a USB drive with a GPT. Format USB Flash Drive Using PowerShell: Windows PowerShell is a powerful tool that is developed by Microsoft for purposes of task automation and configuration management. This is based on the.NET framework and it includes a command-line shell and a scripting language. Sudo umount /dev/sdc1. Now, Use one of the following commands as per the file system you want. To format a USB drive, most of the users prefer VFAT and NTFS file systems because they can be easily used on the Windows operating system. Format with vFat File System. Sudo mkfs.vfat /dev/sdc1.

These instructions will also work for Windows users who are running Mac OS X on a virtual machine and need to upgrade to the latest version. For instance, to OS X Yosemite.

Requirements

Before you dive into this guide, you’ll need a few things:

  • A broken Mac computer with Mac OS X.
  • A trial copy of the TransMac software.
  • One high quality USB flash drive with 16GB of storage.
  • A copy of Apple’s macOS (DMG file).

Now that you have all the necessary ingredients, you’re ready to make a Mac OS X bootable USB using the DMG file of the operating system with the steps below.

Create Mac OS X bootable USB installation media

Before you can use TransMac, you first need to partition your USB flash drive with a GPT partition, as a normal MBR partition may not work. To do this, you’ll need to use the Diskpart command-line utility on Windows 10.

Setting up GPT partition

Use these steps to set up a USB drive with a GPT partition:

  1. Open Start on Windows 10.

  2. Search for Command Prompt, right-click the top result and select the Run as Administrator option.

  3. Type the following command to open Diskpart and press Enter:

  4. Type the following command to determine the USB flash drive and press Enter:

  5. Type the following command to select the storage and press Enter:

    Quick tip: The select disk 1 command as an example, but you have to replace 1 with the number of the flash drive you want to use.
  6. Type the following commands to delete everything from the USB thumb drive and press Enter:

  7. Type the following command to convert the drive into a GPT partition and press Enter:

  8. Type the following command to select the new partition and press Enter:

After you complete the steps, the USB flash drive from MBR to GPT format, you can use the steps below to create a bootable USB installation media to install Mac OS X.

Create USB install media

Use these steps to create a bootable media to install Mac OS X:

  1. Download and install a copy of TransMac.

    Quick note: TransMac is a paid software, but it has a 15-day trial solution, that give us more than enough time to move the DMG files to the USB drive from Windows. (If you want to support the developer, you can purchase the full version.)
  2. Insert the USB drive that you’ll use to fix your installation of OS X. (Remember that all the data in the USB will be erased. Make sure you take off any important documents.)

  3. Right-click the TransMac software icon and Run as administrator. (You’ll be prompted to Enter Key or Run, because we’ll be using it once, click the Run option.)

  4. On the left pane, you’ll see all the Windows PC drives listed, right-click the USB drive that you’re intending to use to reinstall Apple’s OS X and select the Restore with Disk Image option.

  5. In the warning dialog box, click the Yes button.

  6. Use the Restore Disk Image to Drive dialog box to browse for the DMG file with the installation files for Mac OS X Yosemite in this case, and click the OK button to create a bootable USB of the operating system.

    Now, you’ll have to wait a long time. No kidding. It could take one or two hours to complete the process depending on your computer and other variables.

Once your bootable USB installation media is ready, remove it and insert it into your Mac, power it on, holding down the Option key, and select the USB you just created to reinstall Mac OS X.

If you’re having issues trying to create a bootable media, you can get a USB flash drive that comes with Mac OSX ready to install.

Using Thumb Drive On Mac

Using flash drives like pen drive, SD card, memory card, microSD card, external hard drives has become so common today. But, sometimes it happens that due to some unexpected reasons, your flash drives get corrupted or damaged. It becomes so frustrating situation then and people get confused and don’t get anything to do.

So, keeping in mind, I am here going to tell you how to fix a corrupted flash drive using CMD option. But, before we move on to the fixing solution, let us have a look at the real practical scenario of a user who has shared his experience of a corrupted flash drive.

Corrupted USB flash drive is an old age problem. Almost every computer user has faced this common problem. It doesn’t matter what you do, at some point of time, your computer will reject to read your USB drive. But, have you ever thought about how USB flash drive gets corrupted?

Well, there could be various causes that can make your USB flash drive corrupted or damaged. Some of the causes are mentioned below:

Causes That Can Make Your USB Flash Drive Corrupted

  • Virus or malware infection.
  • System files corruption.
  • Availability of bad sector.
  • Connecting USB flash drive to multiple PCs or Mac.
  • And so on…

It doesn’t matter whatever the causes are, there are few effective solutions that you can follow to know how to fix a corrupted flash drive.

And one of the popular methods to fix corrupted flash drive is by using CMD command.

So, here comes the solution section – how to repair a corrupted flash drive using CMD (command prompt)?

How To Fix Corrupted Flash Drive Using CMD (Command Prompt)

The CMD command which is also known as the command prompt is one of the high rated and successful solutions to repair corrupted, not working, damaged or unrecognized flash drive, pen drive, SD card or hard drive. It can also be used to repair corrupted external hard drive, SSD or HDD with ease.

Note: The solution works great on Windows 10/8/8.1/7 computer.

Below, follow the steps:

Step 1: Connect the corrupted flash drive (pen drive, memory stick, SD card or external hard drive) to your Windows computer.

Step 2: Click START and type CMD in the search bar and hit ENTER to open the command prompt. Alternatively, you can also open command prompt by pressing Windows Key + R followed by typing CMD in the RUN box that pops-up.

Step 3: Now in the command prompt box, type the following commands:

  • Type diskpart and hit ENTER button. After this type list disk and hit ENTER button.

Step 4: Next, type select disk followed by the number of your disk and press ENTER button. After your disk gets selected, type clean and press ENTER button.

Step 5: Next type create partition primary and hit ENTER.

Step 6: After this type active and press ENTER followed by select partition 1.

Step 7: Finally, in the last step type the following command format fs=fat32 and hit ENTER button.

A screenshot of the process is given below.

After the completion of the process, you should find your USB drive working as good as new.

Alternatively, there is another step to fix/repair corrupted USB flash drive using CHKDSK command.

Repair Corrupted USB Flash Drive Using CHKDSK Command

Below follow the steps:

Step 1: Connect the corrupted flash drive to your PC.

Step 2: On your computer click Start and type CMD in the search bar and hit ENTER.

Step 3: A new command prompt window will get open.

Mac

Step 4: Now type the following command: chkdsk /X /f H: or chkdsk H: /f and hit ENTER. Here you need to replace the H: drive with your corrupted pen drive/SD card/USB drive.

Just wait for the process to get complete and then you should find your USB flash drive working as good as new. Also, with this, you will be able to know how to recover corrupted files from USB using CMD.

Expert Tip: Recover Lost Data From Corrupted USB Flash Drive

While performing the above solutions to fix corrupted USB drive, you may encounter data loss from your flash drive. So, after fixing a corrupted USB flash drive, it is important that you get all the data back from such a drive. So, here, you can try USB Flash Drive Recovery Tool to and know how to restore lost data from USB flash drives. The best thing about this flash drive recovery software is that it is available for both Windows and Mac computer.

With the help of this photo recovery software, one can:

  • Easily get back inaccessible or lost pictures, videos and audio files from corrupted USB flash drive
  • Recover digital media files from corrupted pen drive, SD card, memory stick, hard drive, camera card
  • Also retrieve media files from unreadable, damaged, write-protected or unrecognized USB flash drive
  • 100% read-only. Safe, secure and easy to use


* Free version of the program only scans and previews recoverable objects.

Steps To Recover Files From Corrupted USB Flash Drive

Step 1: Select Desired Location

Firstly, select the drive, external media or volume from which you want to recover deleted media files. After selecting, click on 'Scan'.

Step 2: Preview Recovered Media Files

Next, you can preview the recoverable media files after the scanning process is completed.

Step 3: Recover Media Files

Lastly, you can select the images, audio, video files you want to restore and click on 'Recover' option to save them at the location you want.

Bonus Tip: People Have Also Asked

How Can I Repair My USB Flash Drive?

Well, as mentioned above, you can follow the above command prompt (CMD) to repair corrupted USB flash drive, SD memory card, memory sticks.

On the other hand, if you know that your USB flash got corrupted due to virus infection, then run anti-virus tool to scan your corrupted SDcard, USB flash drive, etc

For detailed information please visit: Learn To Remove Virus From SD Card Without Formatting It(though it is mentioned SD card you can follow the same solution to remove virus from your virus-infected USB drive).

How Do I Remove Write Protection?

Many USB drives, memory stick, pen drive, SD card come with the feature of write-protection.

But sometimes it creates problems and when it creates a problem then users are not able to access files from write-protected USB flash drive, SD card, pen drive, etc.

How Do You Fix An Unrecognized USB?

How To Format Hard Drive For Mac

Well, there are also many users out there, whose USB drive does not get detected or does not get recognized by the computer.

Format Flash Drive Mac Command Line

In such situation, they look for the solution on how to fix an unrecognized USB drive?

Well, if your USB drive, pen drive, SD card or external hard drive does not get recognized by your computer, then please follow the related links mentioned-below and find out the best solution for your problems and get fixed your unrecognized USB/SD card or pen drive.

Conclusion

I hope after you try the above solution, you will be easily able to fix corrupted USB flash drive and know-how to recover corrupted files from USB using CMD.

This tutorial will definitely not let you down, so just try the solution with the step by step instructions mentioned above. And, if you notice that the data you have saved in the flash drive has been lost the try USB Flash Drive Recovery Tool.

This tool will definitely help you restore lost data from USB flash drive in no time. So, all the very best guys.


Alex is an expert technical writer with 7+ years of experience. His in-depth knowledge about data recovery and fascination to explore new DIY tools & technologies have helped many. Alex has a great interest in photography and loves to share photography tips and tricks with others.

  • Shares