Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4019) - 03 April 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Start CumulusMX @reboot from USB stick

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

User avatar
andrew_sinclair
Posts: 85
Joined: Thu 04 Nov 2010 8:15 pm
Weather Station: Davis VP2 Plus c/w DFARS
Operating System: Buster rPi
Location: Cheddar, Somerset
Contact:

Start CumulusMX @reboot from USB stick

Post by andrew_sinclair »

Hello,

I have recently decided to move my CumulusMX from the micro SD to a USB stick. Everything works fine when I 'manually' change directory to /media/pi/CUMULUS/Cumulus3107 and start CumulusMX using the command sudo mono CumulusMX.exe command.

I then went to change my crontab from

Code: Select all

# Start Cumulus as background task 30s after reboot (delay to allow WiFi to startup)
@reboot (sleep 30;cd /home/pi/CumulusMX3107;sudo mono CumulusMX.exe) &
# Reboot each day at 0253
53 02 * * * sudo reboot
#inactive line at the end
to

Code: Select all

# Start Cumulus as background task 30s after reboot (delay to allow WiFi to startup)
@reboot (sleep 30;cd /media/pi/CUMULUS/CumulusMX3107;sudo mono CumulusMX.exe) &
# Reboot each day at 0253
53 02 * * * sudo reboot
#inactive line at the end
but CumulusMX does not start 30 seconds after reboot. Have I got the root cd /media/pi/CUMULUS/CumulusMX3107 correct or is there anything else I am missing?

Thanks

Andrew
Last edited by andrew_sinclair on Sun 21 Feb 2021 8:08 pm, edited 1 time in total.
Windy: f065d04a
freddie
Posts: 2469
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: Start CumulusMX @reboot from USB stick

Post by freddie »

It could be that the job is being fired before the usb drive is ready - but then you should see some errors in your syslog.

Have you tried using the systemd startup method - i.e. run MX as a service?
Freddie
Image
User avatar
andrew_sinclair
Posts: 85
Joined: Thu 04 Nov 2010 8:15 pm
Weather Station: Davis VP2 Plus c/w DFARS
Operating System: Buster rPi
Location: Cheddar, Somerset
Contact:

Re: Start CumulusMX @reboot from USB stick

Post by andrew_sinclair »

@freddie,

I did wonder about the timing aspects, I might change the 30s to 60s.

I haven't tried running as a service yet, mainly because I am on a learning curve and haven't quite taken to plunge. I thought what may be a good idea was to purchase a Pi Zero and then run it as a service on that.
Windy: f065d04a
User avatar
andrew_sinclair
Posts: 85
Joined: Thu 04 Nov 2010 8:15 pm
Weather Station: Davis VP2 Plus c/w DFARS
Operating System: Buster rPi
Location: Cheddar, Somerset
Contact:

Re: Start CumulusMX @reboot from USB stick

Post by andrew_sinclair »

Quick update, changing 30s to 60s delay after startup has solved the problem, thanks @freddie.
Windy: f065d04a
User avatar
galfert
Posts: 195
Joined: Tue 03 May 2016 2:57 pm
Weather Station: Ecowitt GW1000
Operating System: Mint, Raspberry Pi OS, Synology
Location: Orlando, FL

Re: Start CumulusMX @reboot from USB stick

Post by galfert »

I don't think the delay is going to solve your problem. The Raspberry Pi OS will not automount the USB drive unless you log in. If your Pi suddenly reboots (power outage), then the USB drive no matter how long you wait will not be mounted. Unless you have the Pi set to auto-login....which I think is not advisable for many reasons.

Therefore the better solution is to do as Freddie mentioned and use systemd startup method.

You can follow my guide:
viewtopic.php?f=40&t=18766
Last edited by galfert on Sat 20 Feb 2021 7:15 pm, edited 1 time in total.
Ecowitt GW1000 | Meteobridge RPI | CumulusMX on Synology NAS
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Tele-Pole flag pole
User avatar
andrew_sinclair
Posts: 85
Joined: Thu 04 Nov 2010 8:15 pm
Weather Station: Davis VP2 Plus c/w DFARS
Operating System: Buster rPi
Location: Cheddar, Somerset
Contact:

Re: Start CumulusMX @reboot from USB stick

Post by andrew_sinclair »

@galfert,

Thanks for the link. I need to grit my teeth and go for it.

😬
Windy: f065d04a
User avatar
galfert
Posts: 195
Joined: Tue 03 May 2016 2:57 pm
Weather Station: Ecowitt GW1000
Operating System: Mint, Raspberry Pi OS, Synology
Location: Orlando, FL

Re: Start CumulusMX @reboot from USB stick

Post by galfert »

Another recommendation is to not use an SD card at all. Setup and boot the Raspberry Pi directly from your USB hard drive. It will run much faster if you use an SSD.
Ecowitt GW1000 | Meteobridge RPI | CumulusMX on Synology NAS
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Tele-Pole flag pole
User avatar
andrew_sinclair
Posts: 85
Joined: Thu 04 Nov 2010 8:15 pm
Weather Station: Davis VP2 Plus c/w DFARS
Operating System: Buster rPi
Location: Cheddar, Somerset
Contact:

Re: Start CumulusMX @reboot from USB stick

Post by andrew_sinclair »

😱
Windy: f065d04a
User avatar
mcrossley
Posts: 12756
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Start CumulusMX @reboot from USB stick

Post by mcrossley »

galfert wrote: Sat 20 Feb 2021 7:18 pm Another recommendation is to not use an SD card at all. Setup and boot the Raspberry Pi directly from your USB hard drive. It will run much faster if you use an SSD.
:thumbsup:
I have done this with both my Pi 3B, and my Pi 4. A much better solution all round.

Note the 3B boot from SSD is a one way thing, once you have configured it is permanent and there is no going back.
The Pi4 is much more flexible, it will boot preferentially from the SSD, but if there are issues it will revert to booting from the SD card if one is present.
User avatar
andrew_sinclair
Posts: 85
Joined: Thu 04 Nov 2010 8:15 pm
Weather Station: Davis VP2 Plus c/w DFARS
Operating System: Buster rPi
Location: Cheddar, Somerset
Contact:

Re: Start CumulusMX @reboot from USB stick

Post by andrew_sinclair »

@galfert and @mrcrossley

Just for my own technical edification under what circumstances is the speed of running an issue?

My Pi is dedicated to running CumulusMX and seems to me, a layman, the running of execution is fine.

The only reason I moved Cumulus to a USB stick was to reduce wear and tear on the SD card.

Thank you

Andrew
Windy: f065d04a
User avatar
galfert
Posts: 195
Joined: Tue 03 May 2016 2:57 pm
Weather Station: Ecowitt GW1000
Operating System: Mint, Raspberry Pi OS, Synology
Location: Orlando, FL

Re: Start CumulusMX @reboot from USB stick

Post by galfert »

If you only run Cumulus MX on the Pi with the SD then you will probably not notice the difference unless you are pulling some historical reports, or do database backups. However when you do operating system updates, when you reboot, you will notice the difference in performance. But is very responsible to decide to not use the SD card for database storage.
Ecowitt GW1000 | Meteobridge RPI | CumulusMX on Synology NAS
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Tele-Pole flag pole
User avatar
galfert
Posts: 195
Joined: Tue 03 May 2016 2:57 pm
Weather Station: Ecowitt GW1000
Operating System: Mint, Raspberry Pi OS, Synology
Location: Orlando, FL

Re: Start CumulusMX @reboot from USB stick

Post by galfert »

mcrossley wrote: Sat 20 Feb 2021 9:05 pm Note the 3B boot from SSD is a one way thing, once you have configured it is permanent and there is no going back.
For clarification...regarding the PI 2B v1.2, 3A+, 3B, Compute Module 3, 3+, the no going back is in reference to the OTP bit (One-Time-Programable) memory. Which means you can't disable it. But you can still boot from SD card if you don't have a USB drive to boot from.

https://www.raspberrypi.org/documentati ... des/msd.md
Ecowitt GW1000 | Meteobridge RPI | CumulusMX on Synology NAS
WU: KFLWINTE111  |  PWSweather: KFLWINTE111
CWOP: FW3708  |  AWEKAS: 14814
Windy: pws-f075acbe
Tele-Pole flag pole
SamiS
Posts: 373
Joined: Sun 27 Feb 2011 5:13 pm
Weather Station: Ecowitt HP2551 & GW1100
Operating System: Raspberry Pi OS
Location: Kangasala, Finland

Re: Start CumulusMX @reboot from USB stick

Post by SamiS »

andrew_sinclair wrote: Sat 20 Feb 2021 11:12 pm Just for my own technical edification under what circumstances is the speed of running an issue?
.....
The only reason I moved Cumulus to a USB stick was to reduce wear and tear on the SD card.
I have run CumulusMX from SD card since 2018 without an issue. If you use a good quality power supply with a good quality card, and MX is the only ”active” usage of the Pi, it should run for years without any problems. Of course eventually the card will probably become unreliable, but replacing it proactively once in 3-5 years or something like that doesn’t take much effort.

For example Kingston’s High Endurance cards are warranted for 3 years of continuous full hd recording with 13Mbps bitrate. That means an endurance of over 5,8 gigabytes of write every hour for 3 years totalling about 150TB of writes! If CumulusMX would write 1GB/day (probably an overestimate), that would mean a card endurance of over 400 years. Of course the operating system also writes to the card, but this gives at least some perspective.
User avatar
andrew_sinclair
Posts: 85
Joined: Thu 04 Nov 2010 8:15 pm
Weather Station: Davis VP2 Plus c/w DFARS
Operating System: Buster rPi
Location: Cheddar, Somerset
Contact:

Re: Start CumulusMX @reboot from USB stick

Post by andrew_sinclair »

@SamiS

Thanks for the information, that does indeed give some perspective. I am concerning myself over nothing perhaps 👍
Windy: f065d04a
User avatar
andrew_sinclair
Posts: 85
Joined: Thu 04 Nov 2010 8:15 pm
Weather Station: Davis VP2 Plus c/w DFARS
Operating System: Buster rPi
Location: Cheddar, Somerset
Contact:

Re: Start CumulusMX @reboot from USB stick

Post by andrew_sinclair »

@freddie and @galfert
galfert wrote: Sat 20 Feb 2021 5:04 pm Therefore the better solution is to do as Freddie mentioned and use systemd startup method.
I have taken the plunge and all seems to be working well apart from when I reboot. The service should start automatically but it fails because it cannot change diectory. I suspect this is because the USB is taking a finite time to become avaiable. I had the same problem with crontab and the solution was to increase sleep 30 to sleep 60 to allow sufficient time. Can the execution of the autostarting of cumulus.service be delayed?
Windy: f065d04a
Post Reply