Would help [Benjamin-Loison/cinnamon/issues/179](https://github.com/Benjamin-Loison/cinnamon/issues/179).
[Wikipedia: Linux Unified Key Setup (1239229939)](https://en.wikipedia.org/w/index.php?title=Linux_Unified_Key_Setup&oldid=1239229939) may help.
Reading:
- [Wikipedia: Comparison of disk encryption software](https://en.wikipedia.org/wiki/Comparison_of_disk_encryption_software)
- [Wikipedia: dm-crypt](https://en.wikipedia.org/wiki/Dm-crypt)
- [Wikipedia: Device mapper](https://en.wikipedia.org/wiki/Device_mapper)
would also help.
+10
[Wikipedia: Linux Unified Key Setup#Examples (1239229939)](https://en.wikipedia.org/w/index.php?title=Linux_Unified_Key_Setup&oldid=1239229939#Examples) may help otherwise I read completely this article.
Screenshot_Linux_Mint_2025-01-18_15:58:46.png does not request an encryption password and rebooting leads to usual login prompt.
Let us try from a fresh Linux Mint 22.1:
`Screenshot_Linux_Mint_2025-01-18_15:58:46.png` does not request an encryption password and rebooting leads to usual login prompt.
As there is a decryption screen, there is no need to take screenshots how to access the disk from another system.
However, a final screenshot once encrypted of gparted to show that it is encrypted would be nice.
Backing up before encrypting seems safer.
As there is a decryption screen, there is no need to take screenshots how to access the disk from another system.
However, a final screenshot once encrypted of `gparted` to show that it is encrypted would be nice.
I recommend switching to cryptsetup-reencrypt, which is properly maintained and tested upstream even when the format of the LUKS header changes (to my knowledge, this has at least happened twice and can cause luksipc to catastrophically fail, i.e., destroy all your data in the worst case).
> I recommend switching to cryptsetup-reencrypt, which is properly maintained and tested upstream even when the format of the LUKS header changes (to my knowledge, this has at least happened twice and can cause luksipc to catastrophically fail, i.e., destroy all your data in the worst case).
Source: [luksipc/blob/e222ca7ff89e7465345c8ae8786096130e06a30f/README.md?plain=1#L7-L11](https://github.com/johndoe31415/luksipc/blob/e222ca7ff89e7465345c8ae8786096130e06a30f/README.md?plain=1#L7-L11)
Source: [the Ask Ubuntu comment 2501628](https://askubuntu.com/questions/96870/is-there-a-way-to-do-full-disk-encryption-after-the-install#comment2501628_675543)
Let us figure out why I faced above in https://gitea.lemnoslife.com/attachments/f3fda48c-04fc-4a5c-ac80-d884d6cde31c:
```bash
cryptosetup-reencrypt /dev/vda3
```
```
cryptosetup-reencrypt: command not found
```
DuckDuckGo and Google search `"cryptosetup-reencrypt"` and `"cryptosetup-reencrypt" "apt"`.
https://man7.org/linux/man-pages/man8/cryptsetup-reencrypt.8.html
On my Debian 12 GNOME work laptop:
```bash
command-not-found --ignore-installed cryptsetup-reencrypt
```
```
cryptsetup-reencrypt: command not found
```
cryptsetup 2.6.1 flags: UDEV BLKID KEYRING KERNEL_CAPI
Usage: cryptsetup [OPTION...] <action> <action-specific>
Help options:
-?, --help Show this help message
--usage Display brief usage
-V, --version Print package version
--active-name=STRING Override device autodetection of dm
device to be reencrypted
--align-payload=SECTORS Align payload at <n> sector boundaries
- for luksFormat
--allow-discards Allow discards (aka TRIM) requests for
device
-q, --batch-mode Do not ask for confirmation
--cancel-deferred Cancel a previously set deferred
device removal
-c, --cipher=STRING The cipher used to encrypt the disk
(see /proc/crypto)
--debug Show debug messages
--debug-json Show debug messages including JSON
metadata
--deferred Device removal is deferred until the
last user closes it
--device-size=bytes Use only specified device size (ignore
rest of device). DANGEROUS!
--decrypt Decrypt LUKS2 device (remove
encryption).
--disable-external-tokens Disable loading of external LUKS2
token plugins
--disable-keyring Disable loading volume keys via kernel
keyring
--disable-locks Disable locking of on-disk metadata
--disable-veracrypt Do not scan for VeraCrypt compatible
device
--dump-json-metadata Dump info in JSON format (LUKS2 only)
--dump-volume-key Dump volume key instead of keyslots
info
--encrypt Encrypt LUKS2 device (in-place
encryption).
--force-password Disable password quality check (if
enabled)
--force-offline-reencrypt Force offline LUKS2 reencryption and
bypass active device detection.
-h, --hash=STRING The hash used to create the encryption
key from the passphrase
--header=STRING Device or file with separated LUKS
header
--header-backup-file=STRING File with LUKS header and keyslots
backup
--hotzone-size=bytes Maximal reencryption hotzone size.
--init-only Initialize LUKS2 reencryption in
metadata only.
-I, --integrity=STRING Data integrity algorithm (LUKS2 only)
--integrity-legacy-padding Use inefficient legacy padding (old
kernels)
--integrity-no-journal Disable journal for integrity device
--integrity-no-wipe Do not wipe device after format
-i, --iter-time=msecs PBKDF iteration time for LUKS (in ms)
--iv-large-sectors Use IV counted in sector size (not in
512 bytes)
--json-file=STRING Read or write the json from or to a
file
--keep-key Do not change volume key.
--key-description=STRING Key description
-d, --key-file=STRING Read the key from a file
-s, --key-size=BITS The size of the encryption key
-S, --key-slot=INT Slot number for new key (default is
first free)
--keyfile-offset=bytes Number of bytes to skip in keyfile
-l, --keyfile-size=bytes Limits the read from keyfile
--keyslot-cipher=STRING LUKS2 keyslot: The cipher used for
keyslot encryption
--keyslot-key-size=BITS LUKS2 keyslot: The size of the
encryption key
--label=STRING Set label for the LUKS2 device
--luks2-keyslots-size=bytes LUKS2 header keyslots area size
--luks2-metadata-size=bytes LUKS2 header metadata area size
--volume-key-file=STRING Use the volume key from file.
--new-keyfile=STRING Read the key for a new slot from a file
--new-key-slot=INT Slot number for new key (default is
first free)
--new-keyfile-offset=bytes Number of bytes to skip in newly added
keyfile
--new-keyfile-size=bytes Limits the read from newly added
keyfile
--new-token-id=INT Token number (default: any)
-o, --offset=SECTORS The start offset in the backend device
--pbkdf=STRING PBKDF algorithm (for LUKS2): argon2i,
argon2id, pbkdf2
--pbkdf-force-iterations=LONG PBKDF iterations cost (forced,
disables benchmark)
--pbkdf-memory=kilobytes PBKDF memory cost limit
--pbkdf-parallel=threads PBKDF parallel cost
--perf-no_read_workqueue Bypass dm-crypt workqueue and process
read requests synchronously
--perf-no_write_workqueue Bypass dm-crypt workqueue and process
write requests synchronously
--perf-same_cpu_crypt Use dm-crypt same_cpu_crypt
performance compatibility option
--perf-submit_from_crypt_cpus Use dm-crypt submit_from_crypt_cpus
performance compatibility option
--persistent Set activation flags persistent for
device
--priority=STRING Keyslot priority: ignore, normal,
prefer
--progress-json Print progress data in json format
(suitable for machine processing)
--progress-frequency=secs Progress line update (in seconds)
-r, --readonly Create a readonly mapping
--reduce-device-size=bytes Reduce data device size (move data
offset). DANGEROUS!
--refresh Refresh (reactivate) device with new
parameters
--resilience=STRING Reencryption hotzone resilience type
(checksum,journal,none)
--resilience-hash=STRING Reencryption hotzone checksums hash
--resume-only Resume initialized LUKS2 reencryption
only.
--sector-size=INT Encryption sector size (default: 512
bytes)
--serialize-memory-hard-pbkdf Use global lock to serialize memory
hard PBKDF (OOM workaround)
--shared Share device with another
non-overlapping crypt segment
-b, --size=SECTORS The size of the device
-p, --skip=SECTORS How many sectors of the encrypted data
to skip at the beginning
--subsystem=STRING Set subsystem label for the LUKS2
device
--tcrypt-backup Use backup (secondary) TCRYPT header
--tcrypt-hidden Use hidden header (hidden TCRYPT
device)
--tcrypt-system Device is system TCRYPT drive (with
bootloader)
--test-args Do not run action, just validate all
command line parameters
--test-passphrase Do not activate device, just check
passphrase
-t, --timeout=secs Timeout for interactive passphrase
prompt (in seconds)
--token-id=INT Token number (default: any)
--token-only Do not ask for passphrase if
activation by token fails
--token-replace Replace the current token
--token-type=STRING Restrict allowed token types used to
retrieve LUKS2 key
-T, --tries=INT How often the input of the passphrase
can be retried
-M, --type=STRING Type of device metadata: luks, luks1,
luks2, plain, loopaes, tcrypt, bitlk
--unbound Create or dump unbound LUKS2 keyslot
(unassigned to data segment) or LUKS2
token (unassigned to keyslot)
--use-random Use /dev/random for generating volume
key
--use-urandom Use /dev/urandom for generating volume
key
--uuid=STRING UUID for device to use
--veracrypt Scan also for VeraCrypt compatible
device
--veracrypt-pim=INT Personal Iteration Multiplier for
VeraCrypt compatible device
--veracrypt-query-pim Query Personal Iteration Multiplier
for VeraCrypt compatible device
-v, --verbose Shows more detailed error messages
-y, --verify-passphrase Verifies the passphrase by asking for
it twice
-B, --block-size=MiB Reencryption block size
-N, --new Create new header on not encrypted
device
--use-directio Use direct-io when accessing devices
--use-fsync Use fsync after each block
--write-log Update log file after every block
--dump-master-key Alias for --dump-volume-key
--master-key-file=STRING Alias for --dump-volume-key-file
<action> is one of:
open <device> [--type <type>] [<name>] - open device as <name>
close <name> - close device (remove mapping)
resize <name> - resize active device
status <name> - show device status
benchmark [--cipher <cipher>] - benchmark cipher
repair <device> - try to repair on-disk metadata
reencrypt <device> - reencrypt LUKS2 device
erase <device> - erase all keyslots (remove encryption key)
convert <device> - convert LUKS from/to LUKS2 format
config <device> - set permanent configuration options for LUKS2
luksFormat <device> [<new key file>] - formats a LUKS device
luksAddKey <device> [<new key file>] - add key to LUKS device
luksRemoveKey <device> [<key file>] - removes supplied key or key file from LUKS device
luksChangeKey <device> [<key file>] - changes supplied key or key file of LUKS device
luksConvertKey <device> [<key file>] - converts a key to new pbkdf parameters
luksKillSlot <device> <key slot> - wipes key with number <key slot> from LUKS device
luksUUID <device> - print UUID of LUKS device
isLuks <device> - tests <device> for LUKS partition header
luksDump <device> - dump LUKS partition information
tcryptDump <device> - dump TCRYPT device information
bitlkDump <device> - dump BITLK device information
fvault2Dump <device> - dump FVAULT2 device information
luksSuspend <device> - Suspend LUKS device and wipe key (all IOs are frozen)
luksResume <device> - Resume suspended LUKS device
luksHeaderBackup <device> - Backup LUKS device header and keyslots
luksHeaderRestore <device> - Restore LUKS device header and keyslots
token <add|remove|import|export> <device> - Manipulate LUKS2 tokens
You can also use old <action> syntax aliases:
open: create (plainOpen), luksOpen, loopaesOpen, tcryptOpen, bitlkOpen, fvault2Open
close: remove (plainClose), luksClose, loopaesClose, tcryptClose, bitlkClose, fvault2Close
<name> is the device to create under /dev/mapper
<device> is the encrypted device
<key slot> is the LUKS key slot number to modify
<key file> optional key file for the new key for luksAddKey action
Default compiled-in metadata format is LUKS2 (for luksFormat action).
LUKS2 external token plugin support is compiled-in.
LUKS2 external token plugin path: /lib/x86_64-linux-gnu/cryptsetup.
Default compiled-in key and passphrase parameters:
Maximum keyfile size: 8192kB, Maximum interactive passphrase length 512 (characters)
Default PBKDF for LUKS1: pbkdf2, iteration time: 2000 (ms)
Default PBKDF for LUKS2: argon2id
Iteration time: 2000, Memory required: 1048576kB, Parallel threads: 4
Default compiled-in device cipher parameters:
loop-AES: aes, Key 256 bits
plain: aes-cbc-essiv:sha256, Key: 256 bits, Password hashing: ripemd160
LUKS: aes-xts-plain64, Key: 256 bits, LUKS header hashing: sha256, RNG: /dev/urandom
LUKS: Default keysize with XTS mode (two internal keys) will be doubled.
On my Debian 12 GNOME work laptop:
```bash
cryptsetup reencrypt --help
```
<details>
<summary>Output:</summary>
```
cryptsetup 2.6.1 flags: UDEV BLKID KEYRING KERNEL_CAPI
Usage: cryptsetup [OPTION...] <action> <action-specific>
Help options:
-?, --help Show this help message
--usage Display brief usage
-V, --version Print package version
--active-name=STRING Override device autodetection of dm
device to be reencrypted
--align-payload=SECTORS Align payload at <n> sector boundaries
- for luksFormat
--allow-discards Allow discards (aka TRIM) requests for
device
-q, --batch-mode Do not ask for confirmation
--cancel-deferred Cancel a previously set deferred
device removal
-c, --cipher=STRING The cipher used to encrypt the disk
(see /proc/crypto)
--debug Show debug messages
--debug-json Show debug messages including JSON
metadata
--deferred Device removal is deferred until the
last user closes it
--device-size=bytes Use only specified device size (ignore
rest of device). DANGEROUS!
--decrypt Decrypt LUKS2 device (remove
encryption).
--disable-external-tokens Disable loading of external LUKS2
token plugins
--disable-keyring Disable loading volume keys via kernel
keyring
--disable-locks Disable locking of on-disk metadata
--disable-veracrypt Do not scan for VeraCrypt compatible
device
--dump-json-metadata Dump info in JSON format (LUKS2 only)
--dump-volume-key Dump volume key instead of keyslots
info
--encrypt Encrypt LUKS2 device (in-place
encryption).
--force-password Disable password quality check (if
enabled)
--force-offline-reencrypt Force offline LUKS2 reencryption and
bypass active device detection.
-h, --hash=STRING The hash used to create the encryption
key from the passphrase
--header=STRING Device or file with separated LUKS
header
--header-backup-file=STRING File with LUKS header and keyslots
backup
--hotzone-size=bytes Maximal reencryption hotzone size.
--init-only Initialize LUKS2 reencryption in
metadata only.
-I, --integrity=STRING Data integrity algorithm (LUKS2 only)
--integrity-legacy-padding Use inefficient legacy padding (old
kernels)
--integrity-no-journal Disable journal for integrity device
--integrity-no-wipe Do not wipe device after format
-i, --iter-time=msecs PBKDF iteration time for LUKS (in ms)
--iv-large-sectors Use IV counted in sector size (not in
512 bytes)
--json-file=STRING Read or write the json from or to a
file
--keep-key Do not change volume key.
--key-description=STRING Key description
-d, --key-file=STRING Read the key from a file
-s, --key-size=BITS The size of the encryption key
-S, --key-slot=INT Slot number for new key (default is
first free)
--keyfile-offset=bytes Number of bytes to skip in keyfile
-l, --keyfile-size=bytes Limits the read from keyfile
--keyslot-cipher=STRING LUKS2 keyslot: The cipher used for
keyslot encryption
--keyslot-key-size=BITS LUKS2 keyslot: The size of the
encryption key
--label=STRING Set label for the LUKS2 device
--luks2-keyslots-size=bytes LUKS2 header keyslots area size
--luks2-metadata-size=bytes LUKS2 header metadata area size
--volume-key-file=STRING Use the volume key from file.
--new-keyfile=STRING Read the key for a new slot from a file
--new-key-slot=INT Slot number for new key (default is
first free)
--new-keyfile-offset=bytes Number of bytes to skip in newly added
keyfile
--new-keyfile-size=bytes Limits the read from newly added
keyfile
--new-token-id=INT Token number (default: any)
-o, --offset=SECTORS The start offset in the backend device
--pbkdf=STRING PBKDF algorithm (for LUKS2): argon2i,
argon2id, pbkdf2
--pbkdf-force-iterations=LONG PBKDF iterations cost (forced,
disables benchmark)
--pbkdf-memory=kilobytes PBKDF memory cost limit
--pbkdf-parallel=threads PBKDF parallel cost
--perf-no_read_workqueue Bypass dm-crypt workqueue and process
read requests synchronously
--perf-no_write_workqueue Bypass dm-crypt workqueue and process
write requests synchronously
--perf-same_cpu_crypt Use dm-crypt same_cpu_crypt
performance compatibility option
--perf-submit_from_crypt_cpus Use dm-crypt submit_from_crypt_cpus
performance compatibility option
--persistent Set activation flags persistent for
device
--priority=STRING Keyslot priority: ignore, normal,
prefer
--progress-json Print progress data in json format
(suitable for machine processing)
--progress-frequency=secs Progress line update (in seconds)
-r, --readonly Create a readonly mapping
--reduce-device-size=bytes Reduce data device size (move data
offset). DANGEROUS!
--refresh Refresh (reactivate) device with new
parameters
--resilience=STRING Reencryption hotzone resilience type
(checksum,journal,none)
--resilience-hash=STRING Reencryption hotzone checksums hash
--resume-only Resume initialized LUKS2 reencryption
only.
--sector-size=INT Encryption sector size (default: 512
bytes)
--serialize-memory-hard-pbkdf Use global lock to serialize memory
hard PBKDF (OOM workaround)
--shared Share device with another
non-overlapping crypt segment
-b, --size=SECTORS The size of the device
-p, --skip=SECTORS How many sectors of the encrypted data
to skip at the beginning
--subsystem=STRING Set subsystem label for the LUKS2
device
--tcrypt-backup Use backup (secondary) TCRYPT header
--tcrypt-hidden Use hidden header (hidden TCRYPT
device)
--tcrypt-system Device is system TCRYPT drive (with
bootloader)
--test-args Do not run action, just validate all
command line parameters
--test-passphrase Do not activate device, just check
passphrase
-t, --timeout=secs Timeout for interactive passphrase
prompt (in seconds)
--token-id=INT Token number (default: any)
--token-only Do not ask for passphrase if
activation by token fails
--token-replace Replace the current token
--token-type=STRING Restrict allowed token types used to
retrieve LUKS2 key
-T, --tries=INT How often the input of the passphrase
can be retried
-M, --type=STRING Type of device metadata: luks, luks1,
luks2, plain, loopaes, tcrypt, bitlk
--unbound Create or dump unbound LUKS2 keyslot
(unassigned to data segment) or LUKS2
token (unassigned to keyslot)
--use-random Use /dev/random for generating volume
key
--use-urandom Use /dev/urandom for generating volume
key
--uuid=STRING UUID for device to use
--veracrypt Scan also for VeraCrypt compatible
device
--veracrypt-pim=INT Personal Iteration Multiplier for
VeraCrypt compatible device
--veracrypt-query-pim Query Personal Iteration Multiplier
for VeraCrypt compatible device
-v, --verbose Shows more detailed error messages
-y, --verify-passphrase Verifies the passphrase by asking for
it twice
-B, --block-size=MiB Reencryption block size
-N, --new Create new header on not encrypted
device
--use-directio Use direct-io when accessing devices
--use-fsync Use fsync after each block
--write-log Update log file after every block
--dump-master-key Alias for --dump-volume-key
--master-key-file=STRING Alias for --dump-volume-key-file
<action> is one of:
open <device> [--type <type>] [<name>] - open device as <name>
close <name> - close device (remove mapping)
resize <name> - resize active device
status <name> - show device status
benchmark [--cipher <cipher>] - benchmark cipher
repair <device> - try to repair on-disk metadata
reencrypt <device> - reencrypt LUKS2 device
erase <device> - erase all keyslots (remove encryption key)
convert <device> - convert LUKS from/to LUKS2 format
config <device> - set permanent configuration options for LUKS2
luksFormat <device> [<new key file>] - formats a LUKS device
luksAddKey <device> [<new key file>] - add key to LUKS device
luksRemoveKey <device> [<key file>] - removes supplied key or key file from LUKS device
luksChangeKey <device> [<key file>] - changes supplied key or key file of LUKS device
luksConvertKey <device> [<key file>] - converts a key to new pbkdf parameters
luksKillSlot <device> <key slot> - wipes key with number <key slot> from LUKS device
luksUUID <device> - print UUID of LUKS device
isLuks <device> - tests <device> for LUKS partition header
luksDump <device> - dump LUKS partition information
tcryptDump <device> - dump TCRYPT device information
bitlkDump <device> - dump BITLK device information
fvault2Dump <device> - dump FVAULT2 device information
luksSuspend <device> - Suspend LUKS device and wipe key (all IOs are frozen)
luksResume <device> - Resume suspended LUKS device
luksHeaderBackup <device> - Backup LUKS device header and keyslots
luksHeaderRestore <device> - Restore LUKS device header and keyslots
token <add|remove|import|export> <device> - Manipulate LUKS2 tokens
You can also use old <action> syntax aliases:
open: create (plainOpen), luksOpen, loopaesOpen, tcryptOpen, bitlkOpen, fvault2Open
close: remove (plainClose), luksClose, loopaesClose, tcryptClose, bitlkClose, fvault2Close
<name> is the device to create under /dev/mapper
<device> is the encrypted device
<key slot> is the LUKS key slot number to modify
<key file> optional key file for the new key for luksAddKey action
Default compiled-in metadata format is LUKS2 (for luksFormat action).
LUKS2 external token plugin support is compiled-in.
LUKS2 external token plugin path: /lib/x86_64-linux-gnu/cryptsetup.
Default compiled-in key and passphrase parameters:
Maximum keyfile size: 8192kB, Maximum interactive passphrase length 512 (characters)
Default PBKDF for LUKS1: pbkdf2, iteration time: 2000 (ms)
Default PBKDF for LUKS2: argon2id
Iteration time: 2000, Memory required: 1048576kB, Parallel threads: 4
Default compiled-in device cipher parameters:
loop-AES: aes, Key 256 bits
plain: aes-cbc-essiv:sha256, Key: 256 bits, Password hashing: ripemd160
LUKS: aes-xts-plain64, Key: 256 bits, LUKS header hashing: sha256, RNG: /dev/urandom
LUKS: Default keysize with XTS mode (two internal keys) will be doubled.
```
</details>
--reduce-device-size=bytes Reduce data device size (move data
offset). DANGEROUS!
...
-M, --type=STRING Type of device metadata: luks, luks1,
luks2, plain, loopaes, tcrypt, bitlk
...
-N, --new Create new header on not encrypted
device
<details>
<summary>Based on above Ask Ubuntu answer:</summary>
```
--reduce-device-size=bytes Reduce data device size (move data
offset). DANGEROUS!
...
-M, --type=STRING Type of device metadata: luks, luks1,
luks2, plain, loopaes, tcrypt, bitlk
...
-N, --new Create new header on not encrypted
device
```
</details>
[wiki.archlinux.org: dm-crypt/Device encryption#Encrypt an existing unencrypted file system (824010)](https://wiki.archlinux.org/index.php?title=Dm-crypt/Device_encryption&oldid=824010#Encrypt_an_existing_unencrypted_file_system)
...
-M Shrink the file system to minimize its size as much as possible, given the files stored in the file system.
-p Print out percentage completion bars for each resize2fs phase during an offline (non-trivial) resize operation, so that the user can keep track of what the program is doing. (For very fast
resize operations, no progress bars may be displayed.)
...
```bash
man resize2fs
```
<details>
<summary>Output:</summary>
```
...
-M Shrink the file system to minimize its size as much as possible, given the files stored in the file system.
-p Print out percentage completion bars for each resize2fs phase during an offline (non-trivial) resize operation, so that the user can keep track of what the program is doing. (For very fast
resize operations, no progress bars may be displayed.)
...
```
</details>
But as of Buster cryptsetup(8) defaults to a new LUKS header format version, which isn’t supported by GRUB as of 2.04. Hence the pre-Buster workarounds won’t work anymore. Until LUKS version 2 support is added to GRUB2, the device(s) holding /boot needs to be in LUKS format version 1 to be unlocked from the boot loader.
> Create a initramfs hoock script which copies cryptestup via copy-exec
> P.S The troubleshooting guide was written from memory, so there might be some missing pieces.
Should investigate:
https://cryptsetup-team.pages.debian.net/cryptsetup/encrypted-boot.html
> But as of Buster cryptsetup(8) defaults to a new LUKS header format version, which isn’t supported by GRUB as of 2.04. Hence the pre-Buster workarounds won’t work anymore. Until LUKS version 2 support is added to GRUB2, the device(s) holding /boot needs to be in LUKS format version 1 to be unlocked from the boot loader.
> Guilhem Moulin guilhem@debian.org, Sun, 09 Jun 2019 16:35:20 +0200
does not request a password or output anything, same for /dev/vda1 and it does not return change anything during reboot.
Let us try from a live ISO. Does not help cryptsetup reencrypt.
What about Debian 12 GNOME to just encrypt ext4 with LUKS without LVM?
<details>
<summary>This would help the person:</summary>
```
-----BEGIN PGP MESSAGE-----
hF4DTQa9Wom5MBgSAQdAkFeKpINt90ePvuqcXZWafRH9EcVJjujCtlJNuMMJBkww
Ji6igV8YIebX/NEDp87Tkd//6Yb7Wft+fyc4M5hNcxawx7DxW4HNwPAzK2O42bpx
0kABiurBTGj5rSV1ms7bUFaJIU5C3VcvAASllQIgAWMvlglob6XrvrPmaYPf3bXO
TmS/OCxBQfsKYQ0mfL7/yCnn
=kEFt
-----END PGP MESSAGE-----
```
</details>
<details>
<summary>See the Tchap message where the person states not needing it finally by proceeding to a reinstall:</summary>
```
-----BEGIN PGP MESSAGE-----
hF4DTQa9Wom5MBgSAQdANT2B5VHY4tt0YWphixyQ9lEA66Khc/vHYlbxSDGUZxAw
p9RSsi9+D6/rVQemnwLDw2s+e2ZUS4DpsuCzOSPHni9zUAUzsl9PvPFvPgjP3pav
0qoB6CW2V8J4Z55AoXEaR6tX+oWf32UhkBXJqd79p/Thn1QORhF2mfkRKessR00o
Ah1QGgnIyH+0499RwGHT/gMKTppfaH2DcGAqSRkHS1YQkAjU6d2pjH3mxwaGWpJ8
f4rmAEIg5SL+MwBDDyiGWVjgtNEELLCBvlSzXX/fEkDPIY2y7sstXue4ERjZWPj1
pbl+fci+ddK/mEjq6I0jrinXvxIqBigyLILyUQ==
=kdpZ
-----END PGP MESSAGE-----
```
</details>
```bash
sudo fdisk -l
```
<details>
<summary>Output:</summary>
```
Disk /dev/vda: 30 GiB, 32212254720 bytes, 62914560 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xfefb7d07
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 62912511 62910464 30G 83 Linux
```
</details>
```bash
df -h
```
<details>
<summary>Output:</summary>
```
Filesystem Size Used Avail Use% Mounted on
udev 7.6G 0 7.6G 0% /dev
tmpfs 1.6G 1.4M 1.6G 1% /run
/dev/vda1 30G 11G 18G 37% /
tmpfs 7.7G 0 7.7G 0% /dev/shm
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
tmpfs 1.6G 96K 1.6G 1% /run/user/1000
```
</details>
```bash
sudo gparted
```
<details>
<summary>Output:</summary>
```
GParted 1.3.1
configuration --enable-libparted-dmraid --enable-online-resize
libparted 3.5
```
</details>
```bash
sudo cryptsetup reencrypt /dev/vda
```
does not request a password or output anything, same for `/dev/vda1` and it does not return change anything during reboot.
Let us try from a live ISO. Does not help `cryptsetup reencrypt`.
WARNING!
========
This will overwrite data on LUKS2-temp-4ce57ca1-ca7c-4b06-abb8-eb0892d6897e.new irrevocably.
Are you sure? (Type 'yes' in capital letters): YES
Enter passphrase for LUKS2-temp-4ce57ca1-ca7c-4b06-abb8-eb0892d6897e.new:
Verify passphrase:
Finished, time 01m10s, 29 GiB written, speed 434.1 MiB/s
```bash
sudo cryptsetup reencrypt --encrypt --reduce-device-size 32M /dev/vda1
```
<details>
<summary>Output:</summary>
```
WARNING!
========
This will overwrite data on LUKS2-temp-4ce57ca1-ca7c-4b06-abb8-eb0892d6897e.new irrevocably.
Are you sure? (Type 'yes' in capital letters): YES
Enter passphrase for LUKS2-temp-4ce57ca1-ca7c-4b06-abb8-eb0892d6897e.new:
Verify passphrase:
Finished, time 01m10s, 29 GiB written, speed 434.1 MiB/s
```
</details>
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on /dev/mapper/recrypt to 7859712 (4k) blocks.
The filesystem on /dev/mapper/recrypt is now 7859712 (4k) blocks long.
```bash
sudo cryptsetup open /dev/vda1 recrypt
```
```
Enter passphrase for /dev/vda1:
```
```bash
sudo resize2fs /dev/mapper/recrypt
```
<details>
<summary>Output:</summary>
```
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on /dev/mapper/recrypt to 7859712 (4k) blocks.
The filesystem on /dev/mapper/recrypt is now 7859712 (4k) blocks long.
```
</details>
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# systemd generates mount units based on this file, see systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/nvme0n1p8_crypt / ext4 errors=remount-ro 0 1
# /boot was on /dev/nvme0n1p9 during installation
UUID=457a754f-11ce-4fe8-8e3e-1fab836e1522 /boot ext4 defaults 0 2
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=1CCC-5836 /boot/efi vfat umask=0077 0 1
/dev/mapper/cryptswap1 none swap sw 0 0
On my Debian 12 GNOME laptop:
<details>
<summary><code>/etc/fstab</code>:</summary>
```
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# systemd generates mount units based on this file, see systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/nvme0n1p8_crypt / ext4 errors=remount-ro 0 1
# /boot was on /dev/nvme0n1p9 during installation
UUID=457a754f-11ce-4fe8-8e3e-1fab836e1522 /boot ext4 defaults 0 2
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=1CCC-5836 /boot/efi vfat umask=0077 0 1
/dev/mapper/cryptswap1 none swap sw 0 0
```
</details>
<details>
<summary><code>/etc/crypttab</code>:</summary>
```
nvme0n1p8_crypt UUID=7acc5e49-df7d-48c2-a3a2-7c29c2fe88bd none luks,discard
cryptswap1 /dev/nvme0n1p10 none luks
```
</details>
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# systemd generates mount units based on this file, see systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/vda1 during installation
UUID=0e9a3032-7390-4a7f-8073-e690fc58839a / ext4 errors=remount-ro 0 1
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
<details>
<summary><code>/mnt/etc/fstab</code>:</summary>
```
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# systemd generates mount units based on this file, see systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/vda1 during installation
UUID=0e9a3032-7390-4a7f-8073-e690fc58839a / ext4 errors=remount-ro 0 1
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
```
</details>
<details>
<summary><code>/mnt/etc/crypttab</code>:</summary>
```
# <target name> <source device> <key file> <options>
```
</details>
Let us try:
<details>
<summary><code>/etc/fstab</code>:</summary>
```
/dev/mapper/crypt / ext4 errors=remount-ro 0 1
```
</details>
<details>
<summary><code>/etc/crypttab</code>:</summary>
```
crypt UUID=4ce57ca1-ca7c-4b06-abb8-eb0892d6897e none luks,discard
```
</details>
<details>
<summary>Even if I ended up making it work the other person:</summary>
```
-----BEGIN PGP MESSAGE-----
hF4DTQa9Wom5MBgSAQdASXJgMVKdFtUMDUXDlcgT7Xh9anL/r0e9IzjRD3qRkkkw
ZpkwedyIw6BDrAanQokG7n3O/VpSqSfh841p8TU29bZbjsSeIUI5f3cAAqd3JG1i
0kAB91sZ4apcbyw/MxP9f2k1ZJXjeatq1wfY8ncu7SsPq2jJ3R4+oSGVKhNnq99L
4ac40hEcUnSyVlcXwjlSM6FS
=6/of
-----END PGP MESSAGE-----
```
</details>
is not interested as I explain him the dis/advantages, see [issues/22#issuecomment-2956](issues/22#issuecomment-2956).
Should test with:
<details>
<summary><code>/etc/mkinitcpio.conf</code>:</summary>
```
HOOKS=(base systemd autodetect microcode modconf kms keyboard sd-vconsole block sd-encrypt lvm2 filesystems fsck)
```
</details>
[wiki.archlinux.org: Mkinitcpio#Image creation and activation (823193)](https://wiki.archlinux.org/index.php?title=Mkinitcpio&oldid=823193#Image_creation_and_activation) makes me believe that `mkinitcpio` is Arch specific.
[wiki.archlinux.org: Dm-crypt/System configuration#Unlocking in late userspace (822797)](https://wiki.archlinux.org/index.php?title=Dm-crypt/System_configuration&oldid=822797#Unlocking_in_late_userspace) may help.
[Improve_websites_thanks_to_open_source/issues/967](https://codeberg.org/Benjamin_Loison/Improve_websites_thanks_to_open_source/issues/967) would help.
does not know how to do so and would be interested in doing so. It is still the case as of 21/10/25, source: oral physically.
<details>
<summary>The person:</summary>
```
-----BEGIN PGP MESSAGE-----
hF4DTQa9Wom5MBgSAQdAnjXfF610P10McbnJw0vpT6PVOPLQ4jctrNNlEgSbZR8w
I0m6u2Eyxb5//CUgyIfLvu+Kz3Ad2622hm8BC3HMwhbitXfHknKrvV2TWldHDjCG
0rIBUWeDYnkVuPHgM32AUZQOLxt6TkPA1uXObbwXW2EUqYxvYnGTdlvCEg/SxJaj
KB/z8p/H600DYm9Ni29kLWEWMtvXWghDSRnptWakQDaWXx1RRMtsWOvmowDaHhaL
ezB/7xYZ8Rg4eVg+dxxjcQ4hAvn5fh2A6TE49kBmR2E3m5mR5O2l/LHID7nmR6ZI
fHOyIZ236BTSiOwWnrtXprXRQ3C5xCrZi/oeknak1BT1889q
=SHs/
-----END PGP MESSAGE-----
```
</details>
does not know how to do so and would be interested in doing so. It is still the case as of 21/10/25, source: oral physically.
Maybe can somehow access raw ext4 in encrypted container, then just copy with dd. Just copying files and folders from / does not seem very correct to me, but may be.
Maybe can somehow access raw ext4 in encrypted container, then just copy with `dd`. Just copying files and folders from `/` does not seem very correct to me, but may be.
I quickly have read [johndoe31415/luksipc/issues/](https://github.com/johndoe31415/luksipc/issues){[13](https://github.com/johndoe31415/luksipc/issues/13),[12](https://github.com/johndoe31415/luksipc/issues/12)}. In the latter [johndoe31415/luksipc/issues/12#issuecomment-256700470](https://github.com/johndoe31415/luksipc/issues/12#issuecomment-256700470) may be especially useful. Other issues and pull requests do not seem relevant based on their titles and there is no wiki.
Ubuntu 18.04 and above offers to encrypt your hard disk in automated fashion during its installation using dm-crypt and LUKS [1]. However, this option forces you to wipe your entire disk, which is not an option if you already have another operating system installed, such as Windows. This tutorial describes in detail how to encrypt your existing root partition in Ubuntu preserving all disk data.
there is no way to encrypt a mounted partition in Linux and you cannot unmount the root partition from which you have booted, so you will have to boot from a live USB
> there is no way to encrypt a mounted partition in Linux and you cannot unmount the root partition from which you have booted, so you will have to boot from a live USB
Reboot your workstation, enter your UEFI firmware, set the USB device to boot before the hard disk, save your changes, leave the firmware and boot in the live USB selecting the “Try Ubuntu without installing” in the GRUB menu
> Reboot your workstation, enter your UEFI firmware, set the USB device to boot before the hard disk, save your changes, leave the firmware and boot in the live USB selecting the “Try Ubuntu without installing” in the GRUB menu
-M Shrink the file system to minimize its size as much as possible, given the files stored in the file system.
```bash
man resize2fs | grep -E '^ +-M'
```
```
-M Shrink the file system to minimize its size as much as possible, given the files stored in the file system.
```
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on /dev/vda2 to 3049008 (4k) blocks.
The filesystem on /dev/vda2 is now 3049008 (4k) blocks long.
```bash
sudo resize2fs -M /dev/vda2
```
<details>
<summary>Output:</summary>
```
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on /dev/vda2 to 3049008 (4k) blocks.
The filesystem on /dev/vda2 is now 3049008 (4k) blocks long.
```
</details>
```bash
cryptsetup reencrypt /dev/vda2 --new --reduce-device-size 16M --type=luks1
```
```
bash: cryptsetup: command not found
```
Should try without `--type` if it works fine.
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on /dev/mapper/rootfs to 4857344 (4k) blocks.
The filesystem on /dev/mapper/rootfs is now 4857344 (4k) blocks long.
```bash
sudo resize2fs /dev/mapper/rootfs
```
<details>
<summary>Output:</summary>
```
resize2fs 1.47.0 (5-Feb-2023)
Resizing the filesystem on /dev/mapper/rootfs to 4857344 (4k) blocks.
The filesystem on /dev/mapper/rootfs is now 4857344 (4k) blocks long.
```
</details>
mount: /mnt: must be superuser to use mount.
dmesg(1) may have more information after failed mount system call.
```bash
mount /dev/mapper/rootfs /mnt
```
<details>
<summary>Output:</summary>
```
mount: /mnt: must be superuser to use mount.
dmesg(1) may have more information after failed mount system call.
```
</details>
sudo mount /dev/mapper/rootfs /mnt
sudo mount /dev/vda1 /mnt/boot/efi
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /sys /mnt/sys
sudo mount --bind /proc /mnt/proc
does not return anything.
Are all these mounts necessary?
<details>
<summary>Bash script:</summary>
```bash
sudo mount /dev/mapper/rootfs /mnt
sudo mount /dev/vda1 /mnt/boot/efi
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /sys /mnt/sys
sudo mount --bind /proc /mnt/proc
```
</details>
does not return anything.
Are all these mounts necessary?
With the current setup, the system would ask the encryption passphrase twice: once to access the second-stage GRUB boot loader and once again for the Linux kernel to access the encrypted root partition when it boots. In order not to require typing the encryption passphrase the second time, a keyfile must be created, added to LUKS and set up in /etc/crypttab, which describes the encrypted block devices that are set up during system boot.
Let us verify this fact.
So this does not seem expected.
> With the current setup, the system would ask the encryption passphrase twice: once to access the second-stage GRUB boot loader and once again for the Linux kernel to access the encrypted root partition when it boots. In order not to require typing the encryption passphrase the second time, a keyfile must be created, added to LUKS and set up in /etc/crypttab, which describes the encrypted block devices that are set up during system boot.
Let us verify this fact.

So this does not seem expected.
Installing for x86_64-efi platform.
grub-install: warning: EFI variables are not supported on this system..
Installation finished. No error reported.
I guess that the second line is due to live USB key.
```bash
grub-install
```
<details>
<summary>Output:</summary>
```
Installing for x86_64-efi platform.
grub-install: warning: EFI variables are not supported on this system..
Installation finished. No error reported.
```
</details>
I guess that the second line is due to live USB key.
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.1.0-32-amd64
Found initrd image: /boot/initrd.img-6.1.0-32-amd64
Found linux image: /boot/vmlinuz-6.1.0-29-amd64
Found initrd image: /boot/initrd.img-6.1.0-29-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
```bash
update-grub
```
<details>
<summary>Output:</summary>
```
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.1.0-32-amd64
Found initrd image: /boot/initrd.img-6.1.0-32-amd64
Found linux image: /boot/vmlinuz-6.1.0-29-amd64
Found initrd image: /boot/initrd.img-6.1.0-29-amd64
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
```
</details>
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
insmod png
if background_image /usr/share/desktop-base/emerald-theme/grub/grub-4x3.png; then
set color_normal=white/black
set color_highlight=black/white
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-8eb1534f-39c0-4ded-907e-aee490cb2f3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
echo 'Loading Linux 6.1.0-32-amd64 ...'
linux /boot/vmlinuz-6.1.0-32-amd64 root=UUID=8eb1534f-39c0-4ded-907e-aee490cb2f3f ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-32-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-8eb1534f-39c0-4ded-907e-aee490cb2f3f' {
menuentry 'Debian GNU/Linux, with Linux 6.1.0-32-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-32-amd64-advanced-8eb1534f-39c0-4ded-907e-aee490cb2f3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
echo 'Loading Linux 6.1.0-32-amd64 ...'
linux /boot/vmlinuz-6.1.0-32-amd64 root=UUID=8eb1534f-39c0-4ded-907e-aee490cb2f3f ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-32-amd64
}
menuentry 'Debian GNU/Linux, with Linux 6.1.0-32-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-32-amd64-recovery-8eb1534f-39c0-4ded-907e-aee490cb2f3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
echo 'Loading Linux 6.1.0-32-amd64 ...'
linux /boot/vmlinuz-6.1.0-32-amd64 root=UUID=8eb1534f-39c0-4ded-907e-aee490cb2f3f ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-32-amd64
}
menuentry 'Debian GNU/Linux, with Linux 6.1.0-29-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-29-amd64-advanced-8eb1534f-39c0-4ded-907e-aee490cb2f3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
echo 'Loading Linux 6.1.0-29-amd64 ...'
linux /boot/vmlinuz-6.1.0-29-amd64 root=UUID=8eb1534f-39c0-4ded-907e-aee490cb2f3f ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-29-amd64
}
menuentry 'Debian GNU/Linux, with Linux 6.1.0-29-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-29-amd64-recovery-8eb1534f-39c0-4ded-907e-aee490cb2f3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
echo 'Loading Linux 6.1.0-29-amd64 ...'
linux /boot/vmlinuz-6.1.0-29-amd64 root=UUID=8eb1534f-39c0-4ded-907e-aee490cb2f3f ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-29-amd64
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
I have not verified the random part but there blue rectangles match above.
<details>
<summary><code>/boot/grub/grub.cfg</code>:</summary>
```
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=5
fi
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
insmod png
if background_image /usr/share/desktop-base/emerald-theme/grub/grub-4x3.png; then
set color_normal=white/black
set color_highlight=black/white
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-8eb1534f-39c0-4ded-907e-aee490cb2f3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
echo 'Loading Linux 6.1.0-32-amd64 ...'
linux /boot/vmlinuz-6.1.0-32-amd64 root=UUID=8eb1534f-39c0-4ded-907e-aee490cb2f3f ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-32-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-8eb1534f-39c0-4ded-907e-aee490cb2f3f' {
menuentry 'Debian GNU/Linux, with Linux 6.1.0-32-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-32-amd64-advanced-8eb1534f-39c0-4ded-907e-aee490cb2f3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
echo 'Loading Linux 6.1.0-32-amd64 ...'
linux /boot/vmlinuz-6.1.0-32-amd64 root=UUID=8eb1534f-39c0-4ded-907e-aee490cb2f3f ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-32-amd64
}
menuentry 'Debian GNU/Linux, with Linux 6.1.0-32-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-32-amd64-recovery-8eb1534f-39c0-4ded-907e-aee490cb2f3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
echo 'Loading Linux 6.1.0-32-amd64 ...'
linux /boot/vmlinuz-6.1.0-32-amd64 root=UUID=8eb1534f-39c0-4ded-907e-aee490cb2f3f ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-32-amd64
}
menuentry 'Debian GNU/Linux, with Linux 6.1.0-29-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-29-amd64-advanced-8eb1534f-39c0-4ded-907e-aee490cb2f3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
echo 'Loading Linux 6.1.0-29-amd64 ...'
linux /boot/vmlinuz-6.1.0-29-amd64 root=UUID=8eb1534f-39c0-4ded-907e-aee490cb2f3f ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-29-amd64
}
menuentry 'Debian GNU/Linux, with Linux 6.1.0-29-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-29-amd64-recovery-8eb1534f-39c0-4ded-907e-aee490cb2f3f' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod cryptodisk
insmod luks
insmod gcry_rijndael
insmod gcry_rijndael
insmod gcry_sha256
insmod ext2
cryptomount -u feec2552ba7d4ad68ac8018e2f259b83
set root='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint='cryptouuid/feec2552ba7d4ad68ac8018e2f259b83' 8eb1534f-39c0-4ded-907e-aee490cb2f3f
else
search --no-floppy --fs-uuid --set=root 8eb1534f-39c0-4ded-907e-aee490cb2f3f
fi
echo 'Loading Linux 6.1.0-29-amd64 ...'
linux /boot/vmlinuz-6.1.0-29-amd64 root=UUID=8eb1534f-39c0-4ded-907e-aee490cb2f3f ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-29-amd64
}
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
```
</details>
I have not verified the random part but there blue rectangles match above.
umount: /mnt/dev: must be superuser to unmount.
umount: /mnt/boot/efi: must be superuser to unmount.
umount: /mnt: must be superuser to unmount.
umount: /run/user/1000/doc: must be superuser to unmount.
umount: /run/user/1000/gvfs: must be superuser to unmount.
umount: /run/user/1000: must be superuser to unmount.
umount: /proc/sys/fs/binfmt_misc: must be superuser to unmount.
umount: /run/credentials/systemd-tmpfiles-setup.service: must be superuser to unmount.
umount: /tmp: must be superuser to unmount.
umount: /run/credentials/systemd-sysctl.service: must be superuser to unmount.
umount: /run/credentials/systemd-tmpfiles-setup-dev.service: must be superuser to unmount.
umount: /run/credentials/systemd-sysusers.service: must be superuser to unmount.
umount: /sys/fs/fuse/connections: must be superuser to unmount.
umount: /sys/kernel/config: must be superuser to unmount.
umount: /sys/kernel/debug: must be superuser to unmount.
umount: /dev/mqueue: must be superuser to unmount.
umount: /sys/kernel/tracing: must be superuser to unmount.
umount: /dev/hugepages: must be superuser to unmount.
umount: /proc/sys/fs/binfmt_misc: must be superuser to unmount.
umount: /sys/fs/bpf: must be superuser to unmount.
umount: /sys/firmware/efi/efivars: must be superuser to unmount.
umount: /sys/fs/pstore: must be superuser to unmount.
umount: /sys/fs/cgroup: must be superuser to unmount.
umount: /run/lock: must be superuser to unmount.
umount: /dev/shm: must be superuser to unmount.
umount: /sys/kernel/security: must be superuser to unmount.
umount: /usr/lib/live/mount/overlay: must be superuser to unmount.
umount: /usr/lib/live/mount/rootfs/filesystem.squashfs: must be superuser to unmount.
umount: /usr/lib/live/mount/medium: must be superuser to unmount.
umount: /usr/lib/live/mount: must be superuser to unmount.
umount: /: must be superuser to unmount.
umount: /run/live/overlay: must be superuser to unmount.
umount: /run/live/rootfs/filesystem.squashfs: must be superuser to unmount.
umount: /run/live/medium: must be superuser to unmount.
umount: /run: must be superuser to unmount.
umount: /dev: must be superuser to unmount.
sudo umount -a
Output:
umount: /mnt/dev: target is busy.
umount: /mnt: target is busy.
umount: /run/user/1000: target is busy.
umount: /tmp: target is busy.
umount: /sys/fs/cgroup: target is busy.
umount: /: target is busy.
umount: /run/live/medium: target is busy.
umount: /run: target is busy.
umount: /dev: target is busy.
```bash
umount -a
```
<details>
<summary>Output:</summary>
```
umount: /mnt/dev: must be superuser to unmount.
umount: /mnt/boot/efi: must be superuser to unmount.
umount: /mnt: must be superuser to unmount.
umount: /run/user/1000/doc: must be superuser to unmount.
umount: /run/user/1000/gvfs: must be superuser to unmount.
umount: /run/user/1000: must be superuser to unmount.
umount: /proc/sys/fs/binfmt_misc: must be superuser to unmount.
umount: /run/credentials/systemd-tmpfiles-setup.service: must be superuser to unmount.
umount: /tmp: must be superuser to unmount.
umount: /run/credentials/systemd-sysctl.service: must be superuser to unmount.
umount: /run/credentials/systemd-tmpfiles-setup-dev.service: must be superuser to unmount.
umount: /run/credentials/systemd-sysusers.service: must be superuser to unmount.
umount: /sys/fs/fuse/connections: must be superuser to unmount.
umount: /sys/kernel/config: must be superuser to unmount.
umount: /sys/kernel/debug: must be superuser to unmount.
umount: /dev/mqueue: must be superuser to unmount.
umount: /sys/kernel/tracing: must be superuser to unmount.
umount: /dev/hugepages: must be superuser to unmount.
umount: /proc/sys/fs/binfmt_misc: must be superuser to unmount.
umount: /sys/fs/bpf: must be superuser to unmount.
umount: /sys/firmware/efi/efivars: must be superuser to unmount.
umount: /sys/fs/pstore: must be superuser to unmount.
umount: /sys/fs/cgroup: must be superuser to unmount.
umount: /run/lock: must be superuser to unmount.
umount: /dev/shm: must be superuser to unmount.
umount: /sys/kernel/security: must be superuser to unmount.
umount: /usr/lib/live/mount/overlay: must be superuser to unmount.
umount: /usr/lib/live/mount/rootfs/filesystem.squashfs: must be superuser to unmount.
umount: /usr/lib/live/mount/medium: must be superuser to unmount.
umount: /usr/lib/live/mount: must be superuser to unmount.
umount: /: must be superuser to unmount.
umount: /run/live/overlay: must be superuser to unmount.
umount: /run/live/rootfs/filesystem.squashfs: must be superuser to unmount.
umount: /run/live/medium: must be superuser to unmount.
umount: /run: must be superuser to unmount.
umount: /dev: must be superuser to unmount.
```
</details>
```bash
sudo umount -a
```
<details>
<summary>Output:</summary>
```
umount: /mnt/dev: target is busy.
umount: /mnt: target is busy.
umount: /run/user/1000: target is busy.
umount: /tmp: target is busy.
umount: /sys/fs/cgroup: target is busy.
umount: /: target is busy.
umount: /run/live/medium: target is busy.
umount: /run: target is busy.
umount: /dev: target is busy.
```
</details>
no matter if I have provided the correct or incorrect password.



no matter if I have provided the correct or incorrect password.
Testing on an actual computer may help, can dd to ease resetting the unencrypted disk state.
Note that I have an ad-hoc SATA SSD for such tests on my computer Pegasus.
Testing on an actual computer may help, can `dd` to ease resetting the unencrypted disk state.
Note that I have an ad-hoc SATA SSD for such tests on my computer Pegasus.
<details>
<summary>Does it actually preserve files and folders on ext4, once encrypt it? I would say so, see:</summary>
```
-----BEGIN PGP MESSAGE-----
hF4DTQa9Wom5MBgSAQdAptDpm7flAFMEqHMJY+2j8k/iHPRLkehboEtMzhH4KTIw
T2jXfJLe4T8jNbAh/PgwadtGWP5Rxg5B5ToSVk1noEsGjUz61/P3MzkIcObZ0b6q
0qoBymSEOE2RlTxzR1TttPz6n4Ry+mD3BvFCSFkKZLS7PVaQ9985rAZapO0TEjuE
DdQhaHlVfufF/NwoDzL1sVJr+6+6e7BUqHw9pLtXOdDUizsa/JqP75GSgdM+CpkS
2gBhRnzy8i+NypcSnwUktZ1m8ByXjQco5FMRxGHgpcfqAK/yyh4hL71To6fpU9cD
z/CA/WXyarqFwJvb4fDE+u1nfmYMb5BrcG3sTg==
=+afL
-----END PGP MESSAGE-----
```
</details>
https://ubuntuhandbook.org/index.php/2024/08/encrypt-existing-ubuntu-system/ looks promising but use a snapshot according to https://discourse.ubuntu.com/t/24-04-disk-encryption-not-available-during-install-if-using-a-partition-and-not-full-disk/55238/8.
https://ubuntuhandbook.org/index.php/2024/08/encrypt-existing-ubuntu-system/#comment-3758446 may help. However, above issue comments do not seem to face *initramfs* but *grub*.
Both on my Debian 12 GNOME laptop the Ubuntu /boot/ does not seem to have its specific partition and the Virtual Machine Manager Ubuntu (trust) virtual machine does not seem to have a /boot/ partition too.
Both on my Debian 12 GNOME laptop the Ubuntu `/boot/` does not seem to have its specific partition and the Virtual Machine Manager *Ubuntu (trust)* virtual machine does not seem to have a `/boot/` partition too.
So maybe can first proceed in a virtual machine even if it asks twice the password, then I'll try to add a workaround, as mentioned in https://ubuntuhandbook.org/index.php/2024/08/encrypt-existing-ubuntu-system/#comment-3757645, not to.
Well it does not seem to just be a question of asking twice the password but just following the tutorial.
https://ubuntuhandbook.org/wp-content/uploads/2024/08/encrypt-prepare.webp
Related to [Improve_websites_thanks_to_open_source/issues/1828](https://codeberg.org/Benjamin_Loison/Improve_websites_thanks_to_open_source/issues/1828).
il est difficile de chiffrer complètement un portable sous GNU/Linux après l'installation. Vous pouvez cependant créer un nouveau compte Unix sur le système, vous connecter et chiffrer le répertoire personnel de ce nouvel utilisateur à partir d'un autre compte, et enfin y copier les données que vous voulez mettre en sécurité
> il est difficile de chiffrer complètement un portable sous GNU/Linux après l'installation. Vous pouvez cependant créer un nouveau compte Unix sur le système, vous connecter et chiffrer le répertoire personnel de ce nouvel utilisateur à partir d'un autre compte, et enfin y copier les données que vous voulez mettre en sécurité
Source: https://wiki.extinctionrebellion.fr/books/securite-militante/page/securite-de-lordinateur-1-saisie-par-la-police
This repository was archived by the owner on Aug 8, 2025. It is now read-only.
https://www.privacyguides.org/en/encryption/#picocrypt-file should be removed in my opinion, as:
> This repository was archived by the owner on Aug 8, 2025. It is now read-only.
https://www.privacyguides.org/en/encryption/#veracrypt-disk
https://veracrypt.fr/code rediretcs to https://veracrypt.io/Code.html while https://veracrypt.io/en/Code.html is the working URL.
The person mentioned in https://pim.etesync.lemnoslife.com/pim/events/KZ_e7ykAkYyWD3ECaZgHyCYAweZhp_Rm|TFIQDQixnGy1vr5mjDZX9u2XL1IcBS8i is reinstalling Ubuntu for this reason, knowing the existence of `ecryptfs-migrate-home`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Would help Benjamin-Loison/cinnamon/issues/179.
Wikipedia: Linux Unified Key Setup (1239229939) may help.
Reading:
would also help.
+10
Related to Benjamin_Loison/ecryptfs/issues/8.
Wikipedia: Linux Unified Key Setup#Examples (1239229939) may help otherwise I read completely this article.
gpartedhelps?Can try in a virtual machine first.
Let us try from a fresh Linux Mint 22.1:
Screenshot_Linux_Mint_2025-01-18_15:58:46.pngdoes not request an encryption password and rebooting leads to usual login prompt.DuckDuckGo search Linux Mint enable full disk encryption after install.
Could investigate the documentation of:
cryptsetup reencryptcryptsetup-reencryptBacking up before encrypting seems safer.
As there is a decryption screen, there is no need to take screenshots how to access the disk from another system.
However, a final screenshot once encrypted of
gpartedto show that it is encrypted would be nice.https://forums.linuxmint.com/viewtopic.php?t=391261 seems more about not identical backup and restore.
The Ask Ubuntu answer 369623 states quickly that it is not possible.
Source: luksipc/blob/e222ca7ff89e7465345c8ae8786096130e06a30f/README.md?plain=1#L7-L11
Source: the Ask Ubuntu comment 2501628
Let us figure out why I faced above in https://gitea.lemnoslife.com/attachments/f3fda48c-04fc-4a5c-ac80-d884d6cde31c:
Output:
DuckDuckGo and Google search
"cryptosetup-reencrypt"and"cryptosetup-reencrypt" "apt".https://man7.org/linux/man-pages/man8/cryptsetup-reencrypt.8.html
On my Debian 12 GNOME work laptop:
https://command-not-found.com/cryptsetup-reencrypt
cryptsetup
The Ask Ubuntu question 1445879 faces the same issue as me.
https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/2014228/comments/5 seems to recommend instead
cryptsetup reencrypt.even if
sudo.On my Debian 12 GNOME work laptop:
Output:
Based on above Ask Ubuntu answer:
wiki.archlinux.org: dm-crypt/Device encryption#Encrypt an existing unencrypted file system (824010)
Is not shrinking the most heavier than shrinking the least possible.
Output:
Should investigate:
https://cryptsetup-team.pages.debian.net/cryptsetup/encrypted-boot.html
What about Debian 12 GNOME to just encrypt ext4 with LUKS without LVM?
This would help the person:
See the Tchap message where the person states not needing it finally by proceeding to a reinstall:
Output:
Output:
Output:
does not request a password or output anything, same for
/dev/vda1and it does not return change anything during reboot.Let us try from a live ISO. Does not help
cryptsetup reencrypt.Output:
Output:
Output:
Output:
Output:
Output:
On my Debian 12 GNOME laptop:
/etc/fstab:/etc/crypttab:/mnt/etc/fstab:/mnt/etc/crypttab:Output:
Replacing in
/mnt/etc/fstab0e9a3032-7390-4a7f-8073-e690fc58839awith4ce57ca1-ca7c-4b06-abb8-eb0892d6897edoes not help booting.Let us try:
/etc/fstab:/etc/crypttab:Even if I ended up making it work the other person:
is not interested as I explain him the dis/advantages, see issues/22#issuecomment-2956.
I may have an issue with the boot partition.
Above configuration is still stuck on SeaBIOS.
/mnt/etc/mkinitcpio.confdoes not exist.Should test with:
/etc/mkinitcpio.conf:wiki.archlinux.org: Mkinitcpio#Image creation and activation (823193) makes me believe that
mkinitcpiois Arch specific.wiki.archlinux.org: Dm-crypt/System configuration#Unlocking in late userspace (822797) may help.
Improve_websites_thanks_to_open_source/issues/967 would help.
See calendar event of 04/02/25 at 14:00 to encrypt my cloud VMs.
Could reinstall OVH VPS to activate encryption but this is too heavy.
The person:
does not know how to do so and would be interested in doing so. It is still the case as of 21/10/25, source: oral physically.
Maybe can somehow access raw ext4 in encrypted container, then just copy with
dd. Just copying files and folders from/does not seem very correct to me, but may be.DuckDuckGo and Google search Ubuntu full disk encryption after install.
I quickly have read johndoe31415/luksipc/issues/{13,12}. In the latter johndoe31415/luksipc/issues/12#issuecomment-256700470 may be especially useful. Other issues and pull requests do not seem relevant based on their titles and there is no wiki.
https://johndoe31415.github.io/luksipc/testing.html may be interesting but does not manage root partition case.
Source: https://opencraft.com/tutorial-encrypting-an-existing-root-partition-in-ubuntu-with-dm-crypt-and-luks/
On Debian 12 GNOME laptop Virtual Machine Manager Ubuntu (trust) virtual machine:
Output:
Output:
I doubt that it means UEFI being supported but let us try anyway.
Well this is 2 red flags, so let us stop.
Same Firmware on Debian (trust).
On Oracle Cloud free ARM VPS:
Source: the Ask Ubuntu answer 162896
DuckDuckGo search Linux check if booted with UEFI.
https://www.ovh.com/manager/#/dedicated/vps/vps713872.ovh.net/dashboard does not seem to help switching to UEFI.
DuckDuckGo search OVH Boot UEFI.
On Debian UEFI virtual machine:
From a virtual live USB:
Output:
Face Benjamin_Loison/virt-manager/issues/84.
Output:
Output:
Should try without
--typeif it works fine.Output:
Output:
Output:
Bash script:
does not return anything.
Are all these mounts necessary?
Let us verify this fact.
So this does not seem expected.
Output:
Should investigate the permissions given.
/etc/crypttab:should investigate
discardmeaning.Initial
/etc/fstab:I added:
there was no such reference.
Initial
/etc/default/grub:I added:
Output:
I guess that the second line is due to live USB key.
In another shell:
Output:
/boot/grub/grub.cfg:I have not verified the random part but there blue rectangles match above.
Output:
Should verify these parameters.
Output:
Output:
I disabled installing pending updates when requesting on graphical shutdown.
no matter if I have provided the correct or incorrect password.
Testing on an actual computer may help, can
ddto ease resetting the unencrypted disk state.Note that I have an ad-hoc SATA SSD for such tests on my computer Pegasus.
Should investigate:
Does it actually preserve files and folders on ext4, once encrypt it? I would say so, see:
Tracked at Benjamin_Loison/ext4/issues/5.
Should read Wikipedia: Disk encryption.
Would help Benjamin_Loison/Ubuntu/issues/17.
https://ubuntuhandbook.org/index.php/2024/08/encrypt-existing-ubuntu-system/ looks promising but use a snapshot according to https://discourse.ubuntu.com/t/24-04-disk-encryption-not-available-during-install-if-using-a-partition-and-not-full-disk/55238/8.
https://ubuntuhandbook.org/index.php/2024/08/encrypt-existing-ubuntu-system/#comment-3758446 may help. However, above issue comments do not seem to face initramfs but grub.
Both on my Debian 12 GNOME laptop the Ubuntu
/boot/does not seem to have its specific partition and the Virtual Machine Manager Ubuntu (trust) virtual machine does not seem to have a/boot/partition too.So maybe can first proceed in a virtual machine even if it asks twice the password, then I'll try to add a workaround, as mentioned in https://ubuntuhandbook.org/index.php/2024/08/encrypt-existing-ubuntu-system/#comment-3757645, not to.
Well it does not seem to just be a question of asking twice the password but just following the tutorial.
https://ubuntuhandbook.org/wp-content/uploads/2024/08/encrypt-prepare.webp
Could search how to start using a partition as the tutorial for
/boot/.Would help:
Related to Improve_websites_thanks_to_open_source/issues/1828.
Source: https://wiki.extinctionrebellion.fr/books/securite-militante/page/securite-de-lordinateur-1-saisie-par-la-police
https://www.privacyguides.org/en/encryption/#picocrypt-file should be removed in my opinion, as:
https://www.privacyguides.org/en/encryption/#veracrypt-disk
https://veracrypt.fr/code rediretcs to https://veracrypt.io/Code.html while https://veracrypt.io/en/Code.html is the working URL.
Related to Benjamin_Loison/mintstick/issues/3.
The person mentioned in https://pim.etesync.lemnoslife.com/pim/events/KZ_e7ykAkYyWD3ECaZgHyCYAweZhp_Rm|TFIQDQixnGy1vr5mjDZX9u2XL1IcBS8i is reinstalling Ubuntu for this reason, knowing the existence of
ecryptfs-migrate-home.