# Partition scheme
My initial goal as to have a small `efi` partition. On this partition is stored the following
- bootloader
- the compressed kernel (vmlinuz)
- initial ram disk (initrd)
These components should be enough to boot end decrypt the rest of the system. See [1].
I followed the article [1] but at the end of the day elilo wasn't able to decrypt my partition.
So I changed the setup a bit and have one un-encrypted `/boot` partition where the `efi` partition is mounted in.
So the final disk layout would looks like this.
```
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
nvme0n1 259:0 0 238.5G 0 disk
|-nvme0n1p1 259:1 0 1G 0 part
|-nvme0n1p2 259:2 0 2G 0 part
`-nvme0n1p3 259:3 0 235.5G 0 part
`-luks 252:0 0 235.5G 0 crypt
|-slackware-root 252:1 0 20G 0 lvm
|-slackware-usr 252:2 0 50G 0 lvm
|-slackware-var 252:3 0 50G 0 lvm
|-slackware-opt 252:4 0 20G 0 lvm
|-slackware-tmp 252:5 0 4G 0 lvm
|-slackware-swap 252:6 0 16G 0 lvm
`-slackware-home 252:7 0 75.5G 0 lvm
```
## Partitioning
```
dd if=/dev/zero of=/dev/nvme0n1 bs=10M
gdisk -l /dev/nvme0n1
gdisk /dev/nvme0n1
cgdisk /dev/nvme0n1
```
- first Partition
- Size: 1G
- Hex Code: ef00
- Name: EFI System
- second partition
- size: 2g
- hex code: 8300
- name: boot
- third partition
- size: rest of the space
- hex code: 8300
- name: Luks
## LVM slices
```
mkfs.vfat -n "EFI System" /dev/nvme0n1p1
cryptsetup -y luksFormat /dev/nvme0n1p3
cryptsetup luksOpen /dev/nvme0n1p3 luks
pvcreate /dev/mapper/luks
vgcreate slackware /dev/mapper/luks
lvcreate -L 20G -n root slackware
lvcreate -L 50G -n usr slackware
lvcreate -L 50G -n var slackware
lvcreate -L 20G -n opt slackware
lvcreate -L 4G -n tmp slackware
lvcreate -L 16G -n swap slackware
lvcreate -l100%FREE -n home slackware
```
---
[1]
https://www.tumfatig.net/2023/install-slackware-linux-with-full-disk-ecryption-on-a-uefi-system/