Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] main/mkinitfs: backport cryptdiscards patch

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Wed, 14 Jun 2017 15:27:10 +0200

On Mon, 12 Jun 2017 12:55:04 +0200
Sören Tempel <soeren_at_soeren-tempel.net> wrote:

> On 12.06.17, Natanael Copa wrote:
> > Does other distros have similar options? If so do they use
> > "cryptdiscards" as bootoption too, or something else?
>
> Yes, other distros have similar options. According to the Arch Linux
> wiki[1] all systemd based initrds use `rd.luks.options=discard` for
> enabling this.
>
> Cheers,
> Sören
>
> [1]: https://wiki.archlinux.org/index.php/Dm-crypt/Specialties#Discard.2FTRIM_support_for_solid_state_drives_.28SSD.29

Arch also has:

  cryptdevice=/dev/sdaX:root:allow-discards

and apparently they also have cryptkey=... for detached header.

Gentoo[1] does:
  root_trim=yes


Debian/ubuntu stores that option in /etc/crypttab which needs to be included in initramfs.

We currently have:

cryptroot cryptdm cryptheader cryptoffset

and now we add cryptdiscard

I kind of like the old Arch Linux way better:

  cryptdevice=$cryptroot:$cryptdm:$cryptdiscard

and for detached header:

  cryptkey=$cryptheader:$cryptoffset:$size


What do you think? Should we go for:

  cryptroot=$device cryptdm=$dmname cyptdiscards=yes cryptheader=$header cryptoffset=$offset

or should we do:

  cryptdevice=$device:$dmname:allow-discards cryptkey=$header:$offset

-nc

[1]: https://wiki.gentoo.org/wiki/Dm-crypt_full_disk_encryption#Genkernel.2FGenkernel-next


>
>
> ---
> Unsubscribe: alpine-aports+unsubscribe_at_lists.alpinelinux.org
> Help: alpine-aports+help_at_lists.alpinelinux.org
> ---
>



---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Jun 14 2017 - 15:27:10 GMT