GoGreen PC Tune-Up™
Learn More

this is how we code sign our software and ssl encrypt our websites from our affiliate partner SSL.com
MTNCOMP | List | Table


myBlog Home


Linux Tux

Linux OS drives, on the fly encryption changes

by Mountain Computers Inc., Publication Date: Wednesday, April 10, 2019
View Count: 425, Keywords: Linux, OS Encrption, On the Fly Changes, Hashtags: #Linux #OSEncrption #OntheFlyChanges

Need to get a single image encrypted and then distribute and then change the encryption on the fly -- sure you can do it...
Yes, that confirmed as working...

So, here is what we do.

  1. Create the encryption with a basic password
  2. Use the image for  each consultant
  3. When you give a consultant an image to use, A) add a new encryption key to the OS, and reboot and test it.. if that works, then B) remove the original encryption key and reboot, C) to test reboot and try the original keyphrase and that should fail, and the new passphrase should work only.


You can have multiple encryption keys on an encrypted drive from what I found

For me the sda5 is hard drive partition.. the cat command will tell you what to change.


First, you need to find out which is the encrypted LVM partition, it may be sda3, but it can also be sda5, sdX2, ...:

cat /etc/crypttab

Toadd a new password, use luksAddKey:

sudo cryptsetup luksAddKey /dev/sda3

Toremove an existing password, use luksRemoveKey:

sudo cryptsetup luksRemoveKey /dev/sda3

View currently used slots of the encrypted partition:

sudo cryptsetup luksDump /dev/sd3



All the Best,


Andy, MBA Technology Management, Bachelor’s Computer Systems Engineering

(775)287-9552 PST

Mountain Computers Inc.




Our #1 utility we created is the GoGreen PC TuneUp™. Plus! our blog called myBlog and VLog shares our knowledge. The Work Order describes our flow. Happy Clients ask and ye shall receive our newsAndy Flagg, our leading technologist; Microsoft retired 1997, a Worldwide Operations Technical Manager, continues to help thousands daily.


if you found this article helpful, consider contributing $10, 20 an Andrew Jackson or so..to the author. more authors coming soon
FYI we use paypal or patreon, patreon has 3x the transaction fees, so we don't, not yet.

© 2022 myBlog™ v1.1 All rights reserved. We count views as reads, so let's not over think it.