Failed to mount USB stick on router

I'm a beginner user of OpenWRT and needed to mount my USB stick in order to store some logs on it. I run through the steps written on the following link:

But even if unplug the USB stick from the router, /mnt/sda1 is still there and I can still copy files to the folder. It seems I failed somewhere with mounting my USB stick, because /mnt/sda1 is located on the router instead of the USB drive. Can someone please help me with mounting my USB stick properly?

root@OpenWrt:/dev# ls -l /dev/sd*
brw-------    1 root     root        8,   0 Jan  6 01:46 /dev/sda
brw-------    1 root     root        8,   1 Jan  6 01:46 /dev/sda1
root@OpenWrt:/dev# ls -l /mnt/sda1
drwxr-xr-x   28 root     root             0 Nov 26 17:48 OpenWrt
-rw-r--r--    1 root     root           801 Nov 28 03:21 ping.log
drwxrwxrwx    2 root     root             0 Jan  6 01:35 pinglog
drwxrwxrwx    3 root     root             0 Nov 26 17:38 rrd
root@OpenWrt:/dev# block info
/dev/mtdblock8: UUID="5fa9ed01-18406008-ac87442a-2dddbdb6" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/mtdblock9: MOUNT="/overlay" TYPE="jffs2"
/dev/sda1: UUID="fdb56cbd-cdeb-bb4d-84e0-11e360fda15d" LABEL="W10AIO64HUN" VERSION="1.0" TYPE="ext4"
root@OpenWrt:/dev#

Post the output:

uci show fstab; grep -e /dev/sda /etc/mtab
1 Like
root@OpenWrt:~# uci show fstab; grep -e /dev/sda /etc/mtab
fstab.@global[0]=global
fstab.@global[0].anon_swap='0'
fstab.@global[0].anon_mount='0'
fstab.@global[0].auto_swap='1'
fstab.@global[0].auto_mount='1'
fstab.@global[0].delay_root='5'
fstab.@global[0].check_fs='1'
fstab.@mount[0]=mount
fstab.@mount[0].target='/mnt/sda1'
fstab.@mount[0].uuid='fdb56cbd-cdeb-bb4d-84e0-11e360fda15d'
fstab.@mount[0].enabled='1'
root@OpenWrt:~#

Try mounting and check:

/etc/init.d/fstab boot; sleep 3; grep -e /dev/sda /etc/mtab
1 Like

I'm getting the following result:

root@OpenWrt:~# /etc/init.d/fstab boot; sleep 3; grep -e /dev/sda /etc/mtab
block: check_filesystem: /usr/sbin/e2fsck not found
block: No "mount.ext4" utility available
block: mounting /dev/sda1 (ext4) as /mnt/sda1 failed (2) - No such file or directory
root@OpenWrt:~#

Do I need to run any commands before?
If I need to retry mounting, could you please paste the correct command so that I won't fail?

1 Like

You appear to be missing packages to get it to work.

Is e2fsprogs installed?

1 Like

No it wasn't, but it is installed now.
I'm getting the following result:

root@OpenWrt:~# /etc/init.d/fstab boot; sleep 3; grep -e /dev/sda /etc/mtab
W10AIO64HUN: clean, 12/493856 files, 66192/1974011 blocks
block: No "mount.ext4" utility available
block: mounting /dev/sda1 (ext4) as /mnt/sda1 failed (2) - No such file or directory
root@OpenWrt:~#
1 Like
ubus call system board
1 Like
root@OpenWrt:~# ubus call system board
{
        "kernel": "4.14.195",
        "hostname": "OpenWrt",
        "system": "Qualcomm Atheros QCA956X ver 1 rev 0",
        "model": "TP-Link Archer C7 v5",
        "board_name": "tplink,archer-c7-v5",
        "release": {
                "distribution": "OpenWrt",
                "version": "19.07.4",
                "revision": "r11208-ce6496d796",
                "target": "ath79/generic",
                "description": "OpenWrt 19.07.4 r11208-ce6496d796"
        }
}
root@OpenWrt:~#
1 Like

Make sure to install:

2 Likes

This is what I get when I install the package (+ dependencies)

root@OpenWrt:~# opkg files e2fsprogs | grep bin
/usr/sbin/mkfs.ext2
/usr/sbin/mkfs.ext3
/usr/sbin/mkfs.ext4
/usr/sbin/fsck.ext2
/usr/sbin/fsck.ext3
/usr/sbin/fsck.ext4
/usr/sbin/e2fsck
/usr/sbin/mke2fs
root@OpenWrt:~#

Done, I'm getting this now:

root@OpenWrt:~# /etc/init.d/fstab boot; sleep 3; grep -e /dev/sda /etc/mtab
W10AIO64HUN: clean, 12/493856 files, 66192/1974011 blocks
/dev/sda1 /mnt/sda1 ext4 rw,relatime,data=ordered 0 0
root@OpenWrt:~# opkg files e2fsprogs | grep bin
/usr/sbin/mkfs.ext2
/usr/sbin/mkfs.ext3
/usr/sbin/mkfs.ext4
/usr/sbin/fsck.ext2
/usr/sbin/fsck.ext3
/usr/sbin/fsck.ext4
/usr/sbin/e2fsck
/usr/sbin/mke2fs
root@OpenWrt:~#
1 Like

Looks fine now. :+1:

1 Like

Thanks a lot!

1 Like

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

1 Like