Skip to content

Instantly share code, notes, and snippets.

@jonnybarnes
Created January 28, 2015 14:12
Show Gist options
  • Save jonnybarnes/180e1c72c2da39b3c777 to your computer and use it in GitHub Desktop.
Save jonnybarnes/180e1c72c2da39b3c777 to your computer and use it in GitHub Desktop.
setting up luks on a new partition
loadkeys uk
lsblk
gdisk /dev/sda
outout should eventually look like:
Command (? for help): p
Disk /dev/sda:
Logical sector size: 512 bytes
Disk identifier (GUID):
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 8191 3.0 MiB EF02 BIOS boot partition
2 8192 1032191 500.0 MiB 8300 boot
3 1032192 8300 root
cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-random luksFormat /dev/sda3
enter a passphrase twice here
cryptsetup open /dev/sda3 ARCHROOT
mkfs.ext4 /dev/sda2
mkfs.btrfs /dev/mapper/ARCHROOT
mount /dev/mapper/ARCHROOT /mnt
cd /mnt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment