hypriot / flash

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

Cannot mount partitions after dd on Linux so customizing config files fails #76

Closed davidjmurray closed 8 years ago

davidjmurray commented 8 years ago

On: Linux Mint 17.1

As the image file actually contains data for 2 partitions, after writing to the SD card using dd, Linux does not know that the partition table may have changed.

This can be fixed by using hdparm to re-read the partition table on the SD card.

So, after the dd (or udevadm settle) and before the mount and file write processes, insert:

hdparm -z "${disk}"

Cheers,

StefanScherer commented 8 years ago

@davidjmurray Thanks for your suggestions, also in #75. Could you help me and send a PR with the changes? Thanks!

sensorii commented 8 years ago

I've confirmed the bug and the fix.

StefanScherer commented 8 years ago

Thanks @sensorii, PR #82 merged.