You are not logged in.

#1 2020-03-07 16:29:15

archdom
Member
Registered: 2018-09-12
Posts: 96

[SOLVED] Archlinux - LVM on LUKS - VBox (UEFI mode)

Hi guys,
i'm trying install archlinux LVM on luks in virtualbox.
I'm following the example of fromminttoarch.
https://bbs.archlinux.org/viewtopic.php?id=246628

There are some things that i don't understand.
The partition /dev/sda1 is a type "Linux" bootable.
Is the boot folder  in /dev/mapper/vg-root/home ?

regards

Last edited by archdom (2020-03-09 21:36:13)

Offline

#2 2020-03-07 16:58:42

Steo
Member
Registered: 2020-03-01
Posts: 22

Re: [SOLVED] Archlinux - LVM on LUKS - VBox (UEFI mode)

According to that post, the partitions are mounted as /mnt and /mnt/home

mount /dev/mapper/vg-root /mnt
mkdir /mnt/home
mount /dev/mapper/vg-home /mnt/home
pacstrap -i /mnt base base-devel
genfstab -U /mnt > /mnt/etc/fstab
arch-chroot /mnt /bin/bash

Then further down grub is installed

grub-mkconfig -o /boot/grub/grub.cfg
grub-install /dev/sda

The boot folder should be /mnt/boot, though you'll be chrooted into the system after the arch-chroot command, so it should just be /boot.

Last edited by Steo (2020-03-07 17:20:07)

Offline

#3 2020-03-07 18:24:47

archdom
Member
Registered: 2018-09-12
Posts: 96

Re: [SOLVED] Archlinux - LVM on LUKS - VBox (UEFI mode)

I was in doubt because all the examples in the wiki have two partitions.

1) unencrypted boot partition /dev/sda1
2) encrypted partition            /dev/sda2

Fromminttoarch's example is very interesting because it uses a single encrypted partition.
The only limitation is the use of --type luks1 because grub is not compatible with luks2.

I'm trying to do the same with gpt (UEFI).
Tomorrow I will try to repeat the steps because I have an error when I run

grub-install /dev/sda/

I get this error:

grub-install error /boot doesn't look like an efi partition

I tried adding --efi-directory = / boot without success.

I remembered that one of the requirements of a "Linux EFI System" partition is to format in fat 32.
I didn't do this.
Tomorrow I will try.

Last edited by archdom (2020-03-07 20:30:01)

Offline

#4 2020-03-08 10:41:37

archdom
Member
Registered: 2018-09-12
Posts: 96

Re: [SOLVED] Archlinux - LVM on LUKS - VBox (UEFI mode)

it doesn't work.

Repeat all

Run archlinux.iso (UEFI mode ) in virtualbox
I have a disk of 12 GB /dev/sda

the steps are:

1) Create an EFI system partition  /dev/sda1
2) mkfs.fat -F32 /dev/sda1
3) cryptsetup luksFormat --type luks1 /dev/sda1
4) cryptsetup open /dev/sda1 cryptlvm
5) pvcreate /dev/mapper/cryptlvm
6) vgcreate vg0 /dev/mapper/cryptlvm
7) lvcreate -C y -L xxG vg0 -n swap
    lvcreate -L xxG vg0 -n root
    lvcreate -l 100%FREE vg0 -n home
8) mkfs.ext4 /dev/vg0/root
    mkfs.ext4 /dev/vg0/home
    mkswap /dev/vg0/swap
9) mount /dev/vg0/root /mnt
     mkdir /mnt/home
     mount /dev/vg0/home /mnt/home
     swapon /dev/MyVolGroup/swap
10) pacstrap -i /mnt base base-devel
11) genfstab -U /mnt > /mnt/etc/fstab
12) arch-chroot /mnt /bin/bash
13) install linux linux-headers lvm2
14) modify mkinitcpio.conf
       HOOKS=(base udev autodetect .... block encrypt lvm2 filesystems fsck)
15) run mkinitcpio -p linux
16) modify /etc/default/grub
      - GRUB_ENABLE_CRYPTODISK=y
      - kernel parameter cryptdevice=UUID=device-UUID:cryptlvm
      nb: device-UUID of /dev/sda1
17) grub-mkconfig -o /boot/grub/grub.cfg
      correctly generated
18) grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB

ERROR:

grub-install error: /boot doesn't look like an EFI partition

What do i wrong?
Perhaps in uefi mode doesn't work.... sad
appreciated help

Last edited by archdom (2020-03-08 11:03:30)

Offline

#5 2020-03-08 11:44:45

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,391

Re: [SOLVED] Archlinux - LVM on LUKS - VBox (UEFI mode)

So you didn't do what the template you followed did and only mention that now...

fromminttoarch install in MBR/BIOS mode.

If you intend to do UEFI mode the ESP partition you create should not be encrypted and not part of your LUKS setup but a standalone partition you install at least GRUB into. See: https://wiki.archlinux.org/index.php/Dm … VM_on_LUKS

Offline

#6 2020-03-08 13:04:35

archdom
Member
Registered: 2018-09-12
Posts: 96

Re: [SOLVED] Archlinux - LVM on LUKS - VBox (UEFI mode)

V1del wrote:

If you intend to do UEFI mode the ESP partition you create should not be encrypted and not part of your LUKS setup but a standalone partition you install at least GRUB into. See: https://wiki.archlinux.org/index.php/Dm … VM_on_LUKS

OK. the guide https://wiki.archlinux.org/index.php/Dm … VM_on_LUKS is user-firendly.

Is there a possibility of protect ESP partition by a unauthorized chroot?

thanks V1del for answer

Offline

#7 2020-03-09 00:42:00

kermit63
Member
Registered: 2018-07-04
Posts: 372

Re: [SOLVED] Archlinux - LVM on LUKS - VBox (UEFI mode)

The EFI implementation of VirtualBox is buggy. Make sure to take a look at https://wiki.archlinux.org/index.php/Vi … n_EFI_mode


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#8 2020-03-09 09:36:28

archdom
Member
Registered: 2018-09-12
Posts: 96

Re: [SOLVED] Archlinux - LVM on LUKS - VBox (UEFI mode)

kermit63 wrote:

The EFI implementation of VirtualBox is buggy. Make sure to take a look at https://wiki.archlinux.org/index.php/Vi … n_EFI_mode

thanks for advice. The 6.1 version is ok.

Offline

#9 2020-03-09 12:25:35

archdom
Member
Registered: 2018-09-12
Posts: 96

Re: [SOLVED] Archlinux - LVM on LUKS - VBox (UEFI mode)

ok guys, as expected works with an external EFI partition not encrypted.
In uefi mode, there isn't the mode of an entire system encrypted.
In bios mode that is possible.
close the topic.
regards

Offline

#10 2020-03-09 12:31:15

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Archlinux - LVM on LUKS - VBox (UEFI mode)

Please don't use [CLOSED], it's reserved for threads locked by mods from any more posts.

Edit your post to use [SOLVED] instead.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#11 2020-03-09 21:37:12

archdom
Member
Registered: 2018-09-12
Posts: 96

Re: [SOLVED] Archlinux - LVM on LUKS - VBox (UEFI mode)

Slithery wrote:

Please don't use [CLOSED], it's reserved for threads locked by mods from any more posts.

Edit your post to use [SOLVED] instead.

Done

Offline

Board footer

Powered by FluxBB