Metadata-Version: 2.3
Name: donglify
Version: 20241004
Summary: The ultimate Archlinux encryption USB dongiled setup.
Project-URL: Homepage, https://github.com/ayham-1/donglify
Author-email: ayham-1 <me@ayham.xyz>
Maintainer-email: ayham-1 <me@ayham.xyz>
License: MIT License
        
        Copyright (c) 2024 ayham
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: archlinux,donglify,encryption,linux,luks,security,usb
Requires-Python: >=3.8
Requires-Dist: prompt-toolkit
Requires-Dist: termcolor
Description-Content-Type: text/markdown

# 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

```sh
pipx install donglify
```

## Usage

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

```sh
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:

```sh
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.

```sh
donglify> add
```

You will be prompted for configuration options.

You will need to add unlock root LUKS entry in
[/etc/crypttab.initramfs](https://wiki.archlinux.org/title/dm-crypt/System_configuration#crypto),
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.

```sh
[~] $ 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

```sh
donglify> mount
```

Mounts all donglified USB except for `donglepersist`.

### cmd: unmount

```sh
donglify> unmount
```

Unmounts all partitions that `mount` mounted.

### cmd: list

```sh
donglify> list
```

Lists all installed systems on the USB.
