Question

Encrypted custom image

Hi all,

I’m trying to create a custom image whit an encrypted root filesystem (ie. encrypted with LUKS). The image was generated from a Ubuntu 18.04 server and from my personal qemu. Everything is working ok on my machine. When the server boots it asks for the LUKS passphrase (I’m using the console to enter the password) and everything is working well. It proves that this image is working with qemu.

This said, when I’m uploading the image on DO and creating a droplet from this one. The console never ask me for the passphrase and is stuck on “Booting from harddisk”. Is it possible to do this, am I missing something ?

Regards,

Daniel…


Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi Jarland,

I think it was my fault. I sparsified (with virt-sparsify) the image before uploading it. After uploading a flat image everything is working ok.

Should be pretty interesting to write a tutorial on how to create a encrypted image from scratch with packer or debootstrap.

I’m still in the process of automating this but I should be able to do it.

Thanks a lot for your help.

Hey friend!

I asked our team about this and this is a snippet of what I got in return: “I got full disk encryption to work on my Droplet a few weeks ago, though. Are they doing something unusual with the disk layout or GRUB configuration?”

In that light, can you tell me more about the steps taken to create the image? No guarantee that this gives me leverage to make a more informed response, but it seems like the best chance at moving forward on it.

Jarland