|
| 1 | +--- |
| 2 | +sidebar_position: 5 |
| 3 | +--- |
| 4 | + |
| 5 | +# Installing GoldenDog on a LUKS Encrypted Partition |
| 6 | + |
| 7 | +This guide provides a step-by-step walkthrough for installing GoldenDog on a pre-existing LUKS encrypted partition. This is a manual process that requires using the terminal during the installation. |
| 8 | + |
| 9 | +> [!WARNING] |
| 10 | +> This process involves manual disk partitioning and terminal commands. There are no guarantees; proceed at your own risk. Ensure you have a backup of your data. |
| 11 | +
|
| 12 | +## Manual Partitioning |
| 13 | + |
| 14 | +The Debian installer might not detect encrypted partitions automatically. Follow these steps to prepare the disk: |
| 15 | + |
| 16 | +1. In the **Partition disks** screen, select **Manual**. |
| 17 | +2. Select the encrypted partition (e.g., `/dev/sda6`) or any other you intend to use. |
| 18 | +3. Press **Enter** and under **How to use this partition:**, select **physical volume for encryption**. This will load the necessary modules and programs. |
| 19 | +4. Go back to **How to use this partition:** and select **do not use the partition**, then choose **Done setting up the partition**. |
| 20 | + |
| 21 | +## Opening the Encrypted Volume |
| 22 | + |
| 23 | +1. Open a console by pressing `Ctrl+Alt+F2`. |
| 24 | +2. Run the following command to open the partition (replace `sda6` with your partition): |
| 25 | + ```bash |
| 26 | + cryptsetup luksOpen /dev/sda6 sda6_crypt |
| 27 | + ``` |
| 28 | + *(Note: The contributor originally suggested `luksClose`, but the context implies opening or resetting the state to detect it. If you need to close it first, use `luksClose` then `luksOpen`. Following the contributor's flow of "Detecting disks" later suggests we just need the modules loaded.)* |
| 29 | + |
| 30 | +3. Return to the installer by pressing `Ctrl+Alt+F5` (or `F1/F7` depending on the system). |
| 31 | +4. Click the **Go Back** button. |
| 32 | + |
| 33 | +## Configuring the Volumes |
| 34 | + |
| 35 | +1. Select **Detect disks** and click **Continue**. The encrypted volume should now be visible. |
| 36 | +2. Configure your partitions for `/` (root) and `swap` as desired, but **do not touch the encrypted partition** `/dev/sda6` directly yet. |
| 37 | +3. Select the partition inside the encrypted volume, go to **How to use this partition:** and choose **physical volume for encryption**. |
| 38 | +4. **IMPORTANT:** When asked to **Erase data**, select **NO**. |
| 39 | +5. Choose **Done setting up the partition**. |
| 40 | +6. Select **Finish partitioning and write changes to disk**. Ensure the encrypted partition is NOT marked for formatting. |
| 41 | + |
| 42 | +## Final System Configuration |
| 43 | + |
| 44 | +Before the installation finishes, we need to ensure the system knows how to mount the encrypted volume. |
| 45 | + |
| 46 | +1. Switch back to the console with `Ctrl+Alt+F2`. |
| 47 | +2. Get the UUID of the encrypted partition: |
| 48 | + ```bash |
| 49 | + cryptsetup luksUUID /dev/sda6 |
| 50 | + ``` |
| 51 | + *Note down this UUID.* |
| 52 | + |
| 53 | +3. Edit the `fstab` of the new system: |
| 54 | + ```bash |
| 55 | + nano /target/etc/fstab |
| 56 | + ``` |
| 57 | + Add the following line (adjusting for your mount point, e.g., `/home`): |
| 58 | + ```text |
| 59 | + /dev/mapper/home-cifrado /home ext4 defaults 0 2 |
| 60 | + ``` |
| 61 | + |
| 62 | +4. Edit the `crypttab` of the new system: |
| 63 | + ```bash |
| 64 | + nano /target/etc/crypttab |
| 65 | + ``` |
| 66 | + Add the following line: |
| 67 | + ```text |
| 68 | + home-cifrado UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx none luks |
| 69 | + ``` |
| 70 | + *Replace `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` with the UUID you obtained earlier.* |
| 71 | + |
| 72 | +5. Return to the installer, finish the installation, and install the bootloader. |
| 73 | +6. Restart your system. You will be prompted for the password to mount the encrypted volume. |
| 74 | + |
| 75 | + |
| 76 | +_Document Written by noname from the Debian Argentina community_ |
0 commit comments