{"id":3663,"date":"2017-12-28T08:49:17","date_gmt":"2017-12-28T07:49:17","guid":{"rendered":"https:\/\/rephlex.de\/blog\/?p=3663"},"modified":"2017-12-28T08:49:17","modified_gmt":"2017-12-28T07:49:17","slug":"unlock-your-home-partition-and-other-volumes-with-cryptsetup-on-boot-ubuntu-17-10-systemd","status":"publish","type":"post","link":"https:\/\/rephlex.de\/blog\/2017\/12\/28\/unlock-your-home-partition-and-other-volumes-with-cryptsetup-on-boot-ubuntu-17-10-systemd\/","title":{"rendered":"Unlock your \/home partition and other volumes with cryptsetup on boot (Ubuntu 17.10 \/ systemd)"},"content":{"rendered":"<p>With Ubuntu 17.10 using systemd\u00a0234-2ubuntu12.1 (as of me writing this) you cannot just do it the obvious way:<\/p>\n<p><a href=\"https:\/\/rephlex.de\/blog\/wp-content\/uploads\/2017\/12\/Bildschirmfoto-von-\u00bb2017-12-28-08-43-05\u00ab.png\" rel=\"lightbox\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-3664\" src=\"https:\/\/rephlex.de\/blog\/wp-content\/uploads\/2017\/12\/Bildschirmfoto-von-\u00bb2017-12-28-08-43-05\u00ab.png\" alt=\"\" width=\"420\" height=\"316\" srcset=\"https:\/\/rephlex.de\/blog\/wp-content\/uploads\/2017\/12\/Bildschirmfoto-von-\u00bb2017-12-28-08-43-05\u00ab.png 729w, https:\/\/rephlex.de\/blog\/wp-content\/uploads\/2017\/12\/Bildschirmfoto-von-\u00bb2017-12-28-08-43-05\u00ab-300x226.png 300w\" sizes=\"auto, (max-width: 420px) 100vw, 420px\" \/><\/a><\/p>\n<p>This will create lines and\/or keyfiles in \/etc\/crypttab, which systemd happily ignores. At least the unit-files systemd will generate on the fly will fail.<\/p>\n<p>The way to do it, is adding the correct kernel boot parameters luks.uuid= and luks.options= lines to your grub config file.<\/p>\n<p>For Ubuntu, i had to change \/etc\/default\/grub from<\/p>\n<blockquote><p>GRUB_CMDLINE_LINUX=&#8220;&#8220;<\/p><\/blockquote>\n<p>to<\/p>\n<blockquote><p>GRUB_CMDLINE_LINUX=&#8220;luks.uuid=c142f353-fbe8-4965-931e-c9b1e9503fcd luks.uuid=91d55cef-d26c-4e42-8d97-c17a8df79c58 luks.options=timeout=90s&#8220;<\/p><\/blockquote>\n<p>Fun fact: if you leave out the timeout specification, systemd will simply not ask for the password, stating the timeout expired ^_^<\/p>\n<p>After changing the file, run<\/p>\n<blockquote><p>sudo update-grub<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>With Ubuntu 17.10 using systemd\u00a0234-2ubuntu12.1 (as of me writing this) you cannot just do it the obvious way: This will create lines and\/or keyfiles in \/etc\/crypttab, which systemd happily ignores. At least the unit-files systemd will generate on the fly will fail. The way to do it, is adding the correct kernel boot parameters luks.uuid= [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[460,459,455,297,456,454,457,445,458],"class_list":["post-3663","post","type-post","status-publish","format-standard","hentry","category-techtalk","tag-auto","tag-boot","tag-cryptsetup","tag-grub","tag-home","tag-luks","tag-mount","tag-systemd","tag-unlock"],"_links":{"self":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/3663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/comments?post=3663"}],"version-history":[{"count":1,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/3663\/revisions"}],"predecessor-version":[{"id":3665,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/posts\/3663\/revisions\/3665"}],"wp:attachment":[{"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/media?parent=3663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/categories?post=3663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rephlex.de\/blog\/wp-json\/wp\/v2\/tags?post=3663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}