Page 1 of 1

CMX/SSD installation on RPi

Posted: Wed 11 Jan 2023 9:26 am
by HansR
Does anybody have a recipe on how to install CMX on an SSD attached to the RPi?
The Wiki has nothing and the search words for the forum (e.g. 'CMX on SSD' are too short).

And when I say recipe I mean recipe i.e. a series of commands / short description. Not a novel.

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

Recipe for installing and using an SSD on the RPi based on my experience so far and the reactions below.
When ready, the RPi will boot from the SSD and run CMX from the pi account.
There are no doubt many other possibilities but diversification will or may confuse the lesser gods of technology who may be good meteorologists therefore only one line is chosen.

I. Prepare an SSD from scratch
  1. Prepare your SSD to boot from USB (see various doc on the net)
  2. Buy a good SSD i.e. one UAS-capable, a Sata-III interface and a Sata-III to USB 3.1 interface cable (3.0 will work but if you need to buy do a 3.1).
  3. Connect the drive to your PC, startup Raspberry Pi Imager (Balena Etcher or Windows imager work as well reports say).
  4. Select the OS (the standard first option), select the device (your SSD) and use the setup gear button. Fill in according to your infrastructure. If you will be using wifi, fill it in now.
  5. When done, write the OS
  6. Disconnect from Windows and attach to the RPi. Start the RPi and check you can login and everything works.
  7. Update the OS (apt update ; apt full-upgrade; )
  8. Install Mono (according to this site or whatever method as long as it is version 6.12.0.182)
  9. Reboot
  10. Install or restore your CMX version to wherever you wish, the preferred directories are /, /home or /home/pi, including your systemd entry (if you wish to run as a daemon) and your crontab entries.
  11. Check your CMX starts OK (from commandline) and does everything you expect
  12. Enable the daemon if you wish
  13. Remove any SD-card and reboot
II. Prepare an SSD with VNC Card Copier:

This assumes you have an operational RPi with CMX running as wanted.
  1. Prepare your RPi (enable the VNC server and set a proper resolution) for using VNC, get the viewer and register here: https://realvnc.com.
  2. Connect the SSD disk
  3. Login with the VNC viewer, goto Accessories=>SD card copier
  4. Copy your SD-card to the SSD
  5. Power off
  6. Remove SD-card and reboot.
If necessary the above will be corrected where wrong so feedback is welcome below.

Re: CMX/SSD installation on RPi

Posted: Wed 11 Jan 2023 10:05 am
by water01
Hans use Berryboot and then install it on the target SSD as you would on a normal Linux operating system. Gives you the oh option of multiple Linux installs.

https://www.berryterminal.com/doku.php/berryboot

Re: CMX/SSD installation on RPi

Posted: Wed 11 Jan 2023 10:23 am
by mcrossley
Do you want to use the SSD as just an additional disk, or as your boot device and drop the SD card altogether?

If the latter, then the process is slightly different depending on if you have a rPi 3 or 4.

I have both a 3 and a 4 booting from USB SSDs.

Re: CMX/SSD installation on RPi

Posted: Wed 11 Jan 2023 10:59 am
by HansR
@water01, @mcrossley: thanks guys. Additional remarks:

It is for a Cutils user where the installation is pretty messed up and I would like to restart the installation but it really needs to be a simple recipe.
  1. Yes, a bootable SSD is the idea so that you when you login you are on that disk on your home directory. A replacement of the SDcard.
  2. BerryTerminal looks nice but it requires keyboard and monitor and otherwise a VPN connection which makes it more complex and it is another external tool.
So when I have an RPi 4, the SD card is connected AND the SSD is connected. CMX is shutdown, nothing running. Then I want to make the SSD bootable, install CMX and bypass the SD. How to go? In simple terms.

EDIT: working on it, BB may be usable but it offers only 64 RPi OS while we need 32 bit or does it all work with 64 bit?

Re: CMX/SSD installation on RPi

Posted: Wed 11 Jan 2023 11:17 am
by water01

Re: CMX/SSD installation on RPi

Posted: Wed 11 Jan 2023 11:52 am
by HansR
So additional question: does the mono/CMX combi properly work on a 64 bit OS or do I have to take precautions?

Re: CMX/SSD installation on RPi

Posted: Wed 11 Jan 2023 12:58 pm
by freddie
HansR wrote: Wed 11 Jan 2023 11:52 am So additional question: does the mono/CMX combi properly work on a 64 bit OS or do I have to take precautions?
It works. I've been using 64 bit for a long time. No precautions required.

Re: CMX/SSD installation on RPi

Posted: Wed 11 Jan 2023 3:29 pm
by HansR
OK. Thanks all.
But now after about 4 hrs of trying all kinds of possibilities to get an SSD to boot: no joy.
So end of the show for the moment.

Re: CMX/SSD installation on RPi

Posted: Wed 11 Jan 2023 7:08 pm
by Nossie
have you just not been able to get it to boot the OS from the pi?

https://singleboardbytes.com/2440/boot- ... by-usb.htm

This guide is pretty wordy, but the commands are simple

vcgencmd bootloader_config
If the BOOT_ORDER is set to 0xf14, USB boot is successfully enabled on your Raspberry Pi.

All my drives are SSD, m2 drive as the boot and USB ones external the major hurdle I found is that this flag is not always set correctly 0xf14

More details regarding the technical side here:

https://jamesachambers.com/new-raspberr ... oot-guide/

Re: CMX/SSD installation on RPi

Posted: Wed 11 Jan 2023 7:38 pm
by HansR
Nossie wrote: Wed 11 Jan 2023 7:08 pm have you just not been able to get it to boot the OS from the pi?
No.
But I normally use an USB stick of 16 Mb iso an SD card. So booting from USB should work. It is somewhere else in my experimentation.
I gave up for today ;)

Re: CMX/SSD installation on RPi

Posted: Sat 14 Jan 2023 12:41 pm
by HansR
I have managed to get the SSD running but I encounter several issues concerning performance. Having applied the techniques described here did not help and performance improved but remained bad. Also other experiments with CMX proved to create file corruptions.

So if there is one conclusion: make sure you have a good SSD.

With a good SSD and an RPi3+ or RPi4 (and up probably) it is possible to use the the SSD as boot device without the necessity to first boot from SDcard and have an SSD as a secondary device.

To have an SSD boot you may just use the Raspberry Pi Imager and put the OS on the SSD like you would with an SDcard.
Then update, install mono etc... and install CMX just as you would on the SDcard (/home/pi/CumulusMX or /home/CumulusMX. There should be no difference (with a good SSD :? ).

Re: CMX/SSD installation on RPi

Posted: Thu 19 Jan 2023 2:21 am
by f4phlyer
HansR wrote: Sat 14 Jan 2023 12:41 pm With a good SSD and an RPi3+ or RPi4 (and up probably) it is possible to use the the SSD as boot device without the necessity to first boot from SDcard and have an SSD as a secondary device.

To have an SSD boot you may just use the Raspberry Pi Imager and put the OS on the SSD like you would with an SDcard.
Then update, install mono etc... and install CMX just as you would on the SDcard (/home/pi/CumulusMX or /home/CumulusMX. There should be no difference (with a good SSD :? ).
Hans: I follow Jeff Geerling (YouTube 'The GeerlingGuy, Github (geerlingguy), and a blog) if you haven''t heard of him he he has ~455K followers and has done almost everything rPi. Here's a link to his pi-4 ssd. https://www.jeffgeerling.com/blog/2020/ ... -4-usb-ssd. Jeff has also done a lot of testing to speed up any devices he tests.

While trying to set up the SSD on my pi's I discovered the method you discovered. I'm guessing that if you wanted to have to avoid adding mono, screen etc on your own you could just use the image from the Wiki. Just make sure that the SSD boot bit in the rPi eprom is set. Also, in light of technology advances and pricing I've skipped the SSD and have gone to M.2 NVME drives in an enclosure. Just my preference.

There also is a Raspberry Pi github (https://github.com/raspberrypi) that has a lot of stuff.

And the RaspberryPi.com forum has become a better source as of late than it had been in the past. It has a lot of "threads" on the subject covering the issue.

And finally, IMO, while they're as rare as hen's teeth the rPi compute module 4 could likely supersede the rPi SBC

Re: CMX/SSD installation on RPi

Posted: Thu 19 Jan 2023 4:51 am
by HansR
f4phlyer wrote: Thu 19 Jan 2023 2:21 am Hans: I follow Jeff Geerling (YouTube 'The GeerlingGuy, Github (geerlingguy), and a blog) if you haven''t heard of him he he has ~455K followers and has done almost everything rPi. Here's a link to his pi-4 ssd. https://www.jeffgeerling.com/blog/2020/ ... -4-usb-ssd. Jeff has also done a lot of testing to speed up any devices he tests.
Thanks. I know Jeff though I don't follow but while searching he is hard to miss ;)
f4phlyer wrote: Thu 19 Jan 2023 2:21 am While trying to set up the SSD on my pi's I discovered the method you discovered. I'm guessing that if you wanted to have to avoid adding mono, screen etc on your own you could just use the image from the Wiki.
I'm just not into the image, I like to have full control and knowledge 8-)
f4phlyer wrote: Thu 19 Jan 2023 2:21 am Just make sure that the SSD boot bit in the rPi eprom is set. Also, in light of technology advances and pricing I've skipped the SSD and have gone to M.2 NVME drives in an enclosure. Just my preference.
Indeed preference. I don't see the advantage as long as there is not a native slot for the the M.2 NVME drives (you want the speed don't you).
f4phlyer wrote: Thu 19 Jan 2023 2:21 am There also is a Raspberry Pi github (https://github.com/raspberrypi) that has a lot of stuff.

And the RaspberryPi.com forum has become a better source as of late than it had been in the past. It has a lot of "threads" on the subject covering the issue.

And finally, IMO, while they're as rare as hen's teeth the rPi compute module 4 could likely supersede the rPi SBC
Yes, you probably are right. I did not check the github but the forum indeed is often a good source.
I'll wait for the compute module to overtake the SBC :)

I'm also looking pricewise: I am now using an SSD for € 14 and I assume M.2 NVME drives will have a future as soon as they get a native slot on the RPi.

With regard to my exercise: in the end the proof of the pudding is in the eating - I learned a lot about bad devices - and as it had not been described on this forum (could not find it) I thought it was useful to publish my hands on experience (which I will do as a recipe in the first post). And further I don't have the wish to march in advance of the troops but to make sure cheap and certain technique is used which you can buy for €15 or less.

I now have both my weather PI's running on SSDs which were before running on USB memory sticks and SD-cards. The last RPi I simply did with the SD card copy tool available on the VNC: copied the whole fully installed USB stick to the SSD rebooted and ready. It does not have to be more complex than that.

From a support point of view: users which like weather more than hardware technique may be happy with a simple solution. Members more into technique will find their own solution like you did.

And now I need a good rack to hold all those loose wired devices that swarm around the house :lol:

Re: CMX/SSD installation on RPi

Posted: Thu 19 Jan 2023 6:48 pm
by f4phlyer
HansR wrote: Thu 19 Jan 2023 4:51 am From a support point of view: users which like weather more than hardware technique may be happy with a simple solution. Members more into technique will find their own solution like you did.

And now I need a good rack to hold all those loose wired devices that swarm around the house :lol:
I'm totally with you on all points, especially the quote. :clap: I follow your efforts and projects and was almost certain that you probably were aware of everything.

P.S. I just put them on a shelf in my closet along with my ADS receivers. :lol:

Re: CMX/SSD installation on RPi

Posted: Thu 19 Jan 2023 7:19 pm
by HansR
Thanks for the comments
f4phlyer wrote: Thu 19 Jan 2023 6:48 pm P.S. I just put them on a shelf in my closet along with my ADS receivers. :lol:
I don't even have a shelf atm ;)