dex6 / sed-opal-unlocker

Micro-utility for unlocking TCG-OPAL encrypted disks
Apache License 2.0
33 stars 4 forks source link

Failed to ioctl #4

Closed kahvis closed 2 years ago

kahvis commented 2 years ago

Details of the system: Alpine Linux (edge) kernel 5.15.22-0-lts Build locally, system is making use of the musl libc.

command: sed-opal-unlocker unlock,MBRunshadow /dev/nvme0 /tmp/pass.secret

print: _Failed to ioctl(/dev/nvme0, IOC_OPAL_LOCKUNLOCK, ...): Not a tty

dex6 commented 2 years ago

Unfortunately, Alpine Linux kernel configuration disables CONFIG_BLK_SED_OPAL interface required by sed-opal-unlocker: https://git.alpinelinux.org/aports/tree/main/linux-lts/config-lts.x86_64#n852

You can either recompile kernel yourself, or kindly ask Alpine folks to enable it by default.

And btw. if it still does not work after enabling that option, try /dev/nvme0n1 instead of nvme0.