How to 'factory reset'/reinstall OS on the Intel Edison - intel-edison

I've filled up my Intel Edison 100% and have no room for anything more. I've emptied all logs and am still at 100%. I decided I want to factory reset and reorganize next time with the SD card better. Unfortunately I cannot find out how to reinstall completely the OS.
I've tried downloding the Yocto linux image off the intel downloads page, and uploading that to the Edison. However, it still is running the same as before...
For some reason I distinctly remember (pretty sure anyway...) reading a command to 'reset' everything. I just can't find any documentation now that I need it. Does anyone know how to do this?

Found the command, it's reboot ota

This is my checklist
Install dfu-util (on Linux: sudo apt-get install dfu-util)
Download Release 3.0 Yocto* complete image and unzip it
Connect the module using both USB connectors.
Run sudo ./flashall.sh --recovery
Wait for the script to finish and then a few extra minutes for the module to boot.
I've found one USB hub that didn't work, I had to connect directly to the USB port on the computer.
I'm not sure if you need both usb connectors but at least the one for main power is needed.
flashall.sh is found in the unzipped directory.

Related

RPI/Raspbian SocketCAN configuration issues

Python and RPi n00b here. Trying to get CANopen working on my RPI, and think I'm 8/10s of the way to communicating.
Target device is an RPi 3+ with fairly pedestrian install of Raspbian Buster and 5.4.51-v7+ linux kernel, attached to Kvaser Leaf USB CANopen adapter. CANopen adapter hardware is known to be good, works well with Windows software.
Relevant info:
-Installed can-utils
-Installed python-can 4.0.0
-Appear to have installed Kvaser drivers successfully (finally got make to complete without errors)
-vcan appears to work fine - have successfully transmitted and received test packets with this handy virtual can adapter using can-utils
I can set up the can socket initially:
sudo modprobe can
but when I try to initialize actual hardware, it fails and gets the following error:
sudo ip link add dev can0 type can
RTNETLINK answers:Operation not supported
Obviously I'm missing something, but cannot figure out what. I notice that others have had similar issues (though different hardware). Please advise of solutions and TIA.
You'll need to uninstall CANlib and then reboot for socketcan to work.
Follow this procedure:
Download the linuxcan tarball again if you no longer have it: http://www.kvaser.com/downloads
Extract linuxcan: tar -xf linuxcan.tar.gz
Inside of the linuxcan directory, run make to build everything which is required before you can uninstall
Now uninstall CANlib with sudo make uninstall
You should see something like the following:
Uninstalling pciefd
Remove SocketCAN Kvaser PCI driver from blacklist.
Uninstalling pcican2
Remove SocketCAN Kvaser PCI driver from blacklist.
Uninstalling pcican
Remove SocketCAN Kvaser PCI driver from blacklist.
Uninstalling virtualcan
Uninstalling usbcanII
Remove SocketCAN Kvaser USB driver from blacklist.
Uninstalling mhydra
Uninstalling leaf
Remove SocketCAN Kvaser USB driver from blacklist.
Uninstalling common
Now you can reboot and the ip link commands should work.
You need to uninstall "Kvaser Linux Drivers and SDK" and install "Kvaser SocketCAN device driver".

Raspbian update independent of Motioneyeos update?

I have installed Motioneyeos on a Pi Zero and on a Pi2, and it works like a charm in both of them. The control of the 2 systems can be unified on the web server of any one of them. The web interface is clear and allows to customize hundreds aspects of the program. Anything perfect so far.
Trying to understand a little bit how does it work, I have logged to one of the 2 Pis through ssh and I have checked that the OS is kept to a bare minimum. uname -r returns 4.19.65.
On the web interface of the app it is possible to check if the last version of the program is the one running. I have checked, and yes, I have the last version.
My question is: does it make sense to upgrade the OS components used by the program (apt update, apt dist-upgrade) even if the last version of the program is the one running in my Pis? Apt is not even installed, so the first thing would be to bring it there and install it, but I am afraid that if I update the OS, the program may stop to work...
I answer myself thanks to the feedback received in another forum. Motioneyeos is an embedded software based on Buildroot and as such it is not possible to install any package on it. To be able to install a package on Motioneyeos, Motioneyeos has to be installed on an full OS as Raspbian following the instructions in Motioneyeos web ==>>

RPI Zero - software installation from SD card

I bought a RPI Zero for some projects. The problem is that this version of RPI does not have WIFI and only USB is used for keyboard.
Is it possible to install software like pip3 / guizero / ... via SD card?
You can use qemu static along with chroot on the root file system of your SD card as a preparation phase.
Here is a small script to do it:
cp /usr/bin/qemu-arm-static <sdcard>/usr/bin/
chroot <sdcard> bash -c "apt-get install ..."
rm <sdcard>/usr/bin/qemu-aarch64-static
You can also have a look at: https://wiki.debian.org/RaspberryPi/qemu-user-static
Yes, but I don't recommend it. You can download the .deb files, copy them to the sd card, and install them using
dpkg -i <package name>
But this has several disadvantages. You cannot use apt package manager without internet connection. You need to install all the dependencies as well, thus can be 10 packages or even much more. And you would need to update manually as well ... a nightmare.
Your options apart from this, you need an USB hub:
1) Get a cheap wifi stick (about $5)
2) If you have your mobile phone, you can enable USB Tethering. This will share your phones internet connection with the RPi.
Comment if you need my help to configure this. But it's easy.

Raspberry Pi wont remove OpenElec and Kodi

I have gotten a used Raspberry Pi 3 Model B (bought used).
I formatted the SD-Card and downloaded Raspbian Stretch Lite. When I turned on the Pi, somehow it opened Openelec with Kodi.
I tried it again and again. I went and tried to install NOOBS instead. Same thing happens. It opens OpenELEC and Kodi.
I have formatted the SD-Card using a Windows 10 PC. Triied it with the "Quick formating" option on and off. After formating, the SD-Card seems to be empty, as far as I can tell from Windows explorer.
Since I dont really need the GUI, it wouldnt be so bad when I could just use ssh to get a terminal and do the work I want to do. However, Openelec disabled basic things like apt-get. When I try it, the following message appears:
There is no working 'apt-get'.
'apt-get' is a command to install, update and remove software which
is stored in a non local repo. 'apt-get' does nothing then connecting to such
repo, downloads the software, unpacks the software, updates a big
local database with all filepaths and other informations about the
installed software or removes or updates installed Software.
With OpenELEC it is not possible to change the system for security and
stability reasons so even 'apt-get' would not be able to do this.
We also dont have and want to maintain such a repo for various other
great reasons.
Also Ubuntu or Debian packages are often outdated and not compatible
with OpenELEC
TIP: use XBMC's addon browser to enhance your OpenELEC system
I cant exmplain that behaviour. To my knowledge, the Pi should not have any type of internal storage. So I dont understand how the old OS can still be there after I format the SD-Card for the 5th time (no other data storage medium connected). Noobs and Raspbian shouldnt have anything to do with Kodi or Openelec so I do not undestand how it keeps coming up. I have tried to look for a solution online but couldnt find anything but how to install the software that I want to get rid of.
Does anybody know how I can remove Openelec and Kodi so that I can have a normal Raspbian distribution installed? Thanks in advance!
You formatted the microSD card on your PC and it still boots into Openelec? Did you write the Raspbian Lite image onto the card? It seems that you haven't actually modified the contents of the card.
I strongly recommend getting Etcher to write bootable images; you don't even have to decompress the downloaded image, Etcher will do that for you. Etcher is pretty smart at figuring out which media is your microSD card, but as always when working with tools that can overwrite disks be careful.

Install device driver silently on Windows XP

Is there a way to programmatically install device driver silently without cat file and without connecting the device on Windows Xp?
I'm using DriverPackageInstall function from Windows Driver Kit. And I can install driver only if device is attached. In other case I get an error: ERROR_NO_SUCH_DEVINST. But that method works fine with Windows Vista.
Another problem is warning dialog that asks user to continue or stop installation because cat file is missing . It shows on both OSes.
Any ideas?
You're not going to get past the signing prompt, as this is baked pretty far into windows, but there is a tool in the DDK called devinst that works well for device installations.
There's Source Code included with it.
The only way to avoid any UI interaction caused by your driver being unsigned is to hackishly preinstall the driver by modifying the registry directly.
Yes, it can be done. You'd have to modify the ACLs on the HKLM\System\CurrentControlSet\Enum registry key run as SYSTEM (by installing yourself as a service or using Sysinternals psexec -s), and add all the registry keys which Windows device installation would usually add - on your own. This will only work if you can predict precisely what your device's Device Instance ID would be -- e.g. in case of a USB device, the precise port it'd be connected to etc.
This is hacky, but the result would be the device being essentially "preinstalled". It'll be a lot of work, and it'll break on Windows Vista.
Microsoft really wants you to go the WHQL way on Windows XP, sorry :(