Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:storage:usb-drives-quickstart [2018/03/03 20:56] – ↷ Links adapted because of a move operation bobafetthotmail | docs:guide-user:storage:usb-drives-quickstart [2020/09/23 22:11] – corrected typo in a command jhench | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | =====Quick Start for Adding a USB drive===== | + | ====== Quick Start for Adding a USB drive ====== |
| - | Many useful LEDE utilities and packages rely on external storage to hold data files. | + | **The Goal: |
| - | This guide describes how to add a single USB stick or drive to your LEDE device. | + | |
| - | **Requirements: | + | This is all you'll need for most purposes, however, there are plenty of options described below. |
| - | | + | /* Moved NOTES down to the bottom... */ |
| - | * This procedure will work for the //first// USB device installed in the router. To add more drives, see the [[docs: | + | |
| - | * This procedure **WILL ERASE THE USB DRIVE**. Copy any data you care about to another destination. | + | ===== Requirements ===== |
| + | |||
| + | | ||
| + | * You can add a USB drive of any capacity. | ||
| + | * This procedure **WILL ERASE THE USB DRIVE** | ||
| * This quickstart requires you to [[docs: | * This quickstart requires you to [[docs: | ||
| - | **Procedure:** | + | ===== Procedure ===== |
| + | |||
| + | 1. Use your **laptop/ | ||
| + | |||
| + | 2. [[docs: | ||
| + | |||
| + | 3. Get the required packages: ++More...|You may see error messages about installing kmod-usb3 on certain routers. These can be ignored since the hardware may not support USB3.++ | ||
| + | < | ||
| + | |||
| + | 4. Enter '' | ||
| + | |||
| + | 5. Insert the USB drive into your router. Enter '' | ||
| + | root@OpenWrt: | ||
| + | brw------- | ||
| + | brw------- | ||
| + | |||
| + | /* Thanks for contributing the " | ||
| + | /* I moved it down to preserve this as a no-options, "Just Do This" guide. */ | ||
| + | /* -richb-hanover */ | ||
| + | |||
| + | 6. Make an ext4 filesystem on the USB device using the device name you just discovered. **Note:** Be certain you enter the proper device name - this step will completely erase the device. ++More...|This command creates an ext4 file system on the first partition of the first USB device - / | ||
| + | < | ||
| + | |||
| + | 7. Create the fstab config file based on all the block devices found. ++More...|This command writes the current state of all block devices, including USB drives, into the '' | ||
| + | < | ||
| + | |||
| + | 8. Update the fstab config file to mount all drives at startup. ++More...|**/ | ||
| + | < | ||
| + | |||
| + | 9. Mount the device. ++More...|Automount is enabled on boot.++ | ||
| + | < | ||
| + | |||
| + | 10. **You' | ||
| - | - Connect the USB stick/disk to the router. | ||
| - | - [[docs: | ||
| - | - Enter the following commands by copying and pasting //each separate line// below. | ||
| - | # Copy/paste each line below, then press Return | + | ===== More Details ===== |
| - | opkg update && opkg install block-mount e2fsprogs kmod-fs-ext4 kmod-usb3 kmod-usb2 kmod-usb-storage | + | |
| - | mkfs.ext4 /dev/sda1 | + | |
| - | block detect > / | + | |
| - | uci set fstab.@mount[0].enabled=' | + | |
| - | service fstab start && service fstab enable | + | |
| - | The drive will be mounted at **/ | + | More information about this procedure and about USB drives: |
| - | If you want more information | + | * You can change the mount point in the web interface, in **System** -> **Mount Points** menu. |
| - | or you want to add or configure | + | * The [[docs: |
| - | see the [[docs: | + | * If you have a memory limited router (say with 4MBytes Flash internal storage), and want to be able to install |
| + | * For NTFS disks, refer to [[docs: | ||
| + | * Look at the [[docs/ | ||
| + | * This Forum article also has a lot of background information: | ||
| + | * If you just want to temporarily mount the drive (say, for testing), you can simply enter: '' | ||