rootfs reset

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

rootfs reset

1,481 Views
moose
Contributor IV

Is it possible to accommodate a rootfs reset on the device to bring it back to the original state when the image was originally flashed? Kinda like a factory reset function to wipe out any custom modifications the user made. Obviously, we can do this by reflashing the image, but we would like to implement this on the device.

Our device uses iMX8MNANO and we use yocto to build the image. Thank you.

Labels (2)
0 Kudos
Reply
7 Replies

1,445 Views
jimmychan
NXP TechSupport
NXP TechSupport

Yes. You could store the backup image in another storage device or another partition. So you could restore the image on the device.

0 Kudos
Reply

1,437 Views
moose
Contributor IV

Okay. We don't have another storage device, but we have plenty of space on our mmc flash. Could you please provide instructions or documentation on how we could store another image and trigger the reload of this image? Thanks!

0 Kudos
Reply

1,392 Views
jimmychan
NXP TechSupport
NXP TechSupport
0 Kudos
Reply

1,362 Views
moose
Contributor IV

@jimmychan the link you provided is in regards to OTA (software update over-the-air). I am asking for the recommended way to reset the rootfs to the original image state. This is something done locally and doesn't require software update or network connection to that matter. Similar to how most Linux devices offer factory reset.

0 Kudos
Reply

1,340 Views
jimmychan
NXP TechSupport
NXP TechSupport

I think you could simply store the backup rootfs image in a backup partition. And then run a script that contain linux commands for formatting the rootfs partition, and extract a .tar.gz rootfs image file to there.

0 Kudos
Reply

1,309 Views
moose
Contributor IV

That could work. Could you please provide the instructions for how you would implement this? This is a common use case and clear instructions would be very helpful. Thank you.

0 Kudos
Reply

1,294 Views
jimmychan
NXP TechSupport
NXP TechSupport

The linux commands like "fdisk" for creating partition, "mkfs.ext4" for formatting, "tar" for extracting the compressed file and etc. You may refer to the Linux User's guide (https://www.nxp.com/docs/en/user-guide/IMX_LINUX_USERS_GUIDE.pdf) for more details. 

0 Kudos
Reply