Moin,
Ich versuche eine verschlüsselte Installation von Xubuntu nach dieser https://www.martineve.com/2012/11/02...le-passphrase/ Anleitung zu realisieren.

Leider hat es noch nciht so geklappt wie gewünscht.
1) Einmal wolte ich fragen, ob ich eine verschlüsselte swap Partition genauso erstellen und einbinden kann wie die home Partition oder die snichtmöglich ist (da der swap womöglich vor Systemstart und home während dem Systemstart eingebunden wird?). Ich habe es einfach analog wie in der Anleitung für die home beschrieben versucht.
2) Habe ich bei der Installation folgende Fehlermeldung erhalten
"Es is tein Fehler beim Wiederherstellen der zuvor installierten Anwednungen aufgetreten. Die Installation wird fortgesetzt, Sie werden jedoch einige Anwedungen manuell nach installieren müssen, nachdem der Rechner neu gestartet wurde.".
Liegt da vielleicht schon ein Fehler vor, der allen weiteren Erfolg zunichte macht? Was hat das genau zu bedeuten? Kann es sein, dass ich meine Festplattenpartitionierung zerschossen habe (ich habe bereits mehrfach versucht, mit dem Xubuntu Installer verschlüsselt zu installieren, dort aber auch Errors erhalten.
Die Installation wurde in jedem Fall als abegschlossen angezeigt, bin nach einem reboot jedoch nur in die Kommandozeile von Grub gekommen.
Nach dem letzten versuch habe ich auch noch mein zuvor installiertes Windows aus dem Dualboot zerschossen.
Zum Glück noch alles auf einer ganz neuen Platte ohne Daten
Trotzdem soll es ja irgendwann laufen.

Falls jemanden das ganz doll interesseirt würd eich mich natürlich freuen, wenn er sich noch meine Kommandozeileneinträge durchliest, erwarte ich abe rnicht und ist auch vielleicht sinnlos, wenn sich das Problem die Tage mit einer nochmals komplett neu formtierten Platte vielleicht erübrigt.
An einer Antwort auf meine beiden Fragen oben wär eich aber in jedem Fall interesseirt.

Ganz vielen Dank falls ihr da irgendwas zu sagen könnt, ich freu mich schon wenn es endlich läuft
Beste Grüße


Für leute mit zu viel zeit meine chroot Eingaben : :
ubuntu@ubuntu:~$ sudo -i

root@ubuntu:~# apt-get install lvm2

Reading package lists...
Done
Building dependency tree

Reading state information...
Done
lvm2 is already the newest version (2.02.176-4.1ubuntu3).
lvm2 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@ubuntu:~# cryptsetup luksFormat -c aes-xts-plain64 -s 512 -h sha512 /dev/nvme0n1p8

WARNING: Device /dev/nvme0n1p8 already contains a 'crypto_LUKS' superblock signature.


WARNING!
========
This will overwrite data on /dev/nvme0n1p8 irrevocably.


Are you sure? (Type uppercase yes):
YES

Enter passphrase for /dev/nvme0n1p8:

Verify passphrase:

root@ubuntu:~# cryptsetup luksOpen /dev/nvme0n1p8/ crypt

Device /dev/nvme0n1p8/ doesn't exist or access denied.

root@ubuntu:~# sudo cryptsetup luksOpen /dev/nvme0n1p8/
crypt
Device /dev/nvme0n1p8/ doesn't exist or access denied.

root@ubuntu:~# cryptsetup luksOpen /dev/nvme0n1p8
crypt
Enter passphrase for /dev/nvme0n1p8:

root@ubuntu:~# mkfs.ext4 /dev/mapper/crypt
mke2fs 1.44.4 (18-Aug-2018)

Creating filesystem with 12206592 4k blocks and 3055616 inodes

Filesystem UUID: bbb964f0-a895-49b2-a4aa-5462514f3fdd
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

Allocating group tables: done
Writing inode tables: done
Creating journal (65536 blocks): done
Writing superblocks and filesystem accounting information: done

root@ubuntu:~# cryptsetup luksFormat -c aes-xts-plain64 -s 512 -h sha512 /dev/nvme0n1p7
WARNING: Device /dev/nvme0n1p7 already contains a 'crypto_LUKS' superblock signature.

WARNING!
========
This will overwrite data on /dev/nvme0n1p7 irrevocably.

Are you sure? (Type uppercase yes): YES
Enter passphrase for /dev/nvme0n1p7:
Verify passphrase:
root@ubuntu:~# cryptsetup luksOpen /dev/nvme0n1p7/ crypthome
Device /dev/nvme0n1p7/ doesn't exist or access denied.
root@ubuntu:~# cryptsetup luksOpen /dev/nvme0n1p7 crypthome
Enter passphrase for /dev/nvme0n1p7:
root@ubuntu:~# mkfs.ext4 /dev/mapper/crypthome
mke2fs 1.44.4 (18-Aug-2018)

Creating filesystem with 36620544 4k blocks and 9158656 inodes
Filesystem UUID: 266ddd3d-efb6-4432-9af9-3c9fa91ccb92
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done

root@ubuntu:~# cryptsetup luksFormat -c aes-xts-plain64 -s 512 -h sha512 /dev//dev/nvme0n1p9
Failed to initialize device signature probes.
root@ubuntu:~# cryptsetup luksFormat -c aes-xts-plain64 -s 512 -h sha512 /dev/nvme0n1p9
WARNING: Device /dev/nvme0n1p9 already contains a 'swap' superblock signature.

WARNING!
========
This will overwrite data on /dev/nvme0n1p9 irrevocably.

Are you sure? (Type uppercase yes): YES
Enter passphrase for /dev/nvme0n1p9:
Verify passphrase:
root@ubuntu:~# cryptsetup luksOpen /dev/nvme0n1p9/ cryptswap
Device /dev/nvme0n1p9/ doesn't exist or access denied.
root@ubuntu:~# cryptsetup luksOpen /dev/nvme0n1p9 cryptswap
Enter passphrase for /dev/nvme0n1p9:
root@ubuntu:~# mkswap /dev/mapper/cryptswap
Setting up swapspace version 1, size = 19.5 GiB (20969418752 bytes)
no label, UUID=8a62e6d6-34eb-4c7b-9979-9f296ba084fa
root@ubuntu:~# cd /mnt
root@ubuntu:/mnt# mkdir root
root@ubuntu:/mnt# mount /dev/mapper/crypt root
root@ubuntu:/mnt# mount /dev/nvme0n1p6 root/boot
root@ubuntu:/mnt# sudo chroot root
root@ubuntu:/# mount -t proc proc /proc
root@ubuntu:/# mount -t sysfs sys /sys
root@ubuntu:/# mount -t devpts devpts /dev/pts
root@ubuntu:/# apt-get update
Hit:1 http://de.archive.ubuntu.com/ubuntu cosmic InRelease
Hit:2 http://security.ubuntu.com/ubuntu cosmic-security InRelease
Hit:3 http://de.archive.ubuntu.com/ubuntu cosmic-updates InRelease
Hit:4 http://de.archive.ubuntu.com/ubuntu cosmic-backports InRelease
Reading package lists... Done
root@ubuntu:/# apt-get install lvm2 cryptsetup
Reading package lists...
Done
Building dependency tree

Reading state information...
Done
cryptsetup is already the newest version (2:2.0.4-2ubuntu2).
cryptsetup set to manually installed.
The following additional packages will be installed:

dmeventd libdevmapper-event1.02.1 liblvm2app2.2 liblvm2cmd2.02 libreadline5
Suggested packages:

thin-provisioning-tools
The following NEW packages will be installed:

dmeventd libdevmapper-event1.02.1 liblvm2app2.2 liblvm2cmd2.02 libreadline5 lvm2
0 upgraded, 6 newly installed, 0 to remove and 46 not upgraded.

Need to get 2090 kB of archives.
After this operation, 8260 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Y

Get:1 http://de.archive.ubuntu.com/ubuntu cosmic/main amd64 libdevmapper-event1.02.1 amd64 2:1.02.145-4.1ubuntu3 [10.9 kB]

Get:2 http://de.archive.ubuntu.com/ubuntu cosmic/main amd64 liblvm2cmd2.02 amd64 2.02.176-4.1ubuntu3 [586 kB]

Get:3 http://de.archive.ubuntu.com/ubuntu cosmic/main amd64 dmeventd amd64 2:1.02.145-4.1ubuntu3 [30.4 kB]

Get:4 http://de.archive.ubuntu.com/ubuntu cosmic/main amd64 liblvm2app2.2 amd64 2.02.176-4.1ubuntu3 [433 kB]

Get:5 http://de.archive.ubuntu.com/ubuntu cosmic/main amd64 libreadline5 amd64 5.2+dfsg-3build2 [101 kB]

Get:6 http://de.archive.ubuntu.com/ubuntu cosmic/main amd64 lvm2 amd64 2.02.176-4.1ubuntu3 [929 kB]

Fetched 2090 kB in 2s (1373 kB/s)
Selecting previously unselected package libdevmapper-event1.02.1:amd64.

(Reading database ... 145287 files and directories currently installed.)
Preparing to unpack .../0-libdevmapper-event1.02.1_2%3a1.02.145-4.1ubuntu3_amd64.deb ...

Unpacking libdevmapper-event1.02.1:amd64 (2:1.02.145-4.1ubuntu3) ...
Selecting previously unselected package liblvm2cmd2.02:amd64.
Preparing to unpack .../1-liblvm2cmd2.02_2.02.176-4.1ubuntu3_amd64.deb ...

Unpacking liblvm2cmd2.02:amd64 (2.02.176-4.1ubuntu3) ...
Selecting previously unselected package dmeventd.
Preparing to unpack .../2-dmeventd_2%3a1.02.145-4.1ubuntu3_amd64.deb ...

Unpacking dmeventd (2:1.02.145-4.1ubuntu3) ...
Selecting previously unselected package liblvm2app2.2:amd64.
Preparing to unpack .../3-liblvm2app2.2_2.02.176-4.1ubuntu3_amd64.deb ...

Unpacking liblvm2app2.2:amd64 (2.02.176-4.1ubuntu3) ...
Selecting previously unselected package libreadline5:amd64.
Preparing to unpack .../4-libreadline5_5.2+dfsg-3build2_amd64.deb ...

Unpacking libreadline5:amd64 (5.2+dfsg-3build2) ...
Selecting previously unselected package lvm2.
Preparing to unpack .../5-lvm2_2.02.176-4.1ubuntu3_amd64.deb ...

Unpacking lvm2 (2.02.176-4.1ubuntu3) ...
Setting up libdevmapper-event1.02.1:amd64 (2:1.02.145-4.1ubuntu3) ...
Processing triggers for libc-bin (2.28-0ubuntu1) ...

Processing triggers for systemd (239-7ubuntu10) ...
Setting up liblvm2app2.2:amd64 (2.02.176-4.1ubuntu3) ...
Processing triggers for man-db (2.8.4-2) ...
Setting up libreadline5:amd64 (5.2+dfsg-3build2) ...

Setting up liblvm2cmd2.02:amd64 (2.02.176-4.1ubuntu3) ...
Setting up dmeventd (2:1.02.145-4.1ubuntu3) ...
Created symlink /etc/systemd/system/sockets.target.wants/dm-event.socket → /lib/systemd/system/dm-event.socket.

Setting up lvm2 (2.02.176-4.1ubuntu3) ...
Running in chroot, ignoring request.
update-initramfs: deferring update (trigger activated)
Running in chroot, ignoring request.
Running in chroot, ignoring request.

Created symlink /etc/systemd/system/sysinit.target.wants/blk-availability.service → /lib/systemd/system/blk-availability.service.
Created symlink /etc/systemd/system/sysinit.target.wants/lvm2-monitor.service
→ /lib/systemd/system/lvm2-monitor.service.
Created symlink /etc/systemd/system/sysinit.target.wants/lvm2-lvmetad.socket → /lib/systemd/system/lvm2-lvmetad.socket.

Created symlink /etc/systemd/system/sysinit.target.wants/lvm2-lvmpolld.socket → /lib/systemd/system/lvm2-lvmpolld.socket.
Processing triggers for libc-bin (2.28-0ubuntu1) ...

Processing triggers for systemd (239-7ubuntu10) ...
Processing triggers for initramfs-tools (0.131ubuntu15) ...
update-initramfs: Generating /boot/initrd.img-4.18.0-10-generic
cryptsetup:
WARNING: The initramfs image may not contain cryptsetup binaries
nor crypto modules. If that's on purpose, you may want to uninstall the
'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs

integration and avoid this warning.
Warning: couldn't identify filesystem type for fsck hook, ignoring.

root@ubuntu:/# ^C

root@ubuntu:/# sudo nano /etc/fstab

root@ubuntu:/# sudo nano /etc/crypttab

root@ubuntu:/# sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.18.0-10-generic
cryptsetup:
ERROR: Couldn't resolve device /dev/mapper/crypt
cryptsetup:
WARNING: Couldn't determine root device
cryptsetup:
ERROR: Couldn't resolve device /dev/dm-2
cryptsetup:
WARNING: The initramfs image may not contain cryptsetup binaries
nor crypto modules.
If that's on purpose, you may want to uninstall the
'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs

integration and avoid this warning.
Warning: couldn't identify filesystem type for fsck hook, ignoring.

root@ubuntu:/#