Preparing encrypted partitions for installation or resizing encrypted LVM

4 replies [Last post]
amuza
Offline
Joined: 02/12/2018

Hello,

I would like to install Trisquel having its root, swap and home partitions encrypted. During the installation, Trisquel allows you to choose an option to get that done automatically, it creates one encrypted partition which includes root, swap and home LVM. However, I would like to have a bigger root partition than the one Trisquel does automatically.

I have been playing with the "Something else" option (that is the one which lets you configure partitions manually during the installation). I manage to create encrypted partitions which can be used as root, home or swap, but I cannot manage to create one encrypted partition which can include the three of them as Trisquel creates automatically.

How could I make it so that I have a larger root partition?

I have also tried to use the automatic encryption and once everything is installed I tried to resize encrypted LVM (I mean to reduce home and increase root), but I got errors.

Any suggestion is very much welcome.

Thanks!

nadebula.1984
Offline
Joined: 05/01/2018

Since it's impossible to create another layer of partition table on an encrypted physical volume, you'll have to use LVM. And since you use logical volumes, the size doesn't matter. You can always resize (or precisely, shrink and expand) logical volumes at any time.

Therefore you can simply accept the default settings. When finished installation, use LVM (lvm2) to shrink /home and then expand /

However, keep in mind that Ubuntu's ubiquity installer is broken beyond repair. (This is why Ubuntu desperately needs a new installer. Canonical focused on making money only, until it was forced to pay attention to its egregious distribution.)

If you still get errors, use Trisquel network installer, which is similar to Debian Installer (text mode but provides much more options). You'll need a USB-based ath9k-htc if you don't have an internal Atheros card.

amuza
Offline
Joined: 02/12/2018

Thank you nadebula.1984!

Problem solved!

Your message made me focus on the second option of this thread's title, despite I previously got some errors when trying.

Your suggestion on using Trisquel network installer was helpful. Trisquel's netinst does not allow to choose the specific LVM size for root or home, but it does allow you to choose the size for the whole group, so I chose something small so that later I would only have to do the easy task of extending root.

In order to extend root, instead of using commands, this time I used a GUI tool for LVM resizing named kvpm. I installed kvpm in Triskel live (kvpm only works with KDE). I first open the encrypted partition (cryptsetup open) and then run the program to extend root.

nadebula.1984
Offline
Joined: 05/01/2018

kvpm is being deprecated. It is only available in Debian oldoldstable and oldstable. Probably it's no longer maintained.

Using CLI tools to manage logical volumes isn't too intimidating.

amuza
Offline
Joined: 02/12/2018

Good to know, thank you. I was so traumatized by so many technical problems I have lately got that decided to go for any "easy" solution I could choose.