LMDE install with encrypted partitions or resizable volumes

Write tutorials here
More tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please, Before you post please read this
TomRoche
Level 4
Level 4
Posts: 243
Joined: Thu Jan 13, 2011 2:52 pm

Re: LMDE install with encrypted partitions or resizable volu

Postby TomRoche » Sat Sep 12, 2015 4:46 pm

short answer: Make a LMDE LiveUSB and then retry.

long answer:

davschm wrote:I am getting a error when running the script about not being in the live environment. I am running it from within the live CD.


Unfortunately, "live" has 2 meanings in this context--sorta like "bandaid," which generally/colloquially refers to any adhesive bandage, but can also refer to one specific brand of adhesive bandage. In the Linuxsphere, we tend to refer to any sort of bootable media as "live," but "Live" also refers to a specific strategy for creating bootable media--as opposed to, e.g., Casper.

davschm wrote:My version = linuxmint-17.2-cinnamon-64bit.iso


ICBW, but I'm pretty sure "main edition" Mint-17.2 is Casper. I know Mint-17.1 is from looking at my LiveUSB ("Live" using the other sense :-) grub.cfg; plus this would explain your error. So my advice is,

1. Make a LMDE LiveUSB. CDs are sooo last millenium :-)

2. Boot LMDE2 from the LiveUSB. You'll have a richer, more linuxy experience, which will improve your quality of life :-)

3. Run one of these install scripts.

User avatar
Pepas
Level 2
Level 2
Posts: 51
Joined: Mon Jan 24, 2011 10:18 am
Contact:

Re: LMDE install with encrypted partitions or resizable volu

Postby Pepas » Sat Sep 12, 2015 10:25 pm

davschm wrote:My version = linuxmint-17.2-cinnamon-64bit.iso


The installer for Linux Mint 17.2 accomodates installation on LUKS/LVM, so there is no need for this script, I have cut out support for 'regular' Linuxmint for that reason.
[EDIT: the standard installer is too inflexible for some uses, and now we can have total encryption (no unencrypted /boot), so Linux Mint 17.1/2/3 and 18 are fully supported at this point!]

To install Linux Mint DEBIAN Edition (LMDE) on LUKS/LVM, this script is useful. :D
Last edited by Pepas on Fri Jul 08, 2016 3:39 pm, edited 1 time in total.

davschm
Level 1
Level 1
Posts: 7
Joined: Sat Sep 12, 2015 1:59 pm

Re: LMDE install with encrypted partitions or resizable volu

Postby davschm » Mon Sep 14, 2015 11:42 am

Pepas wrote:
davschm wrote:My version = linuxmint-17.2-cinnamon-64bit.iso


The installer for Linux Mint 17.2 accomodates installation on LUKS/LVM, so there is no need for this script, I have cut out support for 'regular' Linuxmint for that reason.

To install Linux Mint DEBIAN Edition (LMDE) on LUKS/LVM, this script is useful. :D


Thank you all for replying to my questions.

I am surprised to learn that the 17.2 installer supports encrypted LVM installs. I had played around with it for a bit and couldn't make it work.
Is there a guide on how to use the installer to accomplish this? Also, i have been using the custom option, or "Do something else" option, so that i can size things the way i want.

Or maybe you have to setup the LVM and encryption before running the installer?

I now know this isn't the correct forum for this discussion, feel free to move this thread or just tell me to move on :)

User avatar
Pepas
Level 2
Level 2
Posts: 51
Joined: Mon Jan 24, 2011 10:18 am
Contact:

Re: LMDE install with encrypted partitions or resizable volu

Postby Pepas » Mon Sep 14, 2015 1:12 pm

davschm wrote:Or maybe you have to setup the LVM and encryption before running the installer?


It used to be that you had to set it the LUKS/LVM up yourself, and then start the installer. And if I remember correctly, you then also had to chroot and make sure a new initrd was made to include crypttab. Earlier versions of my script used to support the 'Ubuntu' Linux Mint as well.

I am sure there is a guide for installing 17.2 on a LUKS encrypted LVM partitioned "whole disk" setup. If you choose "Erase disk" everything is done for you, if you want more control, that works too. The principle is, make a physical volume, make a volume group, and make logical volumes. For full disk encryption you need a non-encrypted boot partition, and on a GPT partition scheme you need a small EFI GPT (0xEE) partition.

Trapper
Level 4
Level 4
Posts: 348
Joined: Sat Dec 03, 2011 12:21 pm
Location: Sebring, Florida USA

Re: LMDE install with encrypted partitions or resizable volu

Postby Trapper » Mon Sep 14, 2015 3:02 pm

Maybe this
provides instructions for 17.2?

http://community.linuxmint.com/tutorial/view/2026
MSI 880GME35-455 MB, AMD Phenom II X4 B55 (-MCP-) CPU, 4GB DDR3 RAM, 500 GB SATA3 HD
Single FDE container holding LMDE 2, LM 17.2, LM 18.1 MATE & CINN, LM 18.2 MATE, Debian Jessie, swap, and shared data LV's.

davschm
Level 1
Level 1
Posts: 7
Joined: Sat Sep 12, 2015 1:59 pm

Re: LMDE install with encrypted partitions or resizable volu

Postby davschm » Mon Sep 14, 2015 3:23 pm

Trapper wrote:Maybe this
provides instructions for 17.2?

http://community.linuxmint.com/tutorial/view/2026


Thanks, i will give that a try when i get home today.
Those instructions seem to encrypt the boot partition as well, which i wasn't going to do, but i guess it wouldn't hurt.

Trapper
Level 4
Level 4
Posts: 348
Joined: Sat Dec 03, 2011 12:21 pm
Location: Sebring, Florida USA

Re: LMDE install with encrypted partitions or resizable volu

Postby Trapper » Mon Sep 14, 2015 3:41 pm

davschm wrote:
Trapper wrote:Maybe this
provides instructions for 17.2?

http://community.linuxmint.com/tutorial/view/2026


Thanks, i will give that a try when i get home today.
Those instructions seem to encrypt the boot partition as well, which i wasn't going to do, but i guess it wouldn't hurt.


Just guessing but there probably is some sort of instruction to be found in the main Linux mint forum. I remember trying FDE when it first came available through the installer. I recall it being a very easy process.
MSI 880GME35-455 MB, AMD Phenom II X4 B55 (-MCP-) CPU, 4GB DDR3 RAM, 500 GB SATA3 HD
Single FDE container holding LMDE 2, LM 17.2, LM 18.1 MATE & CINN, LM 18.2 MATE, Debian Jessie, swap, and shared data LV's.

davschm
Level 1
Level 1
Posts: 7
Joined: Sat Sep 12, 2015 1:59 pm

Re: LMDE install with encrypted partitions or resizable volu

Postby davschm » Tue Sep 15, 2015 2:51 pm

FYI, i did work with the installer a little last night, full disk encryption (excluding the /boot) is possible with the wizard. But it will not let you alter the partition layout in any way and will not let you choose anything but the entire disk. And the custom installer will not let you setup an LVM at all.

I am still looking for instructions for setting it up manually without encrypting the /boot.

TomRoche
Level 4
Level 4
Posts: 243
Joined: Thu Jan 13, 2011 2:52 pm

Re: LMDE install with encrypted partitions or resizable volu

Postby TomRoche » Tue Sep 15, 2015 5:08 pm

davschm wrote:I am still looking for instructions for setting it up manually without encrypting the /boot.


Define 'it' :-) If you want instructions for doing LVM/LUKS on "Main Edition" Mint, try posting here.

User avatar
Pepas
Level 2
Level 2
Posts: 51
Joined: Mon Jan 24, 2011 10:18 am
Contact:

Re: LMDE install with encrypted partitions or resizable volu

Postby Pepas » Wed Sep 16, 2015 12:39 am

davschm wrote:And the custom installer will not let you setup an LVM at all.
I am still looking for instructions for setting it up manually without encrypting the /boot.


Indeed, I tried out of curiousity. You can designate an encrypted volume, but not do LVM... How poor, I can't understand why they don't fix this after all these years, especially with the increased awareness of the need for encryption.

Well, the fix in the script was really easy, it now works for Linux Mint 17.1 and 17.2 as well!
http://j.mp/lmdescrypt

davschm
Level 1
Level 1
Posts: 7
Joined: Sat Sep 12, 2015 1:59 pm

Re: LMDE install with encrypted partitions or resizable volu

Postby davschm » Wed Sep 16, 2015 8:06 am

Pepas wrote:
davschm wrote:And the custom installer will not let you setup an LVM at all.
I am still looking for instructions for setting it up manually without encrypting the /boot.


Indeed, I tried out of curiousity. You can designate an encrypted volume, but not do LVM... How poor, I can't understand why they don't fix this after all these years, especially with the increased awareness of the need for encryption.

Well, the fix in the script was really easy, it now works for Linux Mint 17.1 and 17.2 as well!
http://j.mp/lmdescrypt


Wow, Thank you!

After work today i will try this install and post back if it works for me. I am looking forward to this :)

Trapper
Level 4
Level 4
Posts: 348
Joined: Sat Dec 03, 2011 12:21 pm
Location: Sebring, Florida USA

Re: LMDE install with encrypted partitions or resizable volu

Postby Trapper » Wed Sep 16, 2015 6:36 pm

Pepas wrote: You can designate an encrypted volume, but not do LVM"


Wow. I did not realize this. I tried through the installer once when FDE first became available in Mint. I guess it did not impress me at the time and perhaps that was why. :) I used a homemade step by step manual routine prior to that in LM 13 and up. It's actually fairly easy and I still use it with 17.2. I am excited to try your script with 17.1 & 17.2 supported in it though Pepas. I've yet to find a spare drive around here for that but I know I have some lurking in the big hardware pile.
MSI 880GME35-455 MB, AMD Phenom II X4 B55 (-MCP-) CPU, 4GB DDR3 RAM, 500 GB SATA3 HD
Single FDE container holding LMDE 2, LM 17.2, LM 18.1 MATE & CINN, LM 18.2 MATE, Debian Jessie, swap, and shared data LV's.

Trapper
Level 4
Level 4
Posts: 348
Joined: Sat Dec 03, 2011 12:21 pm
Location: Sebring, Florida USA

Re: LMDE install with encrypted partitions or resizable volu

Postby Trapper » Thu Sep 17, 2015 3:19 pm

I just tried the new script with LM17 support Pepas. I did it for LM17.2 32 bit and the installer failed. Here is how I set up my volumes on sda2 (250GB size):

root_size=40
swap_size=4
data_size=REST

The install script created the 4G swap volume. Then it created a data volume using REST. Then it attempted to create a root volume which naturally failed because it created the data_size=REST first.
MSI 880GME35-455 MB, AMD Phenom II X4 B55 (-MCP-) CPU, 4GB DDR3 RAM, 500 GB SATA3 HD
Single FDE container holding LMDE 2, LM 17.2, LM 18.1 MATE & CINN, LM 18.2 MATE, Debian Jessie, swap, and shared data LV's.

davschm
Level 1
Level 1
Posts: 7
Joined: Sat Sep 12, 2015 1:59 pm

Re: LMDE install with encrypted partitions or resizable volu

Postby davschm » Sun Sep 20, 2015 2:05 am

Pepas wrote:
davschm wrote:And the custom installer will not let you setup an LVM at all.
I am still looking for instructions for setting it up manually without encrypting the /boot.


Indeed, I tried out of curiousity. You can designate an encrypted volume, but not do LVM... How poor, I can't understand why they don't fix this after all these years, especially with the increased awareness of the need for encryption.

Well, the fix in the script was really easy, it now works for Linux Mint 17.1 and 17.2 as well!
http://j.mp/lmdescrypt


I did use this script and it worked great! Thank you.

Someone else had issues with the "REST" option, i did not use that and chose to leave some space free to adjust sizes later.

User avatar
Pepas
Level 2
Level 2
Posts: 51
Joined: Mon Jan 24, 2011 10:18 am
Contact:

Re: LMDE install with encrypted partitions or resizable volu

Postby Pepas » Sun Sep 20, 2015 2:49 am

davschm wrote:Someone else had issues with the "REST" option


I guess if the space that is left is too small for the purpose, it might be problematic; it doesn't check for all eventualities... But REST is just implemented with LVM's 100%FREE, which just means: the rest of the remaining space. How did you hear about this? Any more information on what issues they had??

Trapper
Level 4
Level 4
Posts: 348
Joined: Sat Dec 03, 2011 12:21 pm
Location: Sebring, Florida USA

Re: LMDE install with encrypted partitions or resizable volu

Postby Trapper » Sun Sep 20, 2015 6:27 am

Pepas wrote:
davschm wrote:Someone else had issues with the "REST" option


I guess if the space that is left is too small for the purpose, it might be problematic; it doesn't check for all eventualities... But REST is just implemented with LVM's 100%FREE, which just means: the rest of the remaining space. How did you hear about this? Any more information on what issues they had??



In my case "REST" equates to 230+ GB. The problem is that the data LV with "REST" gets created prior to the root LV being created.
MSI 880GME35-455 MB, AMD Phenom II X4 B55 (-MCP-) CPU, 4GB DDR3 RAM, 500 GB SATA3 HD
Single FDE container holding LMDE 2, LM 17.2, LM 18.1 MATE & CINN, LM 18.2 MATE, Debian Jessie, swap, and shared data LV's.

User avatar
Pepas
Level 2
Level 2
Posts: 51
Joined: Mon Jan 24, 2011 10:18 am
Contact:

Re: LMDE install with encrypted partitions or resizable volu

Postby Pepas » Sun Sep 20, 2015 11:32 am

Trapper wrote:The problem is that the data LV with "REST" gets created prior to the root LV being created.


Oh dear... That's a real bug; the code never checked which one to do first. Fixed! Thanks for reporting.

Trapper
Level 4
Level 4
Posts: 348
Joined: Sat Dec 03, 2011 12:21 pm
Location: Sebring, Florida USA

Re: LMDE install with encrypted partitions or resizable volu

Postby Trapper » Mon Sep 21, 2015 7:28 am

Pepas wrote:Oh dear... That's a real bug; the code never checked which one to do first. Fixed! Thanks for reporting.


Thank you for fixing! When my install ended because of the lack of a root LV I simply manually resized data and created a root LV. Then I just finished the entire install manually because that's how I've always done it with main Mint. Couldn't find the time yet to go back and sift through the script to find out what was out of whack. Now to find yet another spare drive to test the script again. :) Thanks Pepas!
MSI 880GME35-455 MB, AMD Phenom II X4 B55 (-MCP-) CPU, 4GB DDR3 RAM, 500 GB SATA3 HD
Single FDE container holding LMDE 2, LM 17.2, LM 18.1 MATE & CINN, LM 18.2 MATE, Debian Jessie, swap, and shared data LV's.

User avatar
Pepas
Level 2
Level 2
Posts: 51
Joined: Mon Jan 24, 2011 10:18 am
Contact:

Re: LMDE install with encrypted partitions or resizable volu

Postby Pepas » Mon Sep 21, 2015 1:49 pm

Trapper wrote:Now to find yet another spare drive to test the script again.


Thanks Trapper! To be honest, I haven't tested this, but the fix was so straightforward that I'm trusting (hoping) it's working now.


Return to “Tutorials”