tails-persistence-setup bootstrap wrongly computes persistent volume size when the partition table doesn't span on the full disk
Originally created by @patcon on #8940 (Redmine)
I had a 4GB USB with a persistence volume that I cloned to a 16GB using `dd`. The persistence volume on UsB #2 understandably didn’t take up the full space as it normally would.
But when I tried to delete the persistence partition and run the bootstrap step again to recreate a larger one, only a partition of the original size was created. This wouldn’t have been so confusing except that the t-p-s wizard provides information leading me to believe otherwise (ie “we’re going to create a persistence volume of 12.67 GB” etc). And when I started seeing random failures later due to being out of space, it took me quite a bit of troubleshooting to realize that disk space was the issue. (“Disk Utility” showed me the actual size when I later thought to look, but deleting the partition there still resulted in t-p-s sneakily recreating it as smaller than it claimed it would.)
In the end, I got it working as expected (t-p-s creating volume on max available space) by doing a “Clone & Install” from a second USB running tails, and that presumably got rid of whatever was wonky in the MBR (?).
The expected behavour of t-p-s would be to at least have honest output, but ideally be able to catch that edge-case and use the full space.