ubuntu/24.04/Ubuntu 24.04\343\201\247\343\200\214cryptsetup: WARNING: Option 'size' missing in crypttab for plain dm-crypt mapping dm_crypt-0\343\200\215\343\201\250\343\201\204\343\201\206\350\255\246\345\221\212\343\201\214\350\241\250\347\244\272\343\201\225\343\202\214\343\202\213.md
... ...
@@ -0,0 +1,52 @@
1
+## 現象
2
+
3
+起動時に
4
+
5
+```
6
+cryptsetup: WARNING: Option 'size' missing in crypttab for plain dm-crypt mapping dm_crypt-0
7
+```
8
+
9
+と表示される。
10
+(多分)Ubuntu 24.04インストール時にZFS + Encryptを選ぶとこれが起きる。
11
+
12
+## 解決方法
13
+
14
+このBugに関係している気がする。
15
+[Bug #2060947 “Warnings produced in apt upgrade processing trigge...” : Bugs : cryptsetup package : Ubuntu](https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/2060947)
16
+
17
+参考: [encryption - Setting correct size for "cryptsetup: WARNING: Option 'size' missing in crypttab for plain dm-crypt mapping root" message - Ask Ubuntu](https://askubuntu.com/questions/1109463/setting-correct-size-for-cryptsetup-warning-option-size-missing-in-crypttab)
18
+
19
+1. 以下を実行する。
20
+
21
+ ```
22
+ $ sudo cryptsetup status dm_crypt-0
23
+ /dev/mapper/dm_crypt-0 is active and is in use.
24
+ type: PLAIN
25
+ cipher: aes-cbc-essiv:sha256
26
+ keysize: 256 bits
27
+ key location: dm-crypt
28
+ device: /dev/nvme0n1p3
29
+ sector size: 512
30
+ offset: 0 sectors
31
+ size: [masked]
32
+ mode: read/write
33
+
34
+ ```
35
+
36
+1. `/etc/crypttab`を開き、以下のように編集する。
37
+
38
+ - `size`: コマンドの出力の`keysize`
39
+ - `cipher`: コマンドの出力の`chiper`
40
+
41
+
42
+ この場合の例:
43
+
44
+ ```
45
+ dm_crypt-0 PARTUUID=[masked] /dev/urandom swap,initramfs,size=256,cipher=aes-cbc-essiv:sha256,plain
46
+ ```
47
+
48
+1. 以下を実行する。
49
+
50
+ ```
51
+ $ sudo update-initramfs -u
52
+ ```
... ...
\ No newline at end of file