mmgen / mmgen-geek-tools

Random scripts to make a geek’s life easier
GNU General Public License v3.0
15 stars 5 forks source link

Fix issue with BananaPi m5 (sleep 1 before umount) #10

Open AntoninHuaut opened 1 year ago

AntoninHuaut commented 1 year ago

https://github.com/mmgen/mmgen-geek-tools/issues/9

mmgen commented 1 year ago

Thanks for the patch. Does it make things work consistently?

Some of these added sleep statements are probably unnecessary, plus there might be a more reliable way to solve this, using sync, for example.

I'd like to better understand why this strange race condition exists in the first place.

AntoninHuaut commented 1 year ago

Thanks for the patch. Does it make things work consistently?

I can't guarantee it but I reset my eMMC and the script ran perfectly on the first attempt and the eMMC was functional.

Some of these added sleep statements are probably unnecessary, plus there might be a more reliable way to solve this, using sync, for example.

Possibly, I needed for a project to encrypt my BananaPi but I have limited knowledge about disk management and storage.

I'd like to better understand why this strange race condition exists in the first place.

I understand