diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2015-11-01 22:14:47 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2015-11-01 22:24:20 +0100 |
| commit | 6d6e628119a043b3d8dd309d3e6d5a35bcd37618 (patch) | |
| tree | 673c7fc50dce36b6d7f27096be04a8b553dc52ad /gnu/system | |
| parent | b8d2eda4a37a7e4c9fb529bd48899d87cefaf345 (diff) | |
doc: Give an example with an encrypted root partition.
* gnu/system/examples/desktop.tmpl: Add 'mapped-devices' field.
Use it in 'file-systems'.
* doc/guix.texi (System Installation): Suggest encrypted partitions.
Give an example of a command sequence.
Diffstat (limited to 'gnu/system')
| -rw-r--r-- | gnu/system/examples/desktop.tmpl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gnu/system/examples/desktop.tmpl b/gnu/system/examples/desktop.tmpl index 988b8f937f8..41f66f693a9 100644 --- a/gnu/system/examples/desktop.tmpl +++ b/gnu/system/examples/desktop.tmpl | |||
| @@ -13,9 +13,17 @@ | |||
| 13 | ;; Assuming /dev/sdX is the target hard disk, and "root" is | 13 | ;; Assuming /dev/sdX is the target hard disk, and "root" is |
| 14 | ;; the label of the target root file system. | 14 | ;; the label of the target root file system. |
| 15 | (bootloader (grub-configuration (device "/dev/sdX"))) | 15 | (bootloader (grub-configuration (device "/dev/sdX"))) |
| 16 | |||
| 17 | ;; Here we assume that /dev/sdX1 contains a LUKS-encrypted | ||
| 18 | ;; root partition created with 'cryptsetup luksFormat'. | ||
| 19 | (mapped-devices (list (mapped-device | ||
| 20 | (source "/dev/sdX1") | ||
| 21 | (target "root-partition") | ||
| 22 | (type luks-device-mapping)))) | ||
| 23 | |||
| 24 | ;; Mount said encrypted partition. | ||
| 16 | (file-systems (cons (file-system | 25 | (file-systems (cons (file-system |
| 17 | (device "root") | 26 | (device "/dev/mapper/root-partition") |
| 18 | (title 'label) | ||
| 19 | (mount-point "/") | 27 | (mount-point "/") |
| 20 | (type "ext4")) | 28 | (type "ext4")) |
| 21 | %base-file-systems)) | 29 | %base-file-systems)) |
