OpenWRT: usb flash or usb disk as a storage device in OpenWrt

1. Find the plugged in USB device


to see plugged in devices.

2 Partitions

install and use cfdisk to partion the USB.

3. GPT

gdisk not implemented on OpenWRT, so if the disk is GPT, then create an empty partition and it can be formatted with mkfs.ext4.

Then to recognize which partition is which (recognize them by size), use

cat /proc/partitions

 4. ext4

Install e2fsprogs, so that you can use mkfs.ext4.

mkfs.ext4 /dev/sdb5

5. fstab

Edit /etc/config/fstab

config 'mount'
	option	target	'/mnt/sda1'
	option	device	'/home/ftp_user/8GB'
	option	enabled	'0'
config 'mount'
	option  target  '/home/ftp_user/storage'
	option  device  '/dev/sdb5'
	option  enable  '0'

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

This site uses Akismet to reduce spam. Learn how your comment data is processed.