Skip to main content

The ultimate Archlinux encryption USB dongiled setup.

Project description

donglify

The majority of Linux systems have a severe security threat. These installs are susceptable to data theft if the install disk is stolen. ArchLinux offers LUKS as an encryption method to protect the root & data partitions. Even then, the majority of these installs omit the encryption of the /boot or /efi partitions. This script helps automate the configuration of encrypted /boot. And provides a solution in replacement of the /efi partition, which usually can not be encrypted, by having it be present on a USB DONGLE.

Installation

pipx install donglify

Usage

To use donglify, you will need to install the initial configurations onto a USB, which can be done as follows:

donglify init /dev/sd[a,b,c]

This command creates the following partitions on your USB.

  • /efi, 512 MB, holds the EFI stub which the BIOS of a system to boot the USB.
  • /boot, 2GB, holds the kernels of the donglified systems, AND the dongle.ini configuration file.
  • dongleisos, size is set by the user, used to hold the ISOs which are available in the GRUB menu on USB boot, currently only loopback.cfg ISOs can be used.
  • donglepersist, size is set by the user, an encrypted LUKS partition that can be used by the user to store personal data.

In order to enter the interactive donglify prompt:

donglify /dev/sd[a,b,c][2]

The argument should be the donglified USB /boot partition.

Interactive Commands

donglify uses an interactive CLI interface to conduct its business. This is currently the only support, future support for automated installs could be added.

cmd: add

Adds host system configuration to the donglified USB. This configuration is automatically generation to the host system installed once established.

donglify> add

You will be prompted for configuration options.

You will need to add unlock root LUKS entry in /etc/crypttab.initramfs, otherwise the initial ramdisk won't ask to unlock your root partition on your added system. There you can also tell it about your keyfile location if you choose to do so.

[~] $ sudo cat /etc/crypttab.initramfs 
cryptssd UUID=<your UUID here> /boot/crypto_keyfile.bin
crypthdd UUID=<your UUID here> /boot/crypto_keyfile.bin

cmd: mount

donglify> mount

Mounts all donglified USB except for donglepersist.

cmd: unmount

donglify> unmount

Unmounts all partitions that mount mounted.

cmd: list

donglify> list

Lists all installed systems on the USB.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

donglify-20250101.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

donglify-20250101-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file donglify-20250101.tar.gz.

File metadata

  • Download URL: donglify-20250101.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for donglify-20250101.tar.gz
Algorithm Hash digest
SHA256 36d459aa67ddd37f93cb68a8afa416527fc6e8c8fb75ebf20704187f0cd08365
MD5 24af36d9c9690bcad23325677657996a
BLAKE2b-256 ab1cf53d953b886f4f04094e2186100746b8eeacc46bbf10c27cba636bf4fb6b

See more details on using hashes here.

File details

Details for the file donglify-20250101-py3-none-any.whl.

File metadata

  • Download URL: donglify-20250101-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.21

File hashes

Hashes for donglify-20250101-py3-none-any.whl
Algorithm Hash digest
SHA256 08d2ec0a279ae523a3d572a97ba35ac7543dd28831f2d6df935f65d2e21e790e
MD5 1352b0f31bd2cff37203ea268213a3f7
BLAKE2b-256 08dc012ec339848d7d84e919078b10e22a13aabb594c37a9de1334e8a8b45317

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page