Archive | Contact | Privacy
9th May 2010
Nerd 2.0

Hard drive partitioning, encryption, formatting

I have here is a small step-by-step instructions for partitioning, formatting and encryption of hard disks under Linux (Archlinux here) put together, because today I had to search quite a long time to integrate my new External ;-)

  1. Partitioning ( more ... )
    1. fdisk / cfdsik
  2. Encrypt ( more ... )
    1. Generate keyfile: "dd if = / dev / urandom of = / path / file.key bs = 1k count = 2"
    2. Format: "cryptsetup luksFormat / dev / sdx / path / file.key-cipher aes-cbc-provided alternatives: sha256-key-size 256"
    3. Embed "cryptsetup luksOpen / dev / sdx name key-file / path / file.key"
  3. Format
    1. Create file system: "mkfs.ext4 / dev / mapper / name"
    2. Decrease 5% barrier: "tune2fs-m 0 / dev / mapper / name" ( 1 , 2 )