version 2, including all changes.
.
| Rev |
Author |
# |
Line |
| 1 |
perry |
1 |
LOSETUP |
| |
|
2 |
!!!LOSETUP |
| |
|
3 |
NAME |
| |
|
4 |
SYNOPSIS |
| |
|
5 |
DESCRIPTION |
| |
|
6 |
OPTIONS |
| |
|
7 |
RETURN VALUE |
| |
|
8 |
FILES |
| |
|
9 |
EXAMPLE |
| |
|
10 |
RESTRICTIONS |
| |
|
11 |
BUGS |
| |
|
12 |
AUTHORS |
| |
|
13 |
---- |
| |
|
14 |
!!NAME |
| |
|
15 |
|
| |
|
16 |
|
| |
|
17 |
losetup - set up and control loop devices |
| |
|
18 |
!!SYNOPSIS |
| |
|
19 |
|
| |
|
20 |
|
| 2 |
PerryLorier |
21 |
__losetup__ [[ __-e__ ''encryption'' ] [[ __-o__ ''offset'' ] [[ __-p__ ''num'' ] ''loop_device file''__ |
| 1 |
perry |
22 |
losetup__ [[ __-d__ ] ''loop_device'' |
| |
|
23 |
!!DESCRIPTION |
| |
|
24 |
|
| |
|
25 |
|
| |
|
26 |
__losetup__ is used to associate loop devices with |
| |
|
27 |
regular files or block devices, to detach loop devices and |
| |
|
28 |
to query the status of a loop device. If only the |
| |
|
29 |
''loop_device'' argument is given, the status of the |
| |
|
30 |
corresponding loop device is shown. |
| |
|
31 |
!!OPTIONS |
| |
|
32 |
|
| |
|
33 |
|
| |
|
34 |
__--delete, --detach, -d__ |
| |
|
35 |
|
| |
|
36 |
|
| |
|
37 |
detach the file or device associated with the specified loop |
| |
|
38 |
device. |
| |
|
39 |
|
| |
|
40 |
|
| |
|
41 |
__--encryption, -e__ ''encryption'' |
| |
|
42 |
|
| |
|
43 |
|
| |
|
44 |
enable data encryption. The following keywords are |
| |
|
45 |
recognized: |
| |
|
46 |
|
| |
|
47 |
|
| |
|
48 |
__NONE__ |
| |
|
49 |
|
| |
|
50 |
|
| |
|
51 |
use no encryption (default). |
| |
|
52 |
|
| |
|
53 |
|
| |
|
54 |
__XOR__ |
| |
|
55 |
|
| |
|
56 |
|
| |
|
57 |
use a simple XOR encryption. |
| |
|
58 |
|
| |
|
59 |
|
| |
|
60 |
__AES__ |
| |
|
61 |
|
| |
|
62 |
|
| |
|
63 |
use Advanced Encryption Standard encryption. AES encryption |
| |
|
64 |
is only available if you are using the international kernel |
| |
|
65 |
and AES encryption has been enabled in the Crypto API. |
| |
|
66 |
enabled in the Crypto API. |
| |
|
67 |
|
| |
|
68 |
|
| |
|
69 |
__Blowfish__ |
| |
|
70 |
|
| |
|
71 |
|
| |
|
72 |
use Blowfish encryption. Blowfish encryption is only |
| |
|
73 |
available if you are using the international kernel and |
| |
|
74 |
Blowfish encryption has been enabled in the Crypto |
| |
|
75 |
API. |
| |
|
76 |
|
| |
|
77 |
|
| |
|
78 |
__Twofish__ |
| |
|
79 |
|
| |
|
80 |
|
| |
|
81 |
use Twofish encryption. Twofish encryption is only available |
| |
|
82 |
if you are using the international kernel and Twofish |
| |
|
83 |
encryption has been enabled in the Crypto API. |
| |
|
84 |
|
| |
|
85 |
|
| |
|
86 |
__CAST__ |
| |
|
87 |
|
| |
|
88 |
|
| |
|
89 |
use CAST encryption. CAST encryption is only available if |
| |
|
90 |
you are using the international kernel and CAST encryption |
| |
|
91 |
has been enabled in the Crypto API. |
| |
|
92 |
|
| |
|
93 |
|
| |
|
94 |
__DES__ |
| |
|
95 |
|
| |
|
96 |
|
| |
|
97 |
use DES encryption. DES encryption is only available if the |
| |
|
98 |
optional DES package has been added to the kernel. DES |
| |
|
99 |
encryption uses an additional start value that is used to |
| |
|
100 |
protect passwords against dictionary attacks. Use of DES is |
| |
|
101 |
deprecated. |
| |
|
102 |
|
| |
|
103 |
|
| |
|
104 |
__DFC__ |
| |
|
105 |
|
| |
|
106 |
|
| |
|
107 |
use DFC encryption. DFC encryption is only available if you |
| |
|
108 |
are using the international kernel and DFC encryption has |
| |
|
109 |
been enabled in the Crypto API. |
| |
|
110 |
|
| |
|
111 |
|
| |
|
112 |
__IDEA__ |
| |
|
113 |
|
| |
|
114 |
|
| |
|
115 |
use IDEA encryption. IDEA encryption is only available if |
| |
|
116 |
you are using the international kernel and IDEA encryption |
| |
|
117 |
has been enabled in the Crypto API. |
| |
|
118 |
|
| |
|
119 |
|
| |
|
120 |
__MARS__ |
| |
|
121 |
|
| |
|
122 |
|
| |
|
123 |
use MARS encryption. MARS encryption is only available if |
| |
|
124 |
you are using the international kernel and MARS encryption |
| |
|
125 |
has been enabled in the Crypto API. |
| |
|
126 |
|
| |
|
127 |
|
| |
|
128 |
__RC5__ |
| |
|
129 |
|
| |
|
130 |
|
| |
|
131 |
use RC5 encryption. RC5 encryption is only available if you |
| |
|
132 |
are using the international kernel and RC5 encryption has |
| |
|
133 |
been enabled in the Crypto API. |
| |
|
134 |
|
| |
|
135 |
|
| |
|
136 |
__RC6__ |
| |
|
137 |
|
| |
|
138 |
|
| |
|
139 |
use RC6 encryption. RC6 encryption is only available if you |
| |
|
140 |
are using the international kernel and RC6 encryption has |
| |
|
141 |
been enabled in the Crypto API. |
| |
|
142 |
|
| |
|
143 |
|
| |
|
144 |
__Serpent__ |
| |
|
145 |
|
| |
|
146 |
|
| |
|
147 |
use Serpent encryption. Serpent encryption is only available |
| |
|
148 |
if you are using the international kernel and Serpent |
| |
|
149 |
encryption has been enabled in the Crypto API. |
| |
|
150 |
|
| |
|
151 |
|
| |
|
152 |
__--offset, -o__ ''offset'' |
| |
|
153 |
|
| |
|
154 |
|
| |
|
155 |
the data start is moved ''offset'' bytes into the |
| |
|
156 |
specified file or device. |
| |
|
157 |
|
| |
|
158 |
|
| |
|
159 |
__--pass-fd, -p__ ''num'' |
| |
|
160 |
|
| |
|
161 |
|
| |
|
162 |
read the passphrase from file descriptor ''num'' instead |
| |
|
163 |
of the terminal. |
| |
|
164 |
|
| |
|
165 |
|
| |
|
166 |
__--keybits, -k__ ''num'' |
| |
|
167 |
|
| |
|
168 |
|
| |
|
169 |
set the number of bits to use in key to |
| |
|
170 |
''num''. |
| |
|
171 |
!!RETURN VALUE |
| |
|
172 |
|
| |
|
173 |
|
| |
|
174 |
__losetup__ returns 0 on success, nonzero on failure. |
| |
|
175 |
When __losetup__ displays the status of a loop device, it |
| |
|
176 |
returns 1 if the device is not configured and 2 if an error |
| |
|
177 |
occurred which prevented __losetup__ from determining the |
| |
|
178 |
status of the device. |
| |
|
179 |
!!FILES |
| |
|
180 |
|
| |
|
181 |
|
| |
|
182 |
/dev/loop0,/dev/loop1,... loop devices (major=7) |
| |
|
183 |
/proc/cipher/* available ciphers |
| |
|
184 |
!!EXAMPLE |
| |
|
185 |
|
| |
|
186 |
|
| |
|
187 |
If you are using the loadable module you must have the |
| |
|
188 |
module loaded first with the command |
| |
|
189 |
|
| |
|
190 |
|
| |
|
191 |
# insmod loop.o |
| |
|
192 |
|
| |
|
193 |
|
| |
|
194 |
The following commands can be used as an example of using |
| |
|
195 |
the loop device. |
| |
|
196 |
|
| |
|
197 |
|
| |
|
198 |
dd if=/dev/zero of=/file bs=1k count=100 |
| |
|
199 |
losetup -e blowfish /dev/loop0 /file |
| |
|
200 |
Password : |
| |
|
201 |
mkfs -t ext2 /dev/loop0 100 |
| |
|
202 |
mount -t ext2 /dev/loop0 /mnt |
| |
|
203 |
... |
| |
|
204 |
umount /dev/loop0 |
| |
|
205 |
losetup -d /dev/loop0 |
| |
|
206 |
If you are using the loadable module you may remove the module with the command |
| |
|
207 |
|
| |
|
208 |
|
| |
|
209 |
# rmmod loop |
| |
|
210 |
!!RESTRICTIONS |
| |
|
211 |
|
| |
|
212 |
|
| |
|
213 |
DES encryption is painfully slow. On the other hand, XOR is |
| |
|
214 |
terribly weak. Both are insecure nowadays. Some ciphers |
| |
|
215 |
require a licence for you to be allowed to use |
| |
|
216 |
them. |
| |
|
217 |
!!BUGS |
| |
|
218 |
|
| |
|
219 |
|
| |
|
220 |
CAST, DES, RC5 and Twofish are currently broken and cannot |
| |
|
221 |
be used. |
| |
|
222 |
!!AUTHORS |
| |
|
223 |
|
| |
|
224 |
|
| |
|
225 |
Original version: Theodore Ts'o |
| |
|
226 |
---- |