{"action":"created","issue":{"url":"https://api.github.com/repos/clearlinux/distribution/issues/320","repository_url":"https://api.github.com/repos/clearlinux/distribution","labels_url":"https://api.github.com/repos/clearlinux/distribution/issues/320/labels{/name}","comments_url":"https://api.github.com/repos/clearlinux/distribution/issues/320/comments","events_url":"https://api.github.com/repos/clearlinux/distribution/issues/320/events","html_url":"https://github.com/clearlinux/distribution/issues/320","id":389426205,"node_id":"MDU6SXNzdWUzODk0MjYyMDU=","number":320,"title":"How to add encrypted swap with the installer?","user":{"login":"neben","id":1236695,"node_id":"MDQ6VXNlcjEyMzY2OTU=","avatar_url":"https://avatars2.githubusercontent.com/u/1236695?v=4","gravatar_id":"","url":"https://api.github.com/users/neben","html_url":"https://github.com/neben","followers_url":"https://api.github.com/users/neben/followers","following_url":"https://api.github.com/users/neben/following{/other_user}","gists_url":"https://api.github.com/users/neben/gists{/gist_id}","starred_url":"https://api.github.com/users/neben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neben/subscriptions","organizations_url":"https://api.github.com/users/neben/orgs","repos_url":"https://api.github.com/users/neben/repos","events_url":"https://api.github.com/users/neben/events{/privacy}","received_events_url":"https://api.github.com/users/neben/received_events","type":"User","site_admin":false},"labels":[{"id":783009618,"node_id":"MDU6TGFiZWw3ODMwMDk2MTg=","url":"https://api.github.com/repos/clearlinux/distribution/labels/enhancement","name":"enhancement","color":"5319e7","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-12-10T18:19:12Z","updated_at":"2018-12-28T18:12:30Z","closed_at":null,"author_association":"NONE","body":"**Is your feature request related to a problem? Please describe.**\r\nI would like an installer option to set up an encrypted swap partition, especially if I choose to encrypt my root file system.\r\n\r\n**Describe the solution you'd like**\r\nThis can be achieved manually by creating the following two files:\r\n```\r\n# cat /etc/crypttab \r\n# <name> <device>         <password>    <options>\r\nswap     LABEL=cryptswap  /dev/urandom  swap,offset=2048,cipher=aes-xts-plain64,size=512,discard\r\n\r\n# cat /etc/fstab \r\n# <filesystem>    <dir>  <type>  <options>  <dump>  <pass>\r\n/dev/mapper/swap  none   swap    defaults   0       0\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/clearlinux/distribution/issues/comments/450403128","html_url":"https://github.com/clearlinux/distribution/issues/320#issuecomment-450403128","issue_url":"https://api.github.com/repos/clearlinux/distribution/issues/320","id":450403128,"node_id":"MDEyOklzc3VlQ29tbWVudDQ1MDQwMzEyOA==","user":{"login":"thiagomacieira","id":4109772,"node_id":"MDQ6VXNlcjQxMDk3NzI=","avatar_url":"https://avatars2.githubusercontent.com/u/4109772?v=4","gravatar_id":"","url":"https://api.github.com/users/thiagomacieira","html_url":"https://github.com/thiagomacieira","followers_url":"https://api.github.com/users/thiagomacieira/followers","following_url":"https://api.github.com/users/thiagomacieira/following{/other_user}","gists_url":"https://api.github.com/users/thiagomacieira/gists{/gist_id}","starred_url":"https://api.github.com/users/thiagomacieira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thiagomacieira/subscriptions","organizations_url":"https://api.github.com/users/thiagomacieira/orgs","repos_url":"https://api.github.com/users/thiagomacieira/repos","events_url":"https://api.github.com/users/thiagomacieira/events{/privacy}","received_events_url":"https://api.github.com/users/thiagomacieira/received_events","type":"User","site_admin":false},"created_at":"2018-12-28T18:12:30Z","updated_at":"2018-12-28T18:12:30Z","author_association":"NONE","body":"Hmm... I added the swap after the first boot. Just create a new partition and use `cryptsetup luksFormat` with the same password, then `cryptsetup luksOpen` + `mkswap` on it. Or, if you use an encrypted LVM Volume Group, simply create a new Logical Volume and mkswap on it.\r\n\r\n```\r\n# lsblk \r\nNAME                                          MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT\r\nsda                                             8:0    0 953.9G  0 disk  \r\n├─sda1                                          8:1    0   512M  0 part  /boot\r\n├─sda2                                          8:2    0     6G  0 part  \r\n│ └─luks-84ee31da-10cd-4e9e-8c80-bf66662e7c7e 252:0    0     6G  0 crypt /\r\n└─sda4                                          8:4    0   512G  0 part  \r\n  └─cr_sda4                                   252:1    0   512G  0 crypt \r\n    ├─vg0-stuff                               252:2    0   200G  0 lvm   /home\r\n    └─vg0-swap                                252:3    0    64M  0 lvm   [SWAP]\r\n```\r\n\r\nIn this setup, both sda2 and sda4 are encrypted with the same password, so I only have to type once at boot. But sda4 is a Physical Volume for the Volume Group and contains both my `stuff` volume and the swap, minimal as it is."}}
{"actor":{"display_login":"thiagomacieira"}}