Reinstall stretch on a RevPiFlat
-
- Posts: 6
- Joined: 08 Oct 2021, 12:18
Reinstall stretch on a RevPiFlat
Hello
I am currently developing a IIoT device based on a RevPiFlat. Because this is the development phase and I knew something would eventually go wrong down the line I got myself a Raspberry Pi CM3 I/O board so I could reprogram the Compute module of the Flat. As a sidenote I know you are not supposed to do that but I’d still be nice if the cooler would not interfere with the header pins on the board… As expected, something did eventually go wrong and I wanted to reinstall the provided raspian stretch image from your website. Installing it worked fine but when booting for the first time you have to configure the system (enter model, serial number and MAC address) and there is no option to configure it as a “flat”. I tried installing buster as a test to see if my method works and there, I get the option to configure the device as a flat and then it works just as expected. Sadly, this is no use to me since I want to develop on the OS the flat actually ships with and I have software that is currently only supported for stretch. How can I install a stretch image on my CM3 and configure it to work as a flat? Seeing as they come with stretch installed it ought to be possible somehow.
Thanks
I am currently developing a IIoT device based on a RevPiFlat. Because this is the development phase and I knew something would eventually go wrong down the line I got myself a Raspberry Pi CM3 I/O board so I could reprogram the Compute module of the Flat. As a sidenote I know you are not supposed to do that but I’d still be nice if the cooler would not interfere with the header pins on the board… As expected, something did eventually go wrong and I wanted to reinstall the provided raspian stretch image from your website. Installing it worked fine but when booting for the first time you have to configure the system (enter model, serial number and MAC address) and there is no option to configure it as a “flat”. I tried installing buster as a test to see if my method works and there, I get the option to configure the device as a flat and then it works just as expected. Sadly, this is no use to me since I want to develop on the OS the flat actually ships with and I have software that is currently only supported for stretch. How can I install a stretch image on my CM3 and configure it to work as a flat? Seeing as they come with stretch installed it ought to be possible somehow.
Thanks
- crismancich
- KUNBUS
- Posts: 40
- Joined: 05 Jan 2021, 11:25
- Location: Hamburg
- Contact:
Re: Reinstall stretch on a RevPiFlat
Hi,
thanks for your question. First of all as you already know the RevPi Flat was built in a way that you can not modify the OS Image easily at least not without breaking the seals and using the CM3 IO Board as you did. Please note that we offer a service to flash new images on existing hardware so that the warranty on the hardware stays untouched.
Anyway: What you did is the correct way. We would have expected the flat option to be available after flashing Jessie.
We will now try to replicate this and get in touch with you how you should proceed.
If you want to run your application in production you might run into a problem: New flats will be prodduced with buster. So if you need to run the jessie based software, you will either have to use our paid service for flashing or go the same way as you did with this module and lose the warranty for the devices. We also still have a number of RevPi Flat in stock that were flashed with Jessie. But maybe it would be woth a thought geeting the software to run on Buster.
thanks for your question. First of all as you already know the RevPi Flat was built in a way that you can not modify the OS Image easily at least not without breaking the seals and using the CM3 IO Board as you did. Please note that we offer a service to flash new images on existing hardware so that the warranty on the hardware stays untouched.
Anyway: What you did is the correct way. We would have expected the flat option to be available after flashing Jessie.
We will now try to replicate this and get in touch with you how you should proceed.
If you want to run your application in production you might run into a problem: New flats will be prodduced with buster. So if you need to run the jessie based software, you will either have to use our paid service for flashing or go the same way as you did with this module and lose the warranty for the devices. We also still have a number of RevPi Flat in stock that were flashed with Jessie. But maybe it would be woth a thought geeting the software to run on Buster.
Viele Grüße / Kind regards / Quapla’ / 此致敬意
Boris Crismancich
Boris Crismancich
- p.rosenberger
- KUNBUS
- Posts: 90
- Joined: 03 Jul 2020, 11:07
Re: Reinstall stretch on a RevPiFlat
Hi Boris,
just for clarification. We never had a Jessie image for the RevPi Flat! I think you meant Stretch.
The Stretch image for the RevPi Flat is not the same as the image you can download. We needed to make some changes to the image which are not compatible with our other devices. With our Buster image we have managed to unify the images again.
I would really recommend to use our Buster image¹ as we will not support the Stretch image for long. Even the Debian will end support for Stretch June 30, 2022.
Best Regards
Philipp
PS:
¹ Our Buster image has currently a bug regarding WiFi on Flat. We are in the process of fixing that.
just for clarification. We never had a Jessie image for the RevPi Flat! I think you meant Stretch.
The Stretch image for the RevPi Flat is not the same as the image you can download. We needed to make some changes to the image which are not compatible with our other devices. With our Buster image we have managed to unify the images again.
I would really recommend to use our Buster image¹ as we will not support the Stretch image for long. Even the Debian will end support for Stretch June 30, 2022.
Best Regards
Philipp
PS:
¹ Our Buster image has currently a bug regarding WiFi on Flat. We are in the process of fixing that.
-
- Posts: 6
- Joined: 08 Oct 2021, 12:18
Re: Reinstall stretch on a RevPiFlat
Thank you both for your quick answers.
@crismancich
It is very good to know that you offer a service to flash new images onto the flat without voiding warranty. Sadly, for developing this is not an option for me since I need a way of quicky and reliably going back to a clean system to start from should things go wrong or if I want to test things like automated first-time setup. For production scenarios I will defiantly keep it in mind though. Is this service available through your website or do I need to contact your support directly about it?
@p.rosenberger
So that means there is no way for me to get your officially supported stretch image for a RevPi Flat ? As for both your recommendations to switch to Buster I absolutely agree with you that this would be preferable to staying on an outdated OS. Sadly my application relies on using Azure IoT Edge and for now the only OS they support is Stretch as can be seen here. I will try to find a workaround to make it run on Buster but should that fail the only option for now is to stay on Stretch until official support for Buster arrives.
@crismancich
It is very good to know that you offer a service to flash new images onto the flat without voiding warranty. Sadly, for developing this is not an option for me since I need a way of quicky and reliably going back to a clean system to start from should things go wrong or if I want to test things like automated first-time setup. For production scenarios I will defiantly keep it in mind though. Is this service available through your website or do I need to contact your support directly about it?
@p.rosenberger
So that means there is no way for me to get your officially supported stretch image for a RevPi Flat ? As for both your recommendations to switch to Buster I absolutely agree with you that this would be preferable to staying on an outdated OS. Sadly my application relies on using Azure IoT Edge and for now the only OS they support is Stretch as can be seen here. I will try to find a workaround to make it run on Buster but should that fail the only option for now is to stay on Stretch until official support for Buster arrives.
Re: Reinstall stretch on a RevPiFlat
Hi Daniel,
Azure IoT Edge runs also on buster. If you're using the debian packages you might run into an issue with the missing libssl1.0.2 (buster comes with libssl1.1). In order to solve this issue you have to options:
1) Install library beforehand with: sudo apt install libssl1.0.2
2) Build debian buster packages with libssl1.1 support as mentioned here https://github.com/Azure/iotedge/issues ... -517080427
Nicolai
Azure IoT Edge runs also on buster. If you're using the debian packages you might run into an issue with the missing libssl1.0.2 (buster comes with libssl1.1). In order to solve this issue you have to options:
1) Install library beforehand with: sudo apt install libssl1.0.2
2) Build debian buster packages with libssl1.1 support as mentioned here https://github.com/Azure/iotedge/issues ... -517080427
Nicolai
-
- Posts: 6
- Joined: 08 Oct 2021, 12:18
Re: Reinstall stretch on a RevPiFlat
Thanks a lot! I just tried with a fresh install of buster on a RevPi Flat and it works like a charm.
Some notes if anyone finds this in the future:
I followed the official Microsoft guide on how to set up a device for IoT Edge until they tell you to install the container engine. There I ran into an error ( E: Unable to locate package moby-engine) which I reported here. My workaround, for now, is to follow this guide to install the moby engine and then proceed with the official guide. The following code bit allowed me to install the moby engine:
EDIT: Changed the code listing after retesting my solution on a completely fresh reinstall of Buster and discovering some more issues.
Please note that this is an excerpt from a small setup script I wrote. I have attached the full version of this script as well as a cut-down version containing just the code listed above to this comment. Please note that this is my first time writing scripts so they are probably written in a less than an ideal manner. I have fully tested them on a fresh install of Buster though so they should work. If you want to know how to use these scripts please refer to this tutorial.
This is where I found out how to stop apache from automatically starting.
If anybody needs more information feel free to ask your questions here. I have been trying to get this to work for way longer than id like to admit and if I can spare you that experience I'd be happy to oblige.
Some notes if anyone finds this in the future:
I followed the official Microsoft guide on how to set up a device for IoT Edge until they tell you to install the container engine. There I ran into an error ( E: Unable to locate package moby-engine) which I reported here. My workaround, for now, is to follow this guide to install the moby engine and then proceed with the official guide. The following code bit allowed me to install the moby engine:
EDIT: Changed the code listing after retesting my solution on a completely fresh reinstall of Buster and discovering some more issues.
Code: Select all
echo ""
echo "Disables the apache2 webserver running pictory to unblock port 443"
echo ""
sudo systemctl disable apache2
echo ""
echo "Preparing to install moby according to the official tutorial https://docs.microsoft.com/en-us/azure/iot-edge/how-to-provision-devices-at-scale-linux-tpm?view=iotedge-2018-06&tabs=physical-device"
echo ""
sudo curl https://packages.microsoft.com/config/debian/stretch/multiarch/packages-microsoft-prod.deb > ./packages-microsoft-prod.deb
sudo apt -y install ./packages-microsoft-prod.deb
sudo apt update
echo ""
echo "Preparing to install moby using the unnoficial tutorial https://dev.to/azure/azure-iot-edge-on-raspberry-pi-buster-plus-tips-for-raspberry-pi-4-22nn"
echo ""
sudo curl https://packages.microsoft.com/config/debian/stretch/multiarch/prod.list > ./microsoft-prod.list
sudo cp ./microsoft-prod.list /etc/apt/sources.list.d/
sudo curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo cp ./microsoft.gpg /etc/apt/trusted.gpg.d/
sudo apt update
echo ""
echo "Installing the moby engine"
sudo apt update
sudo apt -y install -y moby-engine
sudo apt update
echo ""
echo "Installing IoT Edge"
echo ""
sudo apt update
sudo apt -y install iotedge
echo ""
echo "If everything succeeded you should see entries for the following software:"
echo ""
echo "IoT Edge"
sudo iotedge -V
echo ""
echo "Docker (azure version)"
sudo docker -v
echo ""
This is where I found out how to stop apache from automatically starting.
If anybody needs more information feel free to ask your questions here. I have been trying to get this to work for way longer than id like to admit and if I can spare you that experience I'd be happy to oblige.
Last edited by Daniel RFAG on 02 Dec 2021, 16:41, edited 1 time in total.
Re: Reinstall stretch on a RevPiFlat
Thanks for your feedback, especially for letting others know how you solved the remaining obstacles!
Nicolai
Nicolai