hypriot / flash

Command line script to flash SD card images of any kind
MIT License
1.01k stars 175 forks source link

Fix for hdparm error: BLKRRPART failed ... #192

Open Wuodan opened 3 years ago

Wuodan commented 3 years ago

'hdparm -z' failed on about 80% of attempts with error: BLKRRPART failed: Device or resource busy

A simple 'sync' before it did not help, but with this loop the second execution does the job.

pbolduc commented 3 years ago

I was having this problem too and adding the changes in this PR resolved it for me.