Before I start I just want to make the following quite clear :
So what do I want to do ? Well basicly I want to encrypt the Hard disk of my VPS with LUKS and decrypt on boot (like so : http://unix.stackexchange.com/questions/5017/ssh-to-decrypt-encrypted-lvm-during-headless-server-boot )
I’m not entirely sure how i’d go about this with my VPS. The problematic part is the creation of the partition that will hold the Encrypted data. I need it to be my rootfs.
I’ve come up with several vague solutions, but i haven’t the slightest idea if they’ll really work :
Create an encrypted “File” that contains the rootFS and setup initrd to decrypt that file and mount it as / .
run fdisk on the system and resize the disk , then move everything to the new encrypted partition apart from the /boot directory. Have no idea if this can actually work.
Create an image with VirtualBox of a encrypted system, upload this to my VPS, load it into the ram and load dd into the ram, then overwrite the existing disk (this is very unlikely to work, i have no real clue).
Has anyone tried this before ? anyone have a different approach ?
Cheers :)
-jman6495
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Unfortunately, we do not support booting from custom kernels so you can’t modify <code>initrd</code>. We also do not support partitioning currently so #2 won’t work (though that’s in the works). <br>I’m not sure about #3, you can give it a shot but I doubt it’ll work. <br>Take a look at <a href=“https://www.digitalocean.com/community/articles/how-to-use-dm-crypt-to-create-an-encrypted-volume-on-an-ubuntu-vps”>How To Use DM-Crypt to Create an Encrypted Volume on an Ubuntu VPS</a>.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.