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.
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:
This step ensures that required USB storage drivers are properly installed.
xhci
for USB3.0, ehci
for USB2.0 and uhci
or ohci
for USB1.1.usb-storage
for storage of type Bulk only Transport or usb-storage-uas
for storage of type USB_Attached_SCSIIn 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.
This optional verification step can be used, to check that the OS can properly detect a connected external drive.
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.
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.
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.
This triggers an interactive dialogue: Use the suggested defaults for the partition creation (number, starting sector, size, Hex code)
and then confirm your choice with
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.
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!
Automount ensures that the external disk partition is automatically made available for usage when booting the OpenWrt device
to see something like this
The result will be:
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:
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.
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.
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.
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 size | Max file size | Windows | macOS | Linux | |
---|---|---|---|---|---|
FAT32 | 32 GB (Windows), up to 16TB (Other OSs) | 4 GB | Read/Write | Read/Write | Read/Write |
NTFS | 8 PB* | 16 EB** | Read/Write | Read | Read/Write |
ExFAT | 128 PB* | 16 EB** | Read/Write | Read/Write | Read/Write |
* 1 petabyte is about 1 thousand terabytes
** 1 exabyte is about 1 million terabytes
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.
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:
If your USB drive is larger than 32 GB, you'll need to use a third-party program like Rufus to format it.
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.
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:
.
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.
Once the format
command is finished, your drive should be formatted to FAT32.
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!)
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.