[SOLVED] USB mount to /opt

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
RY.DDWRT
DD-WRT Novice


Joined: 09 Apr 2020
Posts: 15
Location: Houston, TX, USA

PostPosted: Mon Nov 13, 2023 2:27    Post subject: [SOLVED] USB mount to /opt Reply with quote
Info:

Router Model : Netgear R6400 v1
Firmware Version : DD-WRT v3.0-r53843 std (11/01/23)
Kernel Version : Linux 4.4.302-st45 #10322 SMP Wed Nov 1 06:42:47 +06 2023 armv7l

Router -> Services -> USB
Core USB Support : Enable
USB Storage Support : Enable
USB over IP : Disable
Automatic Drive Mount: Enable

----------------------------------------------
Disk Info
Disk Space /tmp/mnt/sda1 4.5M / 29.7G
----------------------------------------------
--- /dev/sda
Block device, size 29.74 GiB (31935430656 bytes)
DOS/MBR partition map
Partition 1: 29.74 GiB (31934382080 bytes, 62371840 sectors from 2048)
Type 0x0C (FAT32 (LBA))
Windows BOOTMGR boot loader
FAT32 file system (hints score 4 of 5)
Volume size 29.73 GiB (31917604864 bytes, 1948096 clusters of 16 KiB)
/dev/sda not mounted Unsupported Filesystem

----------------------------------------------

--- /dev/sda1
Block device, size 29.74 GiB (31934382080 bytes)
Windows BOOTMGR boot loader
FAT32 file system (hints score 4 of 5)
Volume size 29.73 GiB (31917604864 bytes, 1948096 clusters of 16 KiB)
/dev/sda1 mounted to /tmp/mnt/sda1

----------------------------------------------

After SSH'g into Router : ssh root@192.168.1.1

# blkid
/dev/sda1: LABEL="FAT32_16GB" UUID="98DA-C470"

# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 24.3M 24.3M 0 100% /
none 512.0K 0 512.0K 0% /dev
/dev/sda1 29.7G 4.5M 29.7G 0% /tmp/mnt/sda1

----------------------------------------------

QUESTION:

1) How do I mount my USB Flash Drive onto /opt partition ?
2) Specifying UUID="98DA-C470" for 'Mount Partition to /opt'
or 'Mount Partition to /jffs' under 'Menu -> Services -> USB ' does not work
Sponsor
mwchang
DD-WRT Guru


Joined: 26 Mar 2013
Posts: 1858
Location: Hung Hom, Hong Kong

PostPosted: Mon Nov 13, 2023 8:25    Post subject: Re: Netgear R6400 - USB mount to /opt Reply with quote
RY.DDWRT wrote:
QUESTION:
1) How do I mount my USB Flash Drive onto /opt partition ?
2) Specifying UUID="98DA-C470" for 'Mount Partition to /opt'
or 'Mount Partition to /jffs' under 'Menu -> Services -> USB ' does not work

Did you reboot after Apply settings?

What you did was correct... strange that the Disk Info list didn't show any UUIDs but the "blkid" command. The UUID format is weird, too short and unlike ext2 partition UUID.

Another useful command is "disktype /dev/sda", which should output the same as the USB page in the WEUI.

I suspect it's an UUID issue. I now am using ext2 partitions, never quite followed up the FAT32 issue. If you disabled USB Automount, you might be able to do your own mounting using /dev/sdx as device ID instead of UUID.


Related:

DD-WRT :: View topic - FAT partitions and UUID
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1241783

DD-WRT :: View topic - mount usb /opt
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=874804

DD-WRT :: View topic - Usb drive mount points
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=319397

#5766 (Move fstab to /tmp/etc so entries can be added at startup) – DD-WRT
https://svn.dd-wrt.com/ticket/5766

Update:

It looked like there is limitation to using FAT as /opt or /jffs:

DD-WRT :: View topic - Can't mount USB to router
https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1113743
Code:
Change the volume name in GParted or Partition wizard. Change the name to "Optware". It will auto mount to /opt.
JFFS may have to be written as "Jffs" or "JFFS", I am not sure about that one.
___________________________________
For USB FlashDrive
TRY
Format using MiniTool Partition Wizard, have only one partition and label it as "OPTWARE". Use FAT32 format instead of ext2. Magic happened, it's work !!

_________________
Router: Asus RT-N18U (rev. A1)

Drink, Blink, Stretch! Live long and prosper! May the Force and farces be with you!

Facebook: https://www.facebook.com/changmanwai
Website: https://sites.google.com/site/changmw
SETI@Home profile: http://setiathome.berkeley.edu/view_profile.php?userid=211832
GitHub: https://github.com/changmw/changmw


Last edited by mwchang on Tue Nov 14, 2023 10:33; edited 13 times in total
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12913
Location: Netherlands

PostPosted: Mon Nov 13, 2023 8:28    Post subject: Reply with quote
Moved to the correct forum

See attachement



DDWRT USB storage and NAS v3.pdf
 Description:

Download
 Filename:  DDWRT USB storage and NAS v3.pdf
 Filesize:  536.15 KB
 Downloaded:  486 Time(s)


_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
RY.DDWRT
DD-WRT Novice


Joined: 09 Apr 2020
Posts: 15
Location: Houston, TX, USA

PostPosted: Tue Nov 14, 2023 3:39    Post subject: Reply with quote
egc - Thank You.

egc wrote:
Moved to the correct forum

See attachement


I formatted the 32GB flash drive using 'gparted' on a Laptop running Linux OS. Modified the Label as 'opt'.

Now when I plug in the flash drive to the router, it auto mounts to '/opt'.



Code:

--- /dev/sda1
Block device, size 29.74 GiB (31934382080 bytes)
Ext4 file system
Volume name "opt"
UUID 0306F788-C1F9-49DD-B2D0-1FC80294784A (DCE, v4)
Last mounted at "/opt"
Volume size 29.74 GiB (31934382080 bytes, 7796480 blocks of 4 KiB)
/dev/sda1 mounted to /opt

egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12913
Location: Netherlands

PostPosted: Tue Nov 14, 2023 6:45    Post subject: Reply with quote
Great, I will mark this thread as solved Smile
_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum