Possible remote overwrite a memory card?

Is the Raspberry Pi 3, installed in a noteasily accessible location to the SD card which has Ubuntu Server. Is it possible any way (script or command) to carry out "reset" an installed OS (in case, for example, an incorrect configuration OS'S when it's easiest to reinstall the whole system than to clean up the tails, or to replace Ubuntu Server on some other distribution)? And if possible, how?
Comes to mind for such a script (or command separately) to install MikroTik CHR on any VPS:
CHR_VERSION=6.37
INSTALLPATH=/dev/vda

apt-get update &&
apt-get install -y unzip wget pv &&
wget http://download2.mikrotik.com/routeros/${CHR_VERSION}/chr-${CHR_VERSION}.img.zip &&
unzip chr-${CHR_VERSION}.img.zip &&
echo u > /proc/sysrq-trigger &&
pv chr-${CHR_VERSION}.img | dd of=$INSTALLPATH &&
reboot

Can it be modified?
April 4th 20 at 00:34
4 answers
April 4th 20 at 00:36
To put rpi in trudoustroeno place - it's a bad idea. The memory card under the axle - consumable. One just needed to roll under the unify controller as a temporary crutch. Card dead for 4 months.
service every 4 month I'm quite satisfied I need a solution, about all the implications I'm aware of - armani81 commented on April 4th 20 at 00:39
April 4th 20 at 00:38
I don't understand the situation in which You are going to apply the reset OSes. Modern computers are made so that OSes can spoil so that it generally will not boot - corrupt the boot loader and all. And access through the network appears only after the kernel and testing of a significant number of scripts.

Sensible option looks like the following:
  1. Is the master operating system, which never moves.
  2. Is Virt Manager.machines.
  3. Inside the virtual world.machine put the guest operating system. And in case of problems - to start the download of the guest with the distribution.
This scheme will withstand any errors made in the guest operating system.

You can also connect to a computer KVM access to the keyboard and screen through the network. And from there you can give the command to serositis from external media, where the distribution.

Some people do a modification like this:
Run the script that applies the changes and after a specified time to cancel them. If testing shows that changes are correct - make them completely. The most common use of this script for the FireWall rules.
- the hypervisor on the raspberry (3rd model, 4th), are you serious?
- to bother (read: to buy almost home) with KVM much more expensive than the card = meaningless
- concerning "damage to the OS" software and configure it: for example, all of the control panel (VestaCP etc.) require before installing a clean OS, because scripts (and man, as I understand it), faster to reinstall the OS and put the panel from scratch than to deal with configs already installed and configured ON - armani81 commented on April 4th 20 at 00:41
Well, I've considered the possibility.

Now, if You will control the system through control panel - then there is real hope that the control panel will not allow spoilage of the OS. Because the authors probably avoid hazardous operations.
But "manual" control of the operating system - in principle, could spoil anything. And I gave advice on this case. - annamarie.Howell84 commented on April 4th 20 at 00:44
April 4th 20 at 00:40
well, you can try the trail version -
or PXE booting in case of failure, boot from the card
or download 2 version with flash, which already raised some liveCD
April 4th 20 at 00:42
Your solution is Docker.
On Malinka I put the OS on the OS Docker and create container (roughly speaking a virtual machine) with the desired OS. The primary OS under any circumstances don't touch, and one that spins in the container can do anything, and when you decide to move, then the old container is removed from the image and move the new container and all.

There is nothing complicated. The documentation of Docker good clips on YouTube about him a lot.
about Docker in the course, but whether it will be barely tolerable to work on the 3rd malinke? - armani81 commented on April 4th 20 at 00:45
@armani81, docker fine on 3 malinke works. There is more a question in what you have there is spinning and whether sufficient resources for this ligament. Well, there is only experimentation will help. - audra.Prosacco commented on April 4th 20 at 00:48

Find more questions by tags UbuntuRaspberry Pi