Fix Tails Cloner: Enforce minimum device size when over 8 GB
requested to merge BenWestgate/tails:20064-Enforce_Correct_Minimum_Size_if_Cloning_Persistent_Storage into stable
Based on !1313 (merged) for easier testing.
Updated!
Fixes issue where you can start cloning to a device that is too small but it will fail with a free space error, either while cloning system partition #20110 or while cloning Persistent Storage #20064.
Fixes consequences of fixing this like new infobar, status and debug texts, repopulate more, clear log window more.
Finished the "backup" branding that !1305 (merged) started. Finished the "device" > "USB stick" branding.
What's new in code:
-
creator.py gains
is_device_big_enough_for_backup
method anddata
dictionary key (BenWestgate/tails@95e2635e) -
updated: it also gained a
space_for_backup
method that takes a candidate device size and predicts the available space in its Persistent Storage. -
gui.py:
- Completed "backup" branding if clone Persistent Storage requested (BenWestgate/tails@e66b5cc5)
- Resolves most discussion in #20064 (comment 220969) and #20064 (comment 221101)
- Enforce minimum USB stick size for clones AND backups: (BenWestgate/tails@2b5cba36)
- Repopulates devices when clone Persistent Storage checked
-
populate_devices.add_devices()
now clears log box to stay relevant as things insert/remove and check :) - Displays new infobar title if no devices big enough "to back up Tails found"
- Size to buy in infobar details displays as next power of two GB
- Displays status message if device "is too small to back up your Tails"
- Required size in the new status message is the
unrounded officialexact min size required(includes false advertising factor)
- Required size in the new status message is the
- Fixed typos in
tails_installer
comments I read: - Checks if the system partition is large enough for cloning the current Tails (considering incremental upgrades.)
- Completed "backup" branding if clone Persistent Storage requested (BenWestgate/tails@e66b5cc5)
NEW:
- Displays a rather EXACT total size in the status message when too small for backup.
- Displays
The USB stick is too small to clone this Tails (at least 16 GB is required), you need to use a downloaded Tails ISO image:
status message when it's impossible to clone to a 7200-14999 MiB candidate device due to needing an 8GiB system partition to hold all the incremental upgrades. - New infobar title "No USB stick suitable to clone this Tails could be found" to distinguish between when you can't clone but can install from an ISO and when you can't install at all.
- Displays the needed size in infobar for above cases.
Edited by Ben Westgate