Notes on Arch Linux system setup
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Martins Eglitis 119945bb59 Update README 3 months ago
README.md Update README 3 months ago

README.md

setup

Notes on Arch Linux system setup.

Notes

  • # cryptsetup luksOpen -d /dev/urandom /dev/<sda> temp - create a temporary encrypted container named temp on the /dev/sda partition to be encrypted.
  • # dd if=/dev/zero of=/dev/mapper/temp bs=4M status=progress - fill the container with zeros.
  • # cryptsetup luksClose temp - close the temporary container.
  • # parted /dev/sda mklabel gpt - create a new gpt partition label.
  • # parted /dev/sda mkpart boot fat32 0% 512M - create the boot partition.
  • # parted /dev/sda set 1 boot on - set the boot flags for the boot partition.
  • # parted /dev/sda mkpart boot fat32 512M 100% - create the system partition.
  • # cryptsetup luksFormat --type luks2 /dev/sda2 - initialize the LUKS2 header on the system partition.
  • # cryptsetup luksDump /dev/sda2 - check the LUKS2 header.
  • # cryptsetup luksOpen /dev/sda2 cryptlvm - open the encrypted system partition and map it to /dsystem/mapper/cryptlvm.
  • # pvcreate /dev/mapper/cryptlvm - create a new physical volume from the encrypted system partition.
  • # vgcreate vg /dev/mapper/cryptlvm - create a new volume group vg.
  • # lvcreate --size 16G --name root vg - create a new logical volume root inside the vg.
  • # lvcreate --extents 100%FREE --name home vg - create a new logical volume home inside the vg.
  • # mkfs.fat /dev/sda1 - make a filesystem for the boot partition.
  • # mkfs.ext4 /dev/mapper/vg-lv2
  • # mount /dev/mapper/vg-root /mnt
  • # mkdir /mnt/home
  • # mount /dev/mapper/vg-home /mnt/home
  • # mkdir /mnt/boot
  • # mount /dev/sda1 /mnt/boot
  • # pacstrap /mnt base
  • # arch-chroot /mnt
  • # UUID is the the UUID of the /dev/sda2 (not of /dev/mapper/cryptlvm or /dev/mapper/vg-root)