Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support automatic USB disk detection for systems with multiple connected USB disks #1

Open
andreashaerter opened this issue Sep 10, 2023 · 0 comments

Comments

@andreashaerter
Copy link
Contributor

By default, the script is simply using the first partition on the first USB disk it is able to find via /dev/disk/by-path/. No worries: existing drives not used for backups won't be destroyed as the decryption will fail. But this automatism presumes that only one USB disk is connected during the script run.

Defining a UUID will work if there are more than one (e.g. when it is not feasible in your environment to just have one disk connected simultaneously). There is the -d parameter wich allows to define a UUID of the target partition to decrypt which will be used to search it in /dev/disk/by-uuid/ (you might use blkid /dev/sdX1 to determine the UUID).

This could (and should) be improved:

  • The script should try all existing USB disks (not only the first).
  • The -d parameter should be an Array and all UUIDs should be tried in the defined order. It should be documented that this does support non-USB-disks, too (as a side note)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant