From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.saout.de ([127.0.0.1]) by localhost (mail.saout.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yR8YEx73blU7 for ; Sat, 3 Aug 2013 16:47:16 +0200 (CEST) Received: from mail-ee0-x229.google.com (mail-ee0-x229.google.com [IPv6:2a00:1450:4013:c00::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mail.saout.de (Postfix) with ESMTPS for ; Sat, 3 Aug 2013 16:47:15 +0200 (CEST) Received: by mail-ee0-f41.google.com with SMTP id d17so820012eek.0 for ; Sat, 03 Aug 2013 07:47:14 -0700 (PDT) Message-ID: <51FD17F0.5090805@gmail.com> Date: Sat, 03 Aug 2013 16:47:12 +0200 From: Milan Broz MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: Re: [dm-crypt] Cryptsetup FAQ montly pointer 8/13 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?RHJhZ2FuIE1pbGl2b2pldmnEhw==?= Cc: dm-crypt@saout.de On 08/03/2013 04:10 PM, Dragan Milivojević wrote: >> Another option for reliably identifying the swap partition is to use >> /dev/disk/by-id/ to identify the drive by model and serial >> number. For example, my own swap partition is >> >> /dev/disk/by-id/scsi-SATA_ST95005620AS_5YX1NEGE-part5 >> >> That should be safe unless I re-purpose that drive and forget to update >> /etc/crypttab. > > I would suggest using UUID. It works in all cases (partition, raid, > lvm member etc). > My crypttab (encrypted swap/home): > > luks-4dc17e23-e895-4e4b-8061-114fb33c310b > UUID=4dc17e23-e895-4e4b-8061-114fb33c310b none > luks-46969c48-ab1f-4bd7-bc2a-ae7c1bc86b26 > UUID=46969c48-ab1f-4bd7-bc2a-ae7c1bc86b26 none > > This was generated by fedora install. Sure, this is the best way if you use LUKS and Fedora installer is using LUKS even for swap. For plain crypt (or Truecrypt) you have no UUID, so you cannot use it. (You can use uuid/wwid of underlying device as mentioned above but this is not be present always.) Milan