Advertisement
Guest User

Untitled

a guest
Feb 6th, 2015
447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 KB | None | 0 0
  1. cat /etc/conf.d/dmcrypt
  2. # /etc/conf.d/dmcrypt
  3.  
  4. # For people who run dmcrypt on top of some other layer (like raid),
  5. # use rc_need to specify that requirement. See the runscript(8) man
  6. # page for more information.
  7.  
  8. #--------------------
  9. # Instructions
  10. #--------------------
  11.  
  12. # Note regarding the syntax of this file. This file is *almost* bash,
  13. # but each line is evaluated separately. Separate swaps/targets can be
  14. # specified. The init-script which reads this file assumes that a
  15. # swap= or target= line starts a new section, similar to lilo or grub
  16. # configuration.
  17.  
  18. # Note when using gpg keys and /usr on a separate partition, you will
  19. # have to copy /usr/bin/gpg to /bin/gpg so that it will work properly
  20. # and ensure that gpg has been compiled statically.
  21. # See http://bugs.gentoo.org/90482 for more information.
  22.  
  23. # Note that the init-script which reads this file detects whether your
  24. # partition is LUKS or not. No mkfs is run unless you specify a makefs
  25. # option.
  26.  
  27. # Global options:
  28. #----------------
  29.  
  30. # Max number of checks to perform (1 per second)
  31. #dmcrypt_max_timeout=120
  32.  
  33. # Arguments:
  34. #-----------
  35. # target=<name> == Mapping name for partition.
  36. # swap=<name> == Mapping name for swap partition.
  37. # source='<dev>' == Real device for partition.
  38. # key='</path/to/keyfile>[:<mode>]' == Fullpath from / or from inside removable media.
  39. # remdev='<dev>' == Device that will be assigned to removable media.
  40. # gpg_options='<opts>' == Default are --quiet --decrypt
  41. # options='<opts>' == cryptsetup, for LUKS you can only use --readonly
  42. # loop_file='<file>' == Loopback file.
  43. # pre_mount='cmds' == commands to execute before mounting partition.
  44. # post_mount='cmds' == commands to execute after mounting partition.
  45. #-----------
  46. # Supported Modes
  47. # gpg == decrypt and pipe key into cryptsetup.
  48. # Note: new-line character must not be part of key.
  49. # Command to erase \n char: 'cat key | tr -d '\n' > cleanKey'
  50.  
  51. #--------------------
  52. # dm-crypt examples
  53. #--------------------
  54.  
  55. ## swap
  56. # Swap partitions. These should come first so that no keys make their
  57. # way into unencrypted swap.
  58. # If no options are given, they will default to: -c aes -h sha1 -d /dev/urandom
  59. # If no makefs is given then mkswap will be assumed
  60. #swap=crypt-swap
  61. #source='/dev/hda2'
  62.  
  63. swap=crypt-swap
  64. source='/dev/disk/by-id/ata-SAMSUNG_HN-M234MBB_S1R1J1MBA12345-part4'
  65.  
  66. ## /home with passphrase
  67. #target=crypt-home
  68. #source='/dev/hda5'
  69.  
  70. ## /home with regular keyfile
  71. #target=crypt-home
  72. #source='/dev/hda5'
  73. #key='/full/path/to/homekey'
  74.  
  75. ## /home with gpg protected key
  76. #target=crypt-home
  77. #source='/dev/hda5'
  78. #key='/full/path/to/homekey:gpg'
  79.  
  80. ## /home with regular keyfile on removable media(such as usb-stick)
  81. #target=crypt-home
  82. #source='/dev/hda5'
  83. #key='/full/path/to/homekey'
  84. #remdev='/dev/sda1'
  85.  
  86. ##/home with gpg protected key on removable media(such as usb-stick)
  87. #target=crypt-home
  88. #source='/dev/hda5'
  89. #key='/full/path/to/homekey:gpg'
  90. #remdev='/dev/sda1'
  91.  
  92. ##/tmp with regular keyfile
  93. #target=crypt-tmp
  94. #source='/dev/hda6'
  95. #key='/full/path/to/tmpkey'
  96. #pre_mount='/sbin/mkreiserfs -f -f ${dev}'
  97. #post_mount='chown root:root ${mount_point}; chmod 1777 ${mount_point}'
  98.  
  99. ## Loopback file example
  100. #mount='crypt-loop-home'
  101. #source='/dev/loop0'
  102. #loop_file='/mnt/crypt/home'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement