{"id":297,"date":"2026-01-26T03:06:58","date_gmt":"2026-01-26T03:06:58","guid":{"rendered":"https:\/\/blog.gpst.net.cn:4008\/?p=297"},"modified":"2026-01-28T06:24:13","modified_gmt":"2026-01-28T06:24:13","slug":"%e7%94%a8-cryptsetup-%e5%88%9b%e5%bb%ba-luks-%e7%9a%84%e7%89%a9%e7%90%86%e5%8a%a0%e5%af%86%e7%9b%98%ef%bc%88%e5%8a%a0%e5%af%86%e7%89%a9%e7%90%86%e5%88%86%e5%8c%ba%ef%bc%89","status":"publish","type":"post","link":"https:\/\/opshub.com.cn\/?p=297","title":{"rendered":"\u7528 cryptsetup \u521b\u5efa LUKS \u7684\u7269\u7406\u52a0\u5bc6\u76d8\uff08\u52a0\u5bc6\u7269\u7406\u5206\u533a\uff09"},"content":{"rendered":"\n<p>\u7528 LUKS \u65b9\u5f0f\u521b\u5efa\uff08\u683c\u5f0f\u5316\uff09\u52a0\u5bc6\u76d8\uff0c\u8be5\u52a0\u5bc6\u76d8\u4f4d\u4e8e \/dev\/sdc1 \u5206\u533a<\/p>\n\n\n\n<p>umount -l \/dev\/sdc1<\/p>\n\n\n\n<p>wipefs -a \/dev\/sdc1<\/p>\n\n\n\n<p>cryptsetup &#8211;cipher aes-xts-plain64 &#8211;key-size 512 &#8211;hash sha512 &#8211;iter-time 10000 luksFormat \/dev\/sdc1<\/p>\n\n\n\n<p>&#8211;cipher \u52a0\u5bc6\u65b9\u5f0f aes-xts-plain64 AES \u52a0\u5bc6\u7b97\u6cd5\u642d\u914d XTS \u6a21\u5f0f<\/p>\n\n\n\n<p>&#8211;key-size \u5bc6\u94a5\u957f\u5ea6 512 \u56e0\u4e3a XTS \u6a21\u5f0f\u9700\u8981\u4e24\u5bf9\u5bc6\u94a5\uff0c\u6bcf\u4e2a\u7684\u957f\u5ea6\u662f256<\/p>\n\n\n\n<p>&#8211;hash \u6563\u5217\u7b97\u6cd5 sha512 N\/A<\/p>\n\n\n\n<p>&#8211;iter-time \u8fed\u4ee3\u65f6\u95f4 \u6700\u597d\u5927\u4e8e10000 \u5355\u4f4d\u662f\u6beb\u79d2\u3002\u8be5\u503c\u8d8a\u5927\uff0c\u66b4\u529b\u7834\u89e3\u8d8a\u96be\uff1b\u4f46\u662f\u4f60\u5728\u6253\u5f00\u52a0\u5bc6\u76d8\u65f6\u4e5f\u8981\u7b49\u5f85\u66f4\u4e45<\/p>\n\n\n\n<p>\u5f53\u51fa\u73b0Are you sure?(Type &#8216;yes&#8217; in capital letters):\u65f6\uff0c\u8f93\u5165\u5168\u5927\u5199\u7684YES<\/p>\n\n\n\n<p>cryptsetup luksOpen \/dev\/sdc1 crypt_sdc1<\/p>\n\n\n\n<p>\u8f93\u5165\u52a0\u5bc6\u65f6\u8bbe\u7f6e\u7684\u5bc6\u7801\uff0c\u89e3\u9501\u540e\u4f1a\u751f\u6210\/dev\/mapper\/crypt_sdc1\u8bbe\u5907<\/p>\n\n\n\n<p>mkfs.ext4 -L &#8220;crypt UFD&#8221; \/dev\/mapper\/crypt_sdc1<\/p>\n\n\n\n<p>mkdir \/mnt\/encrypted_disk<\/p>\n\n\n\n<p>mount \/dev\/mapper\/crypt_sdc1 \/mnt\/encrypted_disk<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7528 LUKS \u65b9\u5f0f\u521b\u5efa\uff08\u683c\u5f0f\u5316\uff09\u52a0\u5bc6\u76d8\uff0c\u8be5\u52a0\u5bc6\u76d8\u4f4d\u4e8e \/dev\/sdc1 \u5206\u533a umount -l \/dev\/sdc1 wipefs -a \/dev\/sdc1 cryptsetup &#8211;cipher aes-xts-plain64 &#8211;key-size 512 &#8211;hash sha512 &#8211;iter-time 10000 luksFormat \/dev\/sdc1 &#8211;cipher \u52a0\u5bc6\u65b9\u5f0f aes-xts-plain64 AES \u52a0\u5bc6\u7b97\u6cd5\u642d\u914d XTS \u6a21\u5f0f &#8211;key-size \u5bc6\u94a5\u957f\u5ea6 512 \u56e0\u4e3a XTS \u6a21\u5f0f\u9700\u8981\u4e24\u5bf9\u5bc6\u94a5\uff0c\u6bcf\u4e2a\u7684\u957f\u5ea6\u662f256 &#8211;hash \u6563\u5217\u7b97\u6cd5 sha512 N\/A &#8211;iter-time \u8fed\u4ee3\u65f6\u95f4 \u6700\u597d\u5927\u4e8e10000 \u5355\u4f4d\u662f\u6beb\u79d2\u3002\u8be5\u503c\u8d8a\u5927\uff0c\u66b4\u529b\u7834\u89e3\u8d8a\u96be\uff1b\u4f46\u662f\u4f60\u5728\u6253\u5f00\u52a0\u5bc6\u76d8\u65f6\u4e5f\u8981\u7b49\u5f85\u66f4\u4e45 \u5f53\u51fa\u73b0Are you sure?(Type &#8216;yes&#8217; in capital letters):\u65f6\uff0c\u8f93\u5165\u5168\u5927\u5199\u7684YES cryptsetup luksOpen \/dev\/sdc1 crypt_sdc1 \u8f93\u5165\u52a0\u5bc6\u65f6\u8bbe\u7f6e\u7684\u5bc6\u7801\uff0c\u89e3\u9501\u540e\u4f1a\u751f\u6210\/dev\/mapper\/crypt_sdc1\u8bbe\u5907 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-297","post","type-post","status-publish","format-standard","hentry","category-9"],"_links":{"self":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/297","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=297"}],"version-history":[{"count":1,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/297\/revisions"}],"predecessor-version":[{"id":298,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/297\/revisions\/298"}],"wp:attachment":[{"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=297"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=297"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opshub.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=297"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}