When I was running this script to image the SD card for my Raspberry Pi install, the creation of the required partitions on the SD card succeeded , but the formatting and mounting of the new partitions failed. This was because on my laptop, the partitions that were created had the suffix "p1" and "p2" and not "1" and "2" like the script expected:
So, I have updated the script to use "lsblk" to look up the actual names of the block devices.
Initially I used "blkid", but then when I tested the change, it failed because the partitions didn't yet have IDs!
Also, my text editor seems to have modified some of some of the leading/trailing/tabbed whitespace in the script, hence all the extra lines showing as changes. I didn't know how to exclude these from my pull request sorry!
When I was running this script to image the SD card for my Raspberry Pi install, the creation of the required partitions on the SD card succeeded , but the formatting and mounting of the new partitions failed. This was because on my laptop, the partitions that were created had the suffix "p1" and "p2" and not "1" and "2" like the script expected:
SD Device: /dev/mmcblk0 Partitions: /dev/mmcblk0p1 & /dev/mmcblk0p2
So, I have updated the script to use "lsblk" to look up the actual names of the block devices.
Initially I used "blkid", but then when I tested the change, it failed because the partitions didn't yet have IDs!
Also, my text editor seems to have modified some of some of the leading/trailing/tabbed whitespace in the script, hence all the extra lines showing as changes. I didn't know how to exclude these from my pull request sorry!