MB PRO Red does not seem to be recognizing USB in either the front or back port. Trying to activate backup script to be saved on external stick. Internal storage being used for database. Have tried several different sticks including one that was working previously for some months, reformatted them (FAT32), rebooted MB Pro, inserted without rebooting, and cannot think of anything else to try. Attempting backup from history page, system page, or script test results in same message "no target media found."
Internal card seems to be fine, do not know how to assess RAM usage status:
RAM: 61500 kB total, 9524 kB free (84% used)
Storage ATP: Internal 1822 MB total, 1803 MB free (1% used)
SW Version: Meteobridge 4.4 (Jul 25 2020, build 13617), FW 1.4
Suggestions on how to get USB stick to work for purposes of scripted backups? Are they supposed to be recognized and usable upon insertion or is a reboot of the MB required after removal/insertion of a USB stick?
MB Pro not recognizing USB stick **solved**
Moderator: Mattk
-
- Fresh Boarder
- Posts: 7
- Joined: Mon Jan 29, 2018 6:10 pm
Re: MB Pro not recognizing USB stick
Did you check on the OS level if the stick is recognized ?
I don't have any special stick and so far my MB Pro recognized them all, even an external 160 GB hard disk.
Connect with puTTY via SSH to the MB Pro and then check if it is recognized.
PuTTY can be downloaded from the web if you don't have it.
You have to enter the IP address of the MB Pro in your LAN in order to connect (use SSH protocol via port 22).
Use the username and password you also use for the web interface.
I guess you first have to connect the USB stick and then reboot for the OS to recognize the stick - not sure if the mini-Linux can dynamically recognize devices.
with the command
"df -h" (without the "")
you will get all mounted storage devices shown (that's the storage which can be used by the operation system) - you can usually tell by the size/capacity which is your USB stick. See top portion of the picture.
The internal USB has 927.9 MB, my external USB stick has 16 GB capacity (the OS recognizes 14.4 GB).
My external USB stick is mounted into a folder/directory which I created as a subfolder of the /tmp/mnt/data folder in order to be able to see it in the METEOBRIDGE network drive (mount) under windows. I have given it the name "backup-USB". That's just for explanation in case you wonder what that path behind my /dev/sda is about.
The name of the device should be sda, sdb, sda1, or sdb1.
Which devices are available you can see with the command:
"ls -l /dev" (which lists all the devices in the device folder /dev)
in my case the internal USB is "sdb" and my external USB is "sda" - but this sometimes changes after reboots.
Linux identifies the sticks as SCSI drives: SCSI drive a (first drive) which translates into "sda". If the drive has more than one partition, it adds "1", "2", "3" to it, e.g. sda1, sda2 ....
For a backup USB stick you would normally have only one partition, therefore it is very likely that your external USB stick will be either sda or sdb.
If you USB stick is either sda or sdb and not sda1 or sdb1, you will have to edit the backup script as the the script expects a device with the name sdx1 (x=a, b, c....). That might already be the reason why your backup doesn't work (I had the same issue, as my device name changed from sdb1 to sda). And you will have to save your backup script externally as with every reboot the script backup.sh is overwritten with the delivery version and then replace it again! Usually (but not always) it is enough to have a renamed copy in the /data/scripts directory, e.g. backup_mod.sh.
Sometimes, I think it comes with every program update, the whole directory is purged. Therefore the external copy.
There should be two sdx devices visible if you have inserted one external USB drive/stick. (x=a, b)
Can you verify how many you find/see ?
Then we can take it from there ....
I don't have any special stick and so far my MB Pro recognized them all, even an external 160 GB hard disk.
Connect with puTTY via SSH to the MB Pro and then check if it is recognized.
PuTTY can be downloaded from the web if you don't have it.
You have to enter the IP address of the MB Pro in your LAN in order to connect (use SSH protocol via port 22).
Use the username and password you also use for the web interface.
I guess you first have to connect the USB stick and then reboot for the OS to recognize the stick - not sure if the mini-Linux can dynamically recognize devices.
with the command
"df -h" (without the "")
you will get all mounted storage devices shown (that's the storage which can be used by the operation system) - you can usually tell by the size/capacity which is your USB stick. See top portion of the picture.
The internal USB has 927.9 MB, my external USB stick has 16 GB capacity (the OS recognizes 14.4 GB).
My external USB stick is mounted into a folder/directory which I created as a subfolder of the /tmp/mnt/data folder in order to be able to see it in the METEOBRIDGE network drive (mount) under windows. I have given it the name "backup-USB". That's just for explanation in case you wonder what that path behind my /dev/sda is about.
The name of the device should be sda, sdb, sda1, or sdb1.
Which devices are available you can see with the command:
"ls -l /dev" (which lists all the devices in the device folder /dev)
in my case the internal USB is "sdb" and my external USB is "sda" - but this sometimes changes after reboots.
Linux identifies the sticks as SCSI drives: SCSI drive a (first drive) which translates into "sda". If the drive has more than one partition, it adds "1", "2", "3" to it, e.g. sda1, sda2 ....
For a backup USB stick you would normally have only one partition, therefore it is very likely that your external USB stick will be either sda or sdb.
If you USB stick is either sda or sdb and not sda1 or sdb1, you will have to edit the backup script as the the script expects a device with the name sdx1 (x=a, b, c....). That might already be the reason why your backup doesn't work (I had the same issue, as my device name changed from sdb1 to sda). And you will have to save your backup script externally as with every reboot the script backup.sh is overwritten with the delivery version and then replace it again! Usually (but not always) it is enough to have a renamed copy in the /data/scripts directory, e.g. backup_mod.sh.
Sometimes, I think it comes with every program update, the whole directory is purged. Therefore the external copy.
There should be two sdx devices visible if you have inserted one external USB drive/stick. (x=a, b)
Can you verify how many you find/see ?
Then we can take it from there ....

WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
-
- Fresh Boarder
- Posts: 7
- Joined: Mon Jan 29, 2018 6:10 pm
Re: MB Pro not recognizing USB stick
Thank you for the very rapid and extremely helpful reply.
I read your post carefully, dug a little more deeply into my system using Putty, and it is working now as expected. Of note, you do not need to reboot the MB for it to recognize the stick it appears since I added a stick to the back port and it came up without a reboot.
Your advice solved the problem. I simply changed the line in the script file to read as follows after determining the correct location:
TARGET = "/dev/sdb"
Thank you!
I read your post carefully, dug a little more deeply into my system using Putty, and it is working now as expected. Of note, you do not need to reboot the MB for it to recognize the stick it appears since I added a stick to the back port and it came up without a reboot.
Your advice solved the problem. I simply changed the line in the script file to read as follows after determining the correct location:
TARGET = "/dev/sdb"
Thank you!
- Attachments
-
- putty.jpg (52.42 KiB) Viewed 2484 times
Last edited by zmcreynolds4 on Tue Jul 28, 2020 2:34 am, edited 1 time in total.
Re: MB Pro not recognizing USB stick
Great !
If you want to see your backup USB in the network mount which MB Pro provides (under Windows it will show under Networks the entry METEOBRIDGE with the \data folder, you will have to add another folder there under \data e.g. backup-USB as I did with mine. Then you can mount your device with "mount /dev/sdb /tmp/mnt/data/backup-USB"
and you will then see it in Windows under \\METEOBRIDGE\data (if \\METEOBRIDGE doesn't work, use your IP of the MB Pro \\xxx.xxx.xxx.xxx\data)
However, after each backup it will disappear as the script unmounts the sdb device.
In order to avoid that you have to add the mount command in the backup script before the exit 0 line
(if you use the directory name I mentioned above it would be the same command as above:
my backup script looks such: (my device name is sda)
-----------------
#!/bin/sh
#
### backup database, optional parameter is used as backup name
#
LOGFILE=/var/log/meteobridge.log
ERRFILE=/var/log/backup.err
#TARGET="`ls -C /dev/sd?1 2>/dev/null | cut -f1`"
TARGET="`ls -C /dev/sda 2>/dev/null | cut -f1`"
......
......
# make sure the USB Backup medium is mounted again into the MB Pro file system
mount /dev/sda /tmp/mnt/data/backup-USB
exit 0
---------------------
works perfectly.
My backup on the MB Pro runs every 15 minutes and I have a Windows task scheduled which runs a windows script every 15 minutes with a 2 minute delay which copies the newly created backups from the \\METEOBRIDGE\data\backup-USB folder onto another disk (in case something goes wrong with my USB stick). If the computer shuts down over night, it resumes automatically the copy task after restart. If you are interested in the windows script, send me a PM.
I suggest you mark your post as "solved" by adding " ** solved **" to the subject/headline
If you want to see your backup USB in the network mount which MB Pro provides (under Windows it will show under Networks the entry METEOBRIDGE with the \data folder, you will have to add another folder there under \data e.g. backup-USB as I did with mine. Then you can mount your device with "mount /dev/sdb /tmp/mnt/data/backup-USB"
and you will then see it in Windows under \\METEOBRIDGE\data (if \\METEOBRIDGE doesn't work, use your IP of the MB Pro \\xxx.xxx.xxx.xxx\data)
However, after each backup it will disappear as the script unmounts the sdb device.
In order to avoid that you have to add the mount command in the backup script before the exit 0 line
(if you use the directory name I mentioned above it would be the same command as above:
my backup script looks such: (my device name is sda)
-----------------
#!/bin/sh
#
### backup database, optional parameter is used as backup name
#
LOGFILE=/var/log/meteobridge.log
ERRFILE=/var/log/backup.err
#TARGET="`ls -C /dev/sd?1 2>/dev/null | cut -f1`"
TARGET="`ls -C /dev/sda 2>/dev/null | cut -f1`"
......
......
# make sure the USB Backup medium is mounted again into the MB Pro file system
mount /dev/sda /tmp/mnt/data/backup-USB
exit 0
---------------------
works perfectly.
My backup on the MB Pro runs every 15 minutes and I have a Windows task scheduled which runs a windows script every 15 minutes with a 2 minute delay which copies the newly created backups from the \\METEOBRIDGE\data\backup-USB folder onto another disk (in case something goes wrong with my USB stick). If the computer shuts down over night, it resumes automatically the copy task after restart. If you are interested in the windows script, send me a PM.
I suggest you mark your post as "solved" by adding " ** solved **" to the subject/headline

WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
Re: MB Pro not recognizing USB stick
Stick used for backups needs to have a standard FAT32 partition as they come from the factory.
On linux level this will be /dev/sda1 when device is inserted before booting or /dev/sdb1 when device is inserted later on.
This is the reason why doing the trick mentioned above will not always work and has the risk of unintenionally writing the internal stick instead of the external one. I generally do not recommend to "improve" my scripts as you might not fully understand how this all works together. Partitioning and formatting the external stick the right way is a much better approach.
You can do as you like, but when changing scripts, you are on your own in uncharted territory
On linux level this will be /dev/sda1 when device is inserted before booting or /dev/sdb1 when device is inserted later on.
This is the reason why doing the trick mentioned above will not always work and has the risk of unintenionally writing the internal stick instead of the external one. I generally do not recommend to "improve" my scripts as you might not fully understand how this all works together. Partitioning and formatting the external stick the right way is a much better approach.
You can do as you like, but when changing scripts, you are on your own in uncharted territory

Re: MB Pro not recognizing USB stick **solved**
It would be nice if it were as you write - but it isn't, and I have proof enough in logs etc. that it isn't.
Currently my USB stick keeps on appearing as /dev/sdc1 - and neither as sda1 nor sdb1 as it should following your post above,
and I haven't found out yet why (sometimes, rarely) it shows even as a /dev/sdb or /dev/sdc.
And it's always a stick with FAT32 and one partition only.
It shows as /dev/sda1 when inserted before booting, correct - but when inserted later, it's not always /dev/sdb1.
But your backup script covers for that as it asks for /dev/sd?1.
So all is fine as long as the USB stick is recognized by Linux as sd?1 (but sometimes it isn't).
Why to insert it later ? Because the OS of my MB Pro sometimes "forgets" the USB stick - again no clue why?
Pulling and re-inserting it makes it work again.
So the only solution is then to reboot when your Linux doesn't behave properly and shows the stick as /sdb or /sdc ???
(what it does at times - I notice that as my backups fail then, as the backup script doesn't recognize devices with a missing "1" in the end)
Why does the OS show that behaviour then in the first place if it shouldn't ? It means that the OS is behaving nastily so-to-speak.
And interestingly I wasn't the only who had this experience - otherwise this post/thread didn't exist.
Anyhow, my MB Pro keeps on deciding to reboot by itself once in a while without me having any clue why it would do so and without me initiating the reboot.
Not that I am unhappy with the MB Pro in general, a nice piece of hardware, but it still shows some unexpected behaviour every now and then.
Functionality-wise there are still some bumpy pieces (but that's the application software part of the MB) like the handling and storing of the lightning events in the MB Pro database and the missing feed of the meteotemplate for more than one PM2.5, more than 4 SM and 1 lightning sensors, but there are other threads opened for that - with not reactions so far though (except that I share my experience with other users).
Looking forward to seeing improvements at that front soon, as that's about promised functionality (but either missing or not properly implemented yet).
Currently my USB stick keeps on appearing as /dev/sdc1 - and neither as sda1 nor sdb1 as it should following your post above,
and I haven't found out yet why (sometimes, rarely) it shows even as a /dev/sdb or /dev/sdc.
And it's always a stick with FAT32 and one partition only.
It shows as /dev/sda1 when inserted before booting, correct - but when inserted later, it's not always /dev/sdb1.
But your backup script covers for that as it asks for /dev/sd?1.
So all is fine as long as the USB stick is recognized by Linux as sd?1 (but sometimes it isn't).
Why to insert it later ? Because the OS of my MB Pro sometimes "forgets" the USB stick - again no clue why?
Pulling and re-inserting it makes it work again.
So the only solution is then to reboot when your Linux doesn't behave properly and shows the stick as /sdb or /sdc ???
(what it does at times - I notice that as my backups fail then, as the backup script doesn't recognize devices with a missing "1" in the end)
Why does the OS show that behaviour then in the first place if it shouldn't ? It means that the OS is behaving nastily so-to-speak.
And interestingly I wasn't the only who had this experience - otherwise this post/thread didn't exist.
Anyhow, my MB Pro keeps on deciding to reboot by itself once in a while without me having any clue why it would do so and without me initiating the reboot.
Not that I am unhappy with the MB Pro in general, a nice piece of hardware, but it still shows some unexpected behaviour every now and then.
Functionality-wise there are still some bumpy pieces (but that's the application software part of the MB) like the handling and storing of the lightning events in the MB Pro database and the missing feed of the meteotemplate for more than one PM2.5, more than 4 SM and 1 lightning sensors, but there are other threads opened for that - with not reactions so far though (except that I share my experience with other users).
Looking forward to seeing improvements at that front soon, as that's about promised functionality (but either missing or not properly implemented yet).
WH4000SE 1.6.6/1 x DP1500/4 x GW1000 1.7.7/GW1100 2.3.0/HP1000SE Pro 1.9.3//2 x WH2650 1.7.7/GW2000 3.1.0
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
2xMeteobridge Pro [B+R] 15161, 2xRPi4B-2GB/16/32 3139,VM128 1704
Weather Landing page: https://meshka.eu
Ecowitt WiKi: https://meshka.eu/Ecowitt/dokuwiki
Re: MB Pro not recognizing USB stick **solved**
Changing device descriptors and spontaneous reboots doesn't sound good. Could you please post the system protocol ("dmesg" on command line) so that I can see if there are problems with the USB connectivity.
As your issue doesn't seem to be the typical wrong partitioned/formatted USB stick one, which was my first pick, we might have a HW problem here, which is my new guess. We ll see.
As your issue doesn't seem to be the typical wrong partitioned/formatted USB stick one, which was my first pick, we might have a HW problem here, which is my new guess. We ll see.