The officially official Devuan Forum!

You are not logged in.

#1 2018-12-05 16:31:15

Vargr
Member
Registered: 2018-11-26
Posts: 8  

Single Partition Encryption

How do I encrypt Devuan inside an extended partition alongside a few other (unencrypted)distros?

Using the live dvd on manual partition I set up sda5 as ext4 with root mount point.
Then - configure encrypted volumes - select sda5.
When everything is done I get the 'no root file system error'.

The config looks like this
Encrypted volume (sda5_crypt) - 16.5GB Linux device-mapper (crypt)
    >  #1    16.5GB    f    ext4
SCSI1 (0,0,0) (sda) - 32.2GB ATA VBOX HARDDISK
    >  #5    logical    16.5GB    K    crypto    (sda5_crypt)
    >  #6    logical    15.7GB          ext4

It seems the encryption option only works for a separate volume but not for the root mount point on sda5.

Ps. is there a way to upload desktop images directly to the forum?

Offline

#2 2018-12-05 16:45:13

golinux
Administrator
Registered: 2016-11-25
Posts: 3,345  

Re: Single Partition Encryption

Vargr wrote:

Ps. is there a way to upload desktop images directly to the forum?

Unfortunately no.  Sorry I can't answer your more pressing question.  Never done encryption.

Online

#3 2018-12-05 17:11:44

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,500  

Re: Single Partition Encryption

Are you sure you're using a live iso? The output you posted looks like it's from the debian installer, which is only in the installer isos.

Some thoughts - I seem to recall that for a root partition inside an extended partition, you need to mark it with the boot flag. I guess that assumes that /boot is in the root partition.

If you encrypted the root partition without a separate boot partition, then you need to have a line in /etc/default/grub that will tell grub to ask you for the pass phrase.

GRUB_ENABLE_CRYPTODISK=y

If you installed from a usb, the bios may have switched the drive numbers when you tried to boot without the usb. Check what your grub.cfg says.

Offline

#4 2018-12-05 19:40:25

Vargr
Member
Registered: 2018-11-26
Posts: 8  

Re: Single Partition Encryption

My mistake about the live iso, it's the devuan_ascii_2.0.0_amd64_dvd-1.iso I'm using.

Marked sda5 with a boot flag before encrypting, turned out like this
Encrypted volume (sda5_crypt) - 16.5GB Linux device-mapper (crypt)
    >  #1    16.5GB    f    ext4
SCSI1 (0,0,0) (sda) - 32.2GB ATA VBOX HARDDISK
    >  #5    logical    16.5GB   B  K    crypto    (sda5_crypt)
    >  #6    logical    15.7GB               ext4

But the same error persists.
Still haven't installed by the way, just trying to make it work on a vm.

Offline

#5 2018-12-05 20:08:01

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,500  

Re: Single Partition Encryption

Here's a video showing how to do what you want to do, except not on a logical partition. It's very easy to get it wrong. (the '4' in the file name means it was my fourth attempt, and I've done it many times before.)
http://distro.ibiblio.org/refracta/misc … rypt-4.ogv

Offline

#6 2018-12-06 18:42:40

Vargr
Member
Registered: 2018-11-26
Posts: 8  

Re: Single Partition Encryption

fsmithred wrote:

Here's a video showing how to do what you want to do, except not on a logical partition. It's very easy to get it wrong. (the '4' in the file name means it was my fourth attempt, and I've done it many times before.)
http://distro.ibiblio.org/refracta/misc … rypt-4.ogv

That worked great for the encryption, thanks!

Still having some trouble figuring out how to install the second system.

Offline

#7 2018-12-09 16:19:14

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,500  

Re: Single Partition Encryption

Installing the second system should be as easy as running the installer for that system and choosing (or creating) another partition - unless you didn't leave a spare partition or extra space on the drive to create one.

If you want help with partition layouts, describe what you currently have and what you want to accomplish. (output of 'fdisk -l' would help.)

Offline

#8 2018-12-17 18:51:57

Vargr
Member
Registered: 2018-11-26
Posts: 8  

Re: Single Partition Encryption

https://imageshack.com/a/img924/3897/VYdSGq.png

Starting with a clean drive I installed Antergos on sda5 - encrypted.
The strange thing is that I had to type the password twice, before and after loading the grub menu.

After that I installed Mint on sda6, which seems to have screwed up the Antergos boot cause it didn't even recognized it.

Ideally I would like to have Devuan encrypted on sda7 and be able to boot any other separate encrypted OS.

Offline

Board footer