Home folder files lost after SWupdate

Hi @Stefano,

I updated to 0.7.0 yesterday using the .swu file and the built-in webserver on ElkOS 0.6.0. It worked well.

One thing that I was not expecting: all of my own files which were in the /home/mind folder were gone after the update. I don’t think that is mentioned in the documentation. I’m not sure if other user files would have been removed in other directories as well.

Take care,

  • Rick

Hi Rick,
it was mentioned in the Partition layout section of the documentation but you’re absolutely right, we should write a big warning on the SW update part itself!

Working on it now.

However, for a single SW update you didn’t really lost your previous data in your home folder. It is still there in the other rootfs that is not currently mounted.

If you type lsblk -f you should get something like this:

elk-pi:~$ lsblk -f
|-mmcblk0p2                   /
`-mmcblk0p4                   /udata

There’s always only one between mmcblk0p2 and mmcblk0p3 mounted to /. In my case, I can for example mount the previous rootfilesystem to /mnt with:

sudo mount /dev/mmcblk0p3 /mnt

and then you can temporarily access your files from there. Otherwise, you can use elk_system_utils to switch the rootfs that is selected at boot with the ``–default-rootfs` option.

Our recommendation is to keep all your working stuff in /udata, which will not change during a software update.

HI @Stefano,

Thanks again. I know that we are going way off topic here. I didn’t lose any important files when I updated. I now see the big warning in the Layout section!

It seems like we should store our Sushi plugin, our config.json file, and all of our plugin’s support files in /udata in order to be preserved across system updates. Would you recommend then adding soft links to /home/mind for the plugin and config files or just launching from the command line with a path that begins with /udata?


  • Rick

Hi Rick,

(moved the discussion to a separate topic so no risk of going OT anymore).

That’s entirely up to your personal taste. Personally, I just keep everything in /udata but nothing forbids you to add the symlinks in the home folder (you’ll loose the symlinks after an update, though).

Also, consider that this is just for easy development on the board. Once you have a working plugin and you want to deploy it to an Elk system, you should create a Yocto recipe so that it goes in the appropriate place in the rootfilesystem, which is typically mounted as read-only for production images.

Yocto/OpenEmbedded can be quite tricky at the beginning but we have plans for making easy tutorials for the most common tasks, and we organized our distribution to make things simpler.

1 Like