差異處
這裏顯示兩個版本的差異處。
下次修改 | 前次修改 | ||
luks [2016/08/25 01:07] jz 建立 |
luks [2023/06/11 01:17] (目前版本) jz |
||
---|---|---|---|
行 1: | 行 1: | ||
+ | ====== Cryptsetup ====== | ||
+ | |||
+ | ===== format ===== | ||
+ | <code> | ||
+ | cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-urandom --verify-passphrase luksFormat /dev/sdX0 | ||
+ | </code> | ||
+ | |||
+ | Or, with default option | ||
+ | <code> | ||
+ | cryptsetup luksFormat /dev/sdX0 | ||
+ | </code> | ||
+ | |||
+ | <code> | ||
+ | cryptsetup luksOpen /dev/sdX0 rootfs | ||
+ | mkfs.ext4 /dev/mapper/rootfs | ||
+ | mount /dev/mapper/rootfs /mnt/rootfs | ||
+ | </code> | ||
+ | |||
+ | <code> | ||
+ | cryptsetup luksDump /dev/sdX0 | ||
+ | </code> | ||
+ | |||
+ | <code> | ||
+ | umount /mmt/rootfs | ||
+ | cryptsetup luksClose rootfs | ||
+ | </code> | ||
+ | |||
產生亂數金鑰 | 產生亂數金鑰 | ||
<code bash> | <code bash> | ||
行 13: | 行 40: | ||
cryptsetup luksKillslot /dev/sdX 1 | cryptsetup luksKillslot /dev/sdX 1 | ||
</code> | </code> | ||
+ | |||
+ | 設定UUID | ||
+ | <code bash> | ||
+ | cryptsetup luksUUID /dev/sda1 --uuid "$newuuid" | ||
+ | </code> | ||
+ |