Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision | ||
| docs:user-guide:storage:storage:usb-drives-quickstart [2018/02/17 16:45] – ↷ Page moved from docs:user-guide:storage:usb-drives-quickstart to docs:user-guide:storage:storage:usb-drives-quickstart bobafetthotmail | docs:guide-user:storage:usb-drives-quickstart [2024/03/12 17:11] – update intro, add new LuCI section, remove repeated links, note other filesystems palebloodsky | ||
|---|---|---|---|
| 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. | + | This page describes how to add a USB drive to your OpenWrt |
| - | This guide describes how to add a single | + | |
| - | **Requirements:** | + | ===== Requirements |
| - | * Your LEDE device must have at least 8 MB Flash. Lower capacity devices will not be able to hold the required packages. | + | |
| - | * This procedure will work for the //first// USB device installed in the router. To add more drives, see the [[docs/ | + | * Your computer connected to the network for LuCI/SSH. |
| - | * This procedure **WILL ERASE THE USB DRIVE**. | + | |
| - | * This quickstart requires you to [[docs: | + | * This procedure **WILL ERASE THE USB DRIVE** |
| - | **Procedure:** | + | ===== Procedure |
| - | - Connect the USB stick/disk to the router. | + | USB drives can be installed using either LuCI or the command |
| - | - [[docs: | + | |
| - | - Enter the following commands by copying and pasting //each separate | + | |
| - | # Copy/paste each line below, then press Return | + | ==== LuCI ==== |
| - | 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 **/mnt/sda1** You can change the mount point in the web interface, in **System** | + | 1. On the Software page, click update, then install the packages below. These can alternatively |
| - | If you want more information | + | '' |
| - | or you want to add or configure | + | |
| - | see the [[docs/user-guide/ | + | 2. Plug in your USB drive, it will be detected automatically as **/ |
| + | |||
| + | 3. Go to the **System -> Mount Points** page and click on the drive to mount, click save & apply. | ||
| + | |||
| + | 4. Go to the **Services -> HDD Idle** page and enable to idle the drive to save power and lifespan, click save & apply. | ||
| + | |||
| + | You're done! The drive is ready to read/write data. | ||
| + | |||
| + | |||
| + | ==== Command Line ==== | ||
| + | |||
| + | 1. Use a computer to format your USB drive using the default options. This prepares the drive for the process below, which will erase those settings. //Warning: This initial formatting will erase the entire USB drive.// | ||
| + | |||
| + | 2. SSH into your device and enter the following commands. ++More...| The [[docs: | ||
| + | |||
| + | 3. Install the required packages. **Note**: below uses ext4 filesystem, alternatively | ||
| + | < | ||
| + | |||
| + | 4. Enter '' | ||
| + | |||
| + | 5. Insert the USB drive into your router. Enter '' | ||
| + | |||
| + | < | ||
| + | root@OpenWrt: | ||
| + | brw------- | ||
| + | brw------- | ||
| + | </ | ||
| + | |||
| + | 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.++ | ||
| + | < | ||
| + | |||
| + | You're done! The drive is ready to read/write data. | ||
| + | |||
| + | |||
| + | ===== More Details ===== | ||
| + | |||
| + | More information on this procedure and USB drives: | ||
| + | |||
| + | * You can mount from the web interface, in the **System** | ||
| + | * [[:docs:guide-user: | ||
| + | * The [[docs: | ||
| + | * For NTFS disks, refer to [[docs: | ||
| + | * Look at the [[docs/ | ||
| + | * This Forum thread has a lot of background information: | ||
| + | * If you want to temporarily mount the drive (say, for testing), you can simply enter: '' | ||