Tip: The Quick Start for installing a USB drivesolves the very common case of installing a single USB drive onto your OpenWrt device.People do this to use Samba or other programs that need to store data on an external drive.The remainder of this page provides much more information about USB devices and drivers.

Many supported devices have ports to connect storage devices, most common are USB, or Sata.
This article will describe how to configure your device to use such storage devices for storage or for sharing. If you want to expand your firmware's space (to install more packages) please read the article about Extroot configuration.

  • Assuming you’re on the right drive, right-click on the unallocated grey block and click New. In the window that pops up, change the File System to fat32 for USB Flash Drives, NTFS for USB Hard Drives that will be used in Windows, or ext3/ext4 for USB Hard Drives that will be used exclusively in Linux.
  • I'm going to try again after reformating the drive through the ReadyNAS UI (click on the drive's gear, then Format- EXT4). The last time I tried this, the format never completed, but it seems to this time so I'll see if formating it through the ReadyNAS UI fixes the read-only filesystem problem. FYI, the USB disk is 2T while I've got 909GB.
  • Run AOMEI Partition Assistant Standard to access its main interface, right click the USB drive and choose 'Format Partition'. In the subsequent window, choose Ext2 from the given file systems and click 'Next'. Note: if you want to format USB to Ext4, just choose it from the options. Back to the main interface, click 'Apply'.

Feb 19, 2021 In case your USB drive consists of multiple partitions, repeat this step for all partitions. Use GParted to format your USB drive to EXT4. Before formatting the USB drive with GParted, we should first remove the existing partitions. Creating a new partition table on the USB drive, automatically removes whatever partitions the USB drive.

To configure external disk space, follow the procedures of this page:

Format Usb Drive Ext4 Windows

  1. Verify that the OS recognizes the attached disk and its partitions
  2. Create a file system in the partition
  3. Idle spin down of hard disks

Install and verify USB drivers

This step ensures that required USB storage drivers are properly installed.

  1. Start by refreshing the list of available software packages:
  2. The typical OpenWrt package already has core USB device drivers installed (if your device has USB ports at all), but might not yet have an USB storage device driver installed. Install this storage driver first (if it is already installed, the following command will just say “is already installed”:
  3. Some USB storage devices may require the UAS driver:
  4. To check, if the whole USB driver chain is working correctly, install the optional usbutils package:
  5. Now connect your USB disk/stick and list your connected devices with a command from these usbutils:
  6. This will output a list of device USB hub ports and connected external storage devices:
  • “Bus…”-Lines represent the host chip. Here, the “Driver” will be xhci for USB3.0, ehci for USB2.0 and uhci or ohci for USB1.1.
  • Lines with “Class=Mass Storage” represent connected USB devices. Here the “Driver” is either usb-storage for storage of type Bulk only Transport or usb-storage-uas for storage of type USB_Attached_SCSI
Ext4

In step 4, verify that the output prints no error and has at least one output line for root_hub and Mass Storage and that each Driver= lists a driver name. If not, then refer to the Installing USB Drivers for more suggestions on drivers.

Format Usb Drive Ext4

Verify that the OS recognizes the attached disk and partitions

This optional verification step can be used, to check that the OS can properly detect a connected external drive.

  1. Run in a command line:
  2. This should now show a list of block devices known to the OS

    This should print at least a connected disk like “/dev/sda” or “/dev/sdb”. If no disk at all is listed, recheck USB driver installation and reboot your OpenWrt device once.

  3. Install the block tool to get more info about existing partitions
  4. Run the block tool:

    and you should see output like this, if your disk already has partitions:

If a disk already has existing partitions, they get listed as /dev/sda1, /dev/sda2 ,/dev/sda3 and so on.
If we had connected more than one storage device we would have also a /dev/sdb1 (first partition of second device), /dev/sdc1 (first partition of third device) and so on.

Create a partition on the USB disk

if the previous chapter did not list any existing partitions (like “/dev/sda1”, “/dev/sda2”, “/dev/sdb1”…), you have to create a partition first for further storage usage.

  1. Start gdisk with the disk name identified in the previous chapter:
  2. In the interactive gdisk menu, create a partition with gdisk command

    This triggers an interactive dialogue: Use the suggested defaults for the partition creation (number, starting sector, size, Hex code)

  3. When done, confirm the changes with gdisk interactive command

    and then confirm your choice with

  4. Keep a note of the created partition name for the next step
Ext4

Refer to the gdisk help text (write “?”) in case you need additional help. Stick to a single partition, to stay aligned to the following HowTo.

Install file system drivers and create a file system in the partition

To use a partition for data storage, it needs to be formatted with a file system.

The following is the most simplest (and recommended) default configuration for OpenWrt file system usage.
For advanced users, there are further optional file system options available.

WARNING: This step deletes existing data in that partition. Ensure you have a backup of important files before starting!

  • For USB hard disks, install EXT4 file system and use EXT4 to format the partition (in this example '/dev/sda1'):
  • For USB drives formatted as NTFS see Filesystems and Writable NTFS
  • For SSD drives and thumb drives, install F2FS file system and use F2FS to format the partition (in this example '/dev/sda1'):

Automount the partition

Automount ensures that the external disk partition is automatically made available for usage when booting the OpenWrt device

  1. Now enable automount on that config entry:
  2. Optionally enable autocheck of the file system each time the OpenWrt device powers up:
  3. Reboot your OpenWrt device (to verify that automount works)
  4. After the reboot, check your results: Run

    to see something like this

  5. Note the “target” entry. This is the file path, where your attached USB storage drive can be accessed from now on. E.g. you can now list files from your external disk:
  6. Run the following command, to verify that the disk is properly mounted at this path

    The result will be:

  7. Your external storage is now ready for further usage:

Optional: Idle spindown timeout on disks for NAS usage

Optional step for hard disks.

If you want to use OpenWrt as a permanent NAS, you might want to spin down the harddisk motor during times of inactivity. Either because you want to have it quiet in your room during nighttime or to increase lifetime of the harddisk (e.g. when using a home-edition harddisk (instead of a 24×7-datacenter edition).

There are different options, to automatically spin down the motor of the attached harddisk after a certain time of inactivity. Both require installing optional packages on OpenWrt.

1. Option: hdparm
This tool permanently saves a spindown timer on the harddisk itself, using standardized SATA disk commands (the harddisk will then remember that spindown-timer value, even if turned off, even after a restart and even if attached to a different device). Its actually just a command line interface for a built-in harddisk function.So no OpenWrt service has to be run in the background for this and 'hdparm' could even be uninstalled after setting this parameter. Unfortunately many older USB2.0-PATA/SATA-adapters do not support the required SATA command, although even decade-old harddisks do support it. But fortunately most USB3.0-SATA-cases seem to support the required SATA command.To install the package

E.g. to set a reasonable idle timeout of 20 minutes on the harddisk, use:

  • if the command failed with an error message, your USB-SATA-casing sadly does not support it and you won't be able to use 'hdparm' for disk spindown as long as you use this USB-casing.
  • for all details of allowed codes see https://linux.die.net/man/8/hdparm at “-S” parameter
    • 1 to 240 specify multiples of 5 seconds, for timeouts from 5 seconds to 20 minutes.
    • 241 to 251 specify from 1 to 11 units of 30 minutes, for timeouts from 30 minutes to 5.5 hours.

Of course you can always change the timeout or disable auto-spindown again later on. Depending on your harddisk, the value may be active until the next reset or permanently stored on the harddisk.The harddisk firmware itself manages the spindown timeout, not a OpenWrt service.

2. Option: hd-idle (With LuCi integration)
This is a service than runs in the background of the OpenWrt device and maintains its own idletimeout counter. Once the defined timeout counter reaches 0, it will send a “live” spindow SATA command to the disk. Unlike the permanent spindown command from hdparm, a lot more USB2.0-SATA cases seem to support this “spindown-now” SATA command.

To install the package that even has LuCi frontend integration:

To configure it, use the “Services” menu of the LuCi web GUI of your device.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies

If you need to format a USB flash drive, HDD, SDD, or some other form of storage to FAT32, you've come to the right place.

In this article we'll go over what a file system is, the FAT32 standard, and several ways to format a storage device to FAT32 on Windows 10.

What's a file system?

A file system is a standardized way of organizing data on a computer storage device like a flash drive or HDD.

A file system divides a storage device into virtual compartments, almost like a wall of post office boxes, and keeps track of all the information that gets stored in each box.

Some of the most common file system formats for portable storage devices are FAT32, NTFS, and ExFAT.

FAT32 compared to other formats

Of those three common formats, FAT32 is the oldest and most widely supported. Every major operating system will allow you to read and write from a USB flash drive that's formatted to FAT32.

Meanwhile, macOS can only read NTFS drives, and you would need to install third-party software to write back to the drive.

However, though FAT32 is well supported, its maximum drive and file size is severely limited when compared to newer formats like NTFS and ExFAT:

Max drive sizeMax file sizeWindowsmacOSLinux
FAT3232 GB (Windows), up to 16TB (Other OSs)4 GBRead/WriteRead/WriteRead/Write
NTFS8 PB*16 EB**Read/WriteReadRead/Write
ExFAT128 PB*16 EB**Read/WriteRead/WriteRead/Write

* 1 petabyte is about 1 thousand terabytes
** 1 exabyte is about 1 million terabytes

Format usb drive fat32 xp

Note that the maximum drive and file size of NTFS and ExFAT is so large that there's basically no limit. (But it would be nice to have a 128 PB USB drive, wouldn't it?)

On the other hand, FAT32's max file size of 4 GB is almost nothing now that phones can record 4K videos. Also, it's a little more difficult to format a drive larger than 32 GB to FAT32 on Windows 10.

These days, the only reason why you'd choose to format a drive to FAT32 is for compatibility. For example, if you need to boot up an old computer, maybe with a different operating system, and backup some of its files. But you'd need to be sure that none of those files are greater than 4 GB.

If you're sure you want to go with FAT32, here's how to format a storage drive on Windows 10.

Important note: Before you format a drive, make sure that you backup all of your important files. In fact, make two backups, and keep one on a remote service like Google Drive or Dropbox.

Formatting a drive will delete all of the data that's currently on it.

Format Usb Drive Ext4 Windows

How to use Windows File Explorer to format a USB drive to FAT32

A quick note about this method: it only works on USB flash drives that are less that 32 GB. If your USB drive is larger than 32 GB, check out one of the later methods.

With that out of the way, plug your USB drive into your computer and open Windows File Explorer.

Next, right-click on the drive on the left hand side of the File Explorer window and click 'Format':

In the window that pops up, ensure that 'FAT32' is selected. Also, feel free to rename the USB drive whatever you'd like:

You can leave the rest of the options alone. Just click start to format your drive.

Once it's done, your USB drive should be formatted to use the FAT32 file system.

To double check this, open File Explorer, right click on your USB drive, and click 'Properties'.

A window will pop up and you should see that the file system is now FAT32:

How to use Rufus to format a USB drive to FAT32

If your USB drive is larger than 32 GB, you'll need to use a third-party program like Rufus to format it.

Format Usb Drive Ext4 Mac

There are lots of other programs that can format USB drives, but Rufus is really small and portable. This means you can stick Rufus right on a USB drive, plug it into any Windows computer, and format other drives on the go.

After you download Rufus, double click on the .exe file to start the application.

Make sure your USB drive is selected. Then, click the 'Boot selection' dropdown and select 'Non bootable':

Next, click the 'File system' dropdown and select 'FAT32'.

Also, feel free to change the name of your USB drive under 'Volume label':

Then, click the 'Start' button to format your drive. After a few seconds it'll be formatted to FAT32.

How to use PowerShell to format a USB drive to FAT32

While this method works with drives larger than 32 GB, it's really slow – even formatting a 32 GB drive can take up to an hour depending on your computer.

But, if you aren't able to use the previous two methods for some reason, this will work in a pinch.

First, click on the Windows Search Bar and type in 'powershell'. Then, click 'Run as administrator' to launch PowerShell with elevated privileges:

In the PowerShell terminal, enter the following command:

format /FS:FAT32 DRIVE_LETTER:

Use the File Explorer to double check your drive letter. My drive letter was D, so I entered format /FS:FAT32 D:.

Usb

Press Enter, make sure your USB drive is plugged in, and press the Enter key again to start the process:

Then go run some errands or something – it will take awhile.

Windows Format Usb Drive As Ext4

Once the format command is finished, your drive should be formatted to FAT32.

In closing

Format Usb Drive On Mac

Now you should be able to format a USB drive of any size to FAT32 on Windows 10. And with just a little modification, any of these methods can be used to format your drive to another file system like NTFS or ExFAT.

Now get out there and format all your USB drives. (But only after you backup everything important!)

Format Usb Drive Ext4 Download

Was this helpful? Is there a better method that you know of? Tweet at me and let me know how you format things on Windows 10.