Encrypted manual partitioning

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
ytis
Level 1
Level 1
Posts: 8
Joined: Sun Jul 30, 2023 5:41 am

Encrypted manual partitioning

Post by ytis »

I'm using a virtual machine to practice installing linux mint and I'm stuck at partitioning really badly.

What I would like to have is manually create an encrypted disc with the use of UEFI and so that /home will be separated. So that there will be three of them "/" swap and "/home".
At first I created primary partition "EFI system Partition" (1024mb)
Then I created primary partition "physical volume for encryption" like this:
[Moderator note: Larger image as an attachment can be seen in this post ]

Image

And then I was supposed to create three logical partitions inside this encrypted container... Only in fact I get this and no possibility to create something somewhere because all buttons are grey.
[Moderator note: Larger image as an attachment can be seen in this post ]

Image

So I'm stuck and really need help.
Last edited by SMG on Wed Aug 02, 2023 11:53 am, edited 1 time in total.
Reason: Added moderator notes indicating where images can be seen as post attachments because there are issues accessing the image-hosting website.
dave0808
Level 5
Level 5
Posts: 765
Joined: Sat May 16, 2015 1:02 pm

Re: Encrypted manual partitioning

Post by dave0808 »

I don't believe that the installer will let you do this. You are attempting 2 advanced options: 1) having the boot partition inside the encrypted partition, and 2) having multiple partitions inside the encrypted partition.

I suggest that you start with a simpler setup and learn from there because without the basic knowledge, trying to do something this complicated is likely to give a headache.
ytis
Level 1
Level 1
Posts: 8
Joined: Sun Jul 30, 2023 5:41 am

Re: Encrypted manual partitioning

Post by ytis »

dave0808 wrote: Sun Jul 30, 2023 9:05 am I don't believe that the installer will let you do this. You are attempting 2 advanced options: 1) having the boot partition inside the encrypted partition, and 2) having multiple partitions inside the encrypted partition.

I suggest that you start with a simpler setup and learn from there because without the basic knowledge, trying to do something this complicated is likely to give a headache.
Thank you. But my boot partition (EFI) is outside of the encrypted container.
Isn't it possible to make several partitions inside an encoded container? How do people do it then, because as far as I understand it is necessary to have at least 2 "/" and swap partition. I don't understand.
dave0808
Level 5
Level 5
Posts: 765
Joined: Sat May 16, 2015 1:02 pm

Re: Encrypted manual partitioning

Post by dave0808 »

It's possible, it's just not straight forwards.

The swap partition can actually be anywhere, then you configure the system to encrypt it with a random key.
ytis
Level 1
Level 1
Posts: 8
Joined: Sun Jul 30, 2023 5:41 am

Re: Encrypted manual partitioning

Post by ytis »

dave0808 wrote: Sun Jul 30, 2023 9:21 am It's possible, it's just not straight forwards.

The swap partition can actually be anywhere, then you configure the system to encrypt it with a random key.
There is a way to automatically install using encryption, but I looked into the mess the installer made with the partitions and didn't understand much.

So in other words you suggest me to give up encryption for now and if there will be such a desire to do it later using some other ways. I'm I right?
dave0808
Level 5
Level 5
Posts: 765
Joined: Sat May 16, 2015 1:02 pm

Re: Encrypted manual partitioning

Post by dave0808 »

I never suggested giving up. Just starting with a simpler setup first.

We don't teach children quadratic equations in 1st grade math(s), we start with adding and subtracting. :wink:
TaterChip
Level 3
Level 3
Posts: 102
Joined: Sat Apr 22, 2023 12:34 pm

Re: Encrypted manual partitioning

Post by TaterChip »

When I was trying to install Mint, I ran into the same problem. I had to choose either encryption, or have in the home folder in a separate partition. I couldn't do figure out how to do both.

For me, I decided the encryption was too important to give up. So now, I backup my folder with FreeFileSync with Versioning enabled. And if something goes wrong and I have to rebuild, I just use the file manager to copy the files back over.

Which is actually what I'm doing right now. I am rebuilding the system after fresh install.
MSI Steel series GL75 Leopard, i7-10750H, 64GB RAM ... Mint21.1 XFCE
t42
Level 10
Level 10
Posts: 3037
Joined: Mon Jan 20, 2014 6:48 pm

Re: Encrypted manual partitioning

Post by t42 »

ytis wrote: Sun Jul 30, 2023 9:30 am but I looked into the mess the installer made with the partitions
...and what unknown installer on unnamed OS is doing such things...
Last edited by t42 on Mon Jul 31, 2023 4:17 pm, edited 1 time in total.
-=t42=-
ytis
Level 1
Level 1
Posts: 8
Joined: Sun Jul 30, 2023 5:41 am

Re: Encrypted manual partitioning

Post by ytis »

t42 wrote: Mon Jul 31, 2023 1:46 pm
ytis wrote: Sun Jul 30, 2023 9:30 am but I looked into the mess the installer made with the partitions
...and what unknown installer on unnamed OS is doing such things...

please note that there is a difference in UEFI configuration with VM.
Here I took two screenshots.

With these installer settings:
[Moderator note: Larger image as an attachment can be seen in this post. ]

Image


This is what it does. As you can see it somehow allocated encrypted root and swap partitions so I guess the home folder can be separated out somehow, too, but I still don't really understand how to do it properly by myself.
[Moderator note: Larger image as an attachment can be seen in this post. ]

Image
Last edited by SMG on Wed Aug 02, 2023 11:55 am, edited 1 time in total.
Reason: Added moderator notes indicating where images can be seen as post attachments because there are issues accessing the image-hosting website.
t42
Level 10
Level 10
Posts: 3037
Joined: Mon Jan 20, 2014 6:48 pm

Re: Encrypted manual partitioning

Post by t42 »

It's VMware as it seen on screenshot now. No other basic information provided, such as OS and installer versions. Bye...
-=t42=-
ytis
Level 1
Level 1
Posts: 8
Joined: Sun Jul 30, 2023 5:41 am

Re: Encrypted manual partitioning

Post by ytis »

t42 wrote: Mon Jul 31, 2023 4:12 pm It's VMware as it seen on screenshot now. No other basic information provided, such as OS and installer versions. Bye...
I thought it was obvious we were talking about the latest release. Okay.
Linux mint 21.2 cinnamon 64bit.

Although for the sake of interest before creating this topic I downloaded version 20.3 and the installer there is exactly the same and so the point of the question does not change.
User avatar
zcot
Level 9
Level 9
Posts: 2564
Joined: Wed Oct 19, 2016 6:08 pm

Re: Encrypted manual partitioning

Post by zcot »

The installer creates the bootloader scheme then an encrypted block, then it creates full LVM containment on that block, volume group, under that then creates volumes for /, /swap, and /home. You can't do that with the installer. But you can manually lay it all out, then run the installer in advanced mode and make the assignments, but only after you have done a bunch of terminal voodoo. The advantage of LVM is that it's easy to manage, even live, on the volumes, make adjustments on the run.

Whatever goal you are on here, I believe, you're trying to create an overly complex problem for yourself. It almost feels like an XY problem because I don't see the clear statement of problem/solution query, and it kinda goes off the rails here like in this thread.

You either use the installer, or you don't, and you can really get deep into a complexity of madness trying to set up a complex system doing most of it manually like this, or just take the extra step or two and do it all manually. Either case is nothing automatic about it. Or learn the LVM, honestly in the end I don't even know the real goal, you don't like the partition sizes or what? -you learn the LVM and just make the adjustments on the existing what-you-call "mess"?

do it all manually:
https://help.ubuntu.com/community/Full_ ... Howto_2019

https://gist.github.com/superjamie/d56d ... 26e3fef50f

You can also make the bootloader encrypted as well(choosing the right sub-link for your setup):
viewtopic.php?t=198077

here's another offering doing the whole thing without using the LVM system at all:
viewtopic.php?t=393478

and there are plenty more where they came from!

Honestly in the end it's not very much a beginner's topic, but that's fine.

Also, damn man, please stop posting the shady image links.

The fact is that both topics are complex in themselves, -encryption, and LVM. Neither are unattainable, but neither are just a simple 1-click thing with no understanding of the actual complex setup that they are. Both will give you complex interactions period, -nothing "easy" here.

So, get closer to asking the real question. -it btw it can't be "i want to use the easy automated installer to do a dually doubly advanced setup" -because you can't do that.

I don't know if I'm helping anything here or not. I hope so though.
User avatar
SMG
Level 25
Level 25
Posts: 25617
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Encrypted manual partitioning

Post by SMG »

ytis wrote: Mon Jul 31, 2023 3:39 pmHere I took two screenshots.
While we appreciate you using thumbnails, these images are really too small to read and there seem to be problems with the image hosting site so one is not really able to get a larger image.

Images less than 200KB in size can be attached to posts by using the Attachments tab below the reply box. That might be a better option if you do not have an alternative option for hosting the images.

Beginner Questions are to be "easy to-the-point questions that you feel people can answer fast". Your question not only involves the use of a VM (for which we have a Virtual Machines forum), but is more of a complicated Installation & Boot question so I will move your topic there.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
ytis
Level 1
Level 1
Posts: 8
Joined: Sun Jul 30, 2023 5:41 am

Re: Encrypted manual partitioning

Post by ytis »

Thanks for the replies. Especially zcot for a detailed answer. I haven't had time to fully read and check all his instructions that were given in it yet but since the topic was moved and apparently many people here are having problems with my screenshots, I'll just re-post them in this reply using attachments.
Attachments
Screenshot 2023-07-30 130503.jpg
sc.jpg
Last edited by ytis on Tue Aug 01, 2023 12:03 am, edited 1 time in total.
ytis
Level 1
Level 1
Posts: 8
Joined: Sun Jul 30, 2023 5:41 am

Re: Encrypted manual partitioning

Post by ytis »

*
Attachments
1.jpg
2.jpg
t42
Level 10
Level 10
Posts: 3037
Joined: Mon Jan 20, 2014 6:48 pm

Re: Encrypted manual partitioning

Post by t42 »

zcot wrote: Mon Jul 31, 2023 5:43 pm ...
I don't know if I'm helping anything here or not. I hope so though.
Though I'm out of this thread should say I was surprised to see my exact thoughts about this topic. Thank you for taking time to put it all in writing, it may be useful for someone :)
-=t42=-
User avatar
SMG
Level 25
Level 25
Posts: 25617
Joined: Sun Jul 26, 2020 6:15 pm
Location: USA

Re: Encrypted manual partitioning

Post by SMG »

ytis wrote: Sun Jul 30, 2023 9:12 am... because as far as I understand it is necessary to have at least 2 "/" and swap partition.
The default install of Linux Mint creates a swap file which is in / so it is not "necessary" to have a swap partition. It is also not "necessary" to have a separate /home. However, that is commonly how it is done with an encrypted install.
ytis wrote: Sun Jul 30, 2023 9:30 amThere is a way to automatically install using encryption, but I looked into the mess the installer made with the partitions and didn't understand much.
In order to say it was "a mess" created by the installer presumes you believe there is a certain way it should be. The fact the installer did something different than what you expected indicates there is more than one way to make an encrypted install.

The installer handles the most common ways people install. It does not simplify every possible way one can install Linux Mint.
ytis wrote: Mon Jul 31, 2023 3:39 pmAs you can see it somehow allocated encrypted root and swap partitions so I guess the home folder can be separated out somehow, too, but I still don't really understand how to do it properly by myself.
There is no requirement that /home be a separate partition. If you wish to have /home as a separate partition, the instructions here Install Linux Mint 21.1 with custom LVM on LUKS may be what you want. Note that this is not a default installation method so there is some manual back and forth to accomplish the end goal. I have no idea if there are limitations in a VM with regards to doing this type of install.
Image
A woman typing on a laptop with LM20.3 Cinnamon.
ytis
Level 1
Level 1
Posts: 8
Joined: Sun Jul 30, 2023 5:41 am

Re: Encrypted manual partitioning

Post by ytis »

I have read the provided guides carefully and they were very helpful, I would like to express my gratitude for them.

As it turned out the whole problem was that the partition editor built into the installer is very limited. So it's necessary to use more advanced utilities for this task, such as "gdisk", "mkfs" and others via terminal.

The guide that most completely solves the problem (although it says it's for Ubuntu it works for Mint as well):
https://gist.github.com/superjamie/d56d ... 26e3fef50f

In the end the partitions look like this:
Attachments
3.jpg
User avatar
zcot
Level 9
Level 9
Posts: 2564
Joined: Wed Oct 19, 2016 6:08 pm

Re: Encrypted manual partitioning

Post by zcot »

Great news! Excellent!
Post Reply

Return to “Installation & Boot”