{"id":325,"date":"2015-09-14T10:37:16","date_gmt":"2015-09-14T14:37:16","guid":{"rendered":"http:\/\/www.mufljuz.com\/?p=325"},"modified":"2015-09-24T10:34:34","modified_gmt":"2015-09-24T14:34:34","slug":"btrfs-with-encription","status":"publish","type":"post","link":"https:\/\/www.mufljuz.com\/?p=325","title":{"rendered":"Btrfs with encription"},"content":{"rendered":"<p>Make sure btrfs support is installed in your kernel<\/p>\n<pre>\r\nFile systems  --->\r\n    <*> Btrfs filesystem\r\n<\/pre>\n<p>Install needed packages<br \/>\n<code><br \/>\nemerge -av sys-fs\/btrfs-progs sys-fs\/cryptsetup<br \/>\n<\/code><br \/>\nMake sure the following flags are enabled for sys-fs\/cryptsetupgcrypt: nls python udev pwquality. dev-libs\/libpwquality is used for password quality checking.<\/p>\n<p>Prepare disk:<br \/>\n<code><br \/>\nparted -a optimal \/dev\/sdX<br \/>\n<\/code><\/p>\n<pre>\r\n(parted) help\r\n(parted) print\r\n(parted) mklabel gpt\r\n(parted) mkpart primary btrfs 0% 100%\r\n(parted) name 1 storage_XX\r\n(parted) print\r\n(parted) quit\r\ncreate filesystem\r\nmkfs.btrfs \/dev\/sdX1\r\n<\/pre>\n<p>Encrypt disk<br \/>\n<code><br \/>\ncryptsetup luksFormat -v \/dev\/sdX<br \/>\n<\/code><\/p>\n<p>To open the disk use<br \/>\n<code><br \/>\ncryptsetup luksOpen \/dev\/sdX DRIVE_name<br \/>\n<\/code><\/p>\n<p>To get automated mounting, first find UUID and then modify cryptab conf file.<br \/>\nCommand <code>blkid<\/code> can be used to get the new UUID of the drive.<br \/>\nModify \/etc\/crypttab with your desired drive name and the partitions UUID:<\/p>\n<pre>\r\nDRIVE_name    UUID=your_uuid   none    luks\r\n<\/pre>\n<p>Crypt details can be seen with<br \/>\n<code><br \/>\n cryptsetup luksDump \/dev\/sdX<br \/>\n<\/code><\/p>\n<p>For more detail see <a href=\"https:\/\/wiki.archlinux.org\/index.php\/Dm-crypt\/Device_encryption\">archlinux<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Make sure btrfs support is installed in your kernel File systems &#8212;> Btrfs filesystem Install needed packages emerge -av sys-fs\/btrfs-progs sys-fs\/cryptsetup Make sure the following flags are enabled for sys-fs\/cryptsetupgcrypt: nls python udev pwquality. dev-libs\/libpwquality is used for password quality checking. Prepare disk: parted -a optimal \/dev\/sdX (parted) help (parted) print (parted) mklabel gpt (parted) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=\/wp\/v2\/posts\/325"}],"collection":[{"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=325"}],"version-history":[{"count":9,"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=\/wp\/v2\/posts\/325\/revisions"}],"predecessor-version":[{"id":341,"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=\/wp\/v2\/posts\/325\/revisions\/341"}],"wp:attachment":[{"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mufljuz.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}