[solved] Questions about my USB stick: path to USB stick

Dear LEDErs,

[details=Summary]FIRST QUESTION:
https://lede-project.org/docs/user-guide/drives#ledelinux_filesystems suggests formatting a USB stick with f2fs format.

I'm on Linux Mint and gparted doesn't have an option to format as f2fs. What do you all suggest?

UDPATE: I decided to go with fat32. :slight_smile:[/details]

SECOND QUESTION:
I have a USB stick inserted into my router. I ran
dmesg | grep sd
and got

root@LEDE:~# dmesg | grep sd
[   11.789221] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   11.799622] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   11.809241] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   11.818422] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   11.827960] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   11.837148] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   11.846702] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   11.856050] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[173472.801006] sd 0:0:0:0: [sda] 516608 512-byte logical blocks: (265 MB/252 MiB)
[173472.809375] sd 0:0:0:0: [sda] Write Protect is off
[173472.814375] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[173472.820508] sd 0:0:0:0: [sda] No Caching mode page found
[173472.826033] sd 0:0:0:0: [sda] Assuming drive cache: write through
[173472.839124]  sda: sda1
[173472.846432] sd 0:0:0:0: [sda] Attached SCSI removable disk

How now do I determine the path to the USB stick?

I need to know the path so that I can configure a program (luci-app-nlbwmon) to save backups onto the USB stick.

Screenshot of luci-app-nlbwmon with the mysterious blank :slight_smile:


I assumed that once you connect the USB stick, it would work right away, but I guess I need to manually mount it.

root@LEDE:~# uci show fstab
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='0'
fstab.@mount[0]=mount
fstab.@mount[0].target='/mnt/sda1'
fstab.@mount[0].uuid='0000-0000'
fstab.@mount[0].enabled='0'



root@LEDE:~# block info
/dev/mtdblock6: UUID="5489ceb4-abcafe51-057dcee3-96c101aa" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/mtdblock7: MOUNT="/overlay" TYPE="jffs2"
/dev/sda1: UUID="0000-0000" LABEL="RED       " VERSION="FAT32" TYPE="vfat"

root@LEDE:~# uci set fstab.@mount[0].enabled='1'
root@LEDE:~# uci commit
root@LEDE:~# uci set fstab.@global[0].check_fs='1' 
root@LEDE:~# uci commit


root@LEDE:~# block mount
block: /dev/mtdblock6 is already mounted on /rom
block: /dev/mtdblock7 is already mounted on /overlay
block: check_filesystem: /usr/sbin/dosfsck not found


root@LEDE:~# mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock7 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/sda1 on /mnt/sda1 type vfat (rw,relatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

Greetings,

The answer is in the last line: /dev/sda1 is the (physical) device,

/mnt/sda1 is the mount point for the file system, on device /dev/sda1.

^^^ That's what you want to use.

1 Like

@RobertH,

Thank you so much for your reply!
I had /mnt/sda1 in the blank, and it didn't seem to work.

I'll take your helpful advice and use
/dev/sda1

By the way, should there be a forward slash after sda1?
In other words, is it:

/dev/sda1

or

/dev/sda1/

?

Thanks!

You're welcome, will try to help.

If /mnt/sda1 didn't work, then something else is wrong..

Is there a [ /nlbwmon ] Directory on the USB drive ?

If not, try creating one:

cd /mnt

cd sda1

mkdir nlbwmon

cd nlbwmon

"Should" put you in the created directory on the mount point (which is what you want to use) if everything is working properly,

e.g.: /mnt/sda1/nlbwmon

If not, do a " ls -l " from directory /mnt/sda1

& post, so we can see what directory / file permissions are available.

1 Like

Sorry, it's not that the commands didn't work. It's just that I'm not at home. :blush: I'll try them all when I get home. Thanks, @RobertH.

Sure thing.

Just so you (and everyone else) knows, I'm still learning my way around LEDE / *nix also: so this is of interest to me also - I'm planning on installing this useful package here as well.

  • I will be off-line most of the day tomorrow, so if anyone reading can jump-in & assist @greenlaser as needed, that would be greatly appreciated, Thanks in advance.

I'm back at my residence.
When you say
^^^
which exactly did you mean?


Anyway, without making any alterations, I now see something in /mnt/sda1

sftp://192.168.1.1/mnt/sda1/20170710.db.gz
Date modified is now. (So this is strange that it has no other file from all the hours gone by).

I meant /mnt/sda1, sorry for any confusion caused above.

Shows the target mount point for physical device (USB stick) /dev/sda1.

  • In DOS / Windows, the mount point [ /mnt/sda1 ] name is equivalent to a 'drive letter' identifier.

That seems to be good news, then. As to what files appear / how often, best to check the package docs or inquire to the package author(s),

Important ! If you intend on ( removing ) the USB stick to view data on another device / computer, make sure you UNMOUNT the filesystem before removal:

block umount /mnt/sda1

And then remount it after placing back in the LEDE router:

block mount

1 Like