Untitled

 avatar
unknown
markdown
5 months ago
836 B
3
Indexable

To achieve this setup, follow these steps:

  1. Partitioning: Use fdisk to create the partitions:

    fdisk /dev/sda
    • Create /dev/sda1 of size 1G.
    • Create /dev/sda2 with the remaining size.
  2. Encrypt /dev/sda2:

    cryptsetup luksFormat /dev/sda2 cryptsetup open /dev/sda2 cryptroot
  3. Set Up LVM:

    pvcreate /dev/mapper/cryptroot vgcreate vg0 /dev/mapper/cryptroot lvcreate -L 24G -n swap vg0 lvcreate -l 100%FREE -n root vg0
  4. Format and mount swap:

    mkswap /dev/vg0/swap swapon /dev/vg0/swap
  5. Format and mount root:

    mkfs.ext4 /dev/vg0/root mount /dev/vg0/root /mnt
  6. Format and Mount boot:

    mkfs.fat -F 32 /dev/sda1 mount --mkdir /dev/sda1 /mnt/boot
Leave a Comment