File: INSTALL.md

package info (click to toggle)
dislocker 0.7.3-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,052 kB
  • sloc: ansic: 8,672; ruby: 175; makefile: 119; sh: 21
file content (168 lines) | stat: -rw-r--r-- 5,072 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# INTRODUCTION

This file describes how to install dislocker onto your machine.

# REQUIREMENTS

You need:

- Compiler, gcc or clang;
- cmake (at least version 2.6);
- make (or gmake, for FreeBSD);
- Headers for FUSE;
- Headers for mbedTLS (previously known as PolarSSL);
- A partition encrypted with BitLocker, from Windows Vista, 7 or 8.


If you have Ruby headers, the library will compile with some Ruby bindings and
another program - see the NOTE section below - will be available.

For Debian-like distos based on Debian Jessie or Ubuntu 14.04 or older:

- `aptitude install gcc cmake make libfuse-dev libpolarssl-dev ruby-dev`

For Debian-like distos based on Debian Stretch or Ubuntu 16.04 or later:

- `aptitude install gcc cmake make libfuse-dev libmbedtls-dev ruby-dev`

For Fedora-like:

- `dnf install gcc cmake make fuse-devel mbedtls-devel ruby-devel rubypick`

Alternatively, running `dnf install dislocker fuse-dislocker` to use the
already existing RPM packages in Fedora could be a clever idea.

For RHEL-like (including CentOS Scientific Linux):

- `yum install gcc cmake make fuse-devel mbedtls-devel ruby-devel /usr/bin/ruby`

Alternatively, running `yum install dislocker fuse-dislocker` to use the
already existing RPM packages in EPEL could be a clever idea.

For FreeBSD:

- `pkg install cmake gmake fusefs-libs mbedtls`

For OSX: Follow the instructions in the next section.

Note that the code expects at least FUSE 2.6.

# INSTALLING

Each OS type has its own section below, beware to follow yours:

## If you are on MacOSX...

Just install Homebrew (http://brew.sh/) and run the following commands:
```
brew update
brew install Caskroom/cask/osxfuse
brew install src/dislocker.rb
```
This will install dislocker.


## If you're on FreeBSD...

Follow the instructions below (next subsection) by replacing 'make' with 'gmake'.

## If you are NOT on MacOSX...

If you already have installed the dependencies (see REQUIREMENTS section above),
you have to type the following commands to install the binaries on your system:
```
cmake .
make
sudo make install
```
Don't forget the dot (.) on the cmake command-line. If you only want to generate
the binaries, without installing them, you can skip the last command (the one
beginning with sudo).

Note that the '-Werror' flag in the cmake WARN_FLAGS variable may break the
compilation for useless warnings. If you know what you're doing, you can remove
it by running the following cmake command instead of the one above:
```
cmake -D WARN_FLAGS:STRING="-Wall -Wextra" .
```

See the [cmake documentation](http://www.cmake.org/documentation/) if you want
to customize the build.

Once installed, see `dislocker(1)` for details on how to use it.

# UNINSTALLING

I'm sure you don't want to do that. But if you're really forced by someone, just
type `make uninstall` as super-user.

# mbedTLS 2.0.0

Since the version 2.0.0 of mbedTLS, the build moves "crypto" functions such
as AES and SHA256 into a separate, libmbedcrypto, library. However, a typo
didn't installed this library, resulting in some packagers not providing this
library, thus breaking the dislocker compilation.
If you have this problem, it's recommended to run the following commands (they
have been put in the src/mbed_install.sh script, if you don't want to
copy/paste from here):
```
git clone https://github.com/ARMmbed/mbedtls.git
cd mbedtls
git checkout mbedtls-2.0.0
```
Then apply the patch given by the following command:
```
git show 6f42417b library/CMakeLists.txt
```
And compile/install the library:
```
cmake .
make
sudo make install
```

You can then resume the installation where you have left it.

# PORTABILITY

Globally, this was successfully tested on Linux x86/x86_64, MacOSX and FreeBSD.
It won't work on Windows and may not work on other BSDs (not tested).

For MacOSX, it has been tested against OSXFUSE 2.3.8 and 2.3.9.

Cases where you need to remove the '-Werror' from the WARN_FLAGS variable:

- You're on Ubuntu 10.04;
- You're using GCC with a version older than 4.3.


Whether it works or not, feel free to send comments and feedbacks to
[dislocker __AT__ hsc __DOT__ fr]().

# NOTE

Five binaries are built when compiling dislocker as described in the `INSTALL.md`
file:

1. `dislocker-bek`: for dissecting a .bek file and printing information about it

2. `dislocker-metadata`: for printing information about a BitLocker-encrypted volume

3. `dislocker-find`: not a binary but a Ruby script which tries to find BitLocker
  encrypted partition among the plugged-in disks (only work if the library is
  compiled with the Ruby bindings)

4. `dislocker-file`: for decrypting a BitLocker encrypted partition into a flat file
formatted as an NTFS partition you can mount

5. `dislocker-fuse`: the one you're using when calling `dislocker',
which dynamically decrypts a BitLocker encrypted partition using FUSE

You can build each one independently providing it as the makefile target. For
instance, if you want to compile dislocker-fuse only, you'd simply run:
```bash
$ cmake .
$ make dislocker-fuse
```