Fixes for Debian bugs 838293 & 844542
blockdev --getsize fix is simple and selfexplanatory
The static options fix: the way I did it (increment options count by 2 on each iteration) is because I wanted to avoid calling the external wc command. Otherwise it would have been more flexible to count number of options outside the loop using something like:
opts_n=$(echo $opts |wc -w)