root@OpenWrt:~# opkg install "kmod-crypto-ecb" "kmod-crypto-iv" "kmod-crypto-misc" "cryptsetup";
root@OpenWrt:~# cryptsetup luksFormat "/dev/sda";
WARNING: Device /dev/sda already contains a 'iso9660' superblock signature.
WARNING: Device /dev/sda already contains a 'gpt' partition signature.
WARNING!
========
This will overwrite data on /dev/sda irrevocably.
Are you sure? (Type uppercase yes): YES
Enter passphrase for /dev/sda:
Verify passphrase:
Locking aborted. The locking path /run/cryptsetup is unusable (not a directory or missing).
Failed to acquire write device lock.
Cannot format device /dev/sda in use.
root@OpenWrt:/etc/hotplug.d/block# block info
/dev/mtdblock5: UUID="1ed3cb7b-cf7c8a04-ffbb0445-861f2a0e" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/mtdblock6: MOUNT="/overlay" TYPE="jffs2"
Before the luksFormat
command, the device /dev/sda
was plugged-in, not mounted or in use of any sort. After the format failed, it magically disappeared from the system. block info
won't detect it until I plug it into a PC to create a MBR / GPT.
What is the problem and how do I solve it?