3 Replies Latest reply on Jan 9, 2015 1:11 PM by AlexT_Intel

    Flashing doesn't erase data

    timrnd

      I'm attempting to clear off the Edison module and start with the clean image but after flashing I still have all my data.

       

      My Steps:

      1. Connect Edison to computer via USB
      2. Delete all existing files and copy over latest image
      3. Serial SSH into the device
      4. Execute reboot ota

       

      I know the reboot works because the user is root@edison not my custom name and the password is blank.  However, once I run an ls I see the folders I created before the flash and the data has remained.

       

      Thoughts on how I can completely flash the device?

       

      Thanks!

      Tim

        • 1. Re: Flashing doesn't erase data
          CMata_Intel

          Hi timrnd

           

          The reboot ota process will not erase the files in /home/root I suggest you t backup your files and erase them before the re-flashing process.

           

          Regards;

          CMata

          • 2. Re: Flashing doesn't erase data
            timrnd

            Thank you for the response CMata_Intel.

             

            What if I wanted the files in /home/root deleted as part of the flashing process?  Is there another command other than reboot ota?   Obviously, I can remove any files manually, but is there no way to restore a clean image?  I did a bunch of trial and error when setting up the module for the first time and I was hoping to go back to a clean (more or less factory) image.

            • 3. Re: Flashing doesn't erase data
              AlexT_Intel

              When you OTA the only thing, which is preserved is the contents of your /home partition and that's by design as far as I can see in the sources (you can see that yourself if you're up to that - check out the BSP in the Downloads section).

               

              Everything else (i.e. the actual OS) is rewritten. I think the idea of preserving /home is that you might have some data or configs you've created during tinkering and erasing them during firmware updates (forcing you to back it up first - and imagine if you forgot and that was the only copy) would be too inconvenient. Actually in early images it was rewriting everything and /home preservation appeared later, probably based on the user feedback.

               

              Be sure if OTA succeeded you have a clean system and if you want to remove any possible root user-level configs, just delete everything under /home/root (but not the /home/root dir itself).