Untitled

 avatar
unknown
markdown
6 months ago
805 B
2
Indexable

To achieve this setup, follow these steps:

  1. Partitioning: Use fdisk or parted 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 LVM volumes:

    mkswap /dev/vg0/swap mkfs.ext4 /dev/vg0/root
  5. Mount root:

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

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