I would likewise advise learning more about disk encryption because it's easy to end up with an encrypted but unusable system.Use the method @bls describes. I'd advise learning a a bit about luks because it's no good having the drive encrypted if you can't recover it. Have a look at the man pages for 'cryptsetup'. For some device /dev/sda ..Is it possible to dd the content of my encrypted SD-card to my NVME-drive and then resize the NVME to use the full capacity?Usual disk encryption caveat applies (ie: it won't help if box is running).Code:
$ sudo cryptsetup luksDump /dev/sda$ sudo cryptsetup luksOpen /dev/sda fred#password prompt$ sudo mount -r /dev/mapper/fred /mnt/tmp$ sudo umount /mnt/tmp$sudo cryptsetup luksClose fred
That said, the commands that swampdog mentioned above can be performed a lot more easily using sdm.
Hopefully you never need to use luksDump, although it will of course work on an disk encrypted using sdm, since sdm uses luks to do the actual encryption.
The remaining 4 commands are for operating on an encrypted disk. You can replace all of them with either "sudo sdm --explore --encrypted /dev/sda" (to "enter" the container") or "sudo sdm --mount --encrypted /dev/sda" (to mount the encrypted disk into the running system). Why type more than required? Image may be NSFW.
Clik here to view.

In both cases, sdm will prompt for the password and set up the environment for you to easily explore (ala a container) or mount the disk into the running host system.
Statistics: Posted by bls — Sat Jul 06, 2024 3:41 am