<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - offset is ignored in /etc/crypttab"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=87717">87717</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>offset is ignored in /etc/crypttab
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>systemd
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>general
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>vecu.bosseur@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>systemd-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Dear Developpers,

My /etc/crypttab contains:

cryptswap1 UUID=c836dd13-1b4e-4bfb-9be5-6e5d972aa75a /dev/urandom
swap,offset=2048,cipher=aes-cbc-essiv:sha256

And my /etc/fstab contains:

/dev/mapper/cryptswap1 none swap sw 0 0

And this worked fine with cryptdisks_start however the option "offset" is not
understood by systemd 215. I did change init system from sysvinit to systemd,
and now, after 2 reboots, I don't have any swap and my device that had UUID
c836dd13-1b4e-4bfb-9be5-6e5d972aa75a has seen its start erased, and thus its
UUID itself, as if I had not mentioned an offset=>>0 in crypttab.

The use case for "offset=2048" is to be able to use a UUID to identify the
partition I want to have encrypted swap on.  Not using an offset=>>0 parameter
would unconditionally erase the whole partition, including the portion where
its UUID is stored. Using any other way to identify a partition can thus cause
data loss if I reparttion my disk and forget to update /etc/crypttab.

Please make systemd understand the "offset=" paramater of /etc/crypttab.

Has this problem been addressed in a subsequent systemd version?

Note: related to debian bug #751707
( <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751707">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751707</a> )

Thanks,
Vecu Bosseur</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>