1 .TH LOSETUP 8 "Nov 24 1993" "Linux" "MAINTENANCE COMMANDS"
3 losetup \- set up and control loop devices
24 is used to associate loop devices with regular files or block devices,
25 to detach loop devices and to query the status of a loop device. If only the
26 \fIloop_device\fP argument is given, the status of the corresponding loop
30 detach the file or device associated with the specified loop device.
31 .IP "\fB\-e \fIencryption\fP"
33 enable data encryption. The following keywords are recognized:
35 use no encryption (default).
38 use a simple XOR encryption.
40 use DES encryption. DES encryption is only available if the optional
41 DES package has been added to the kernel. DES encryption uses an additional
42 start value that is used to protect passwords against dictionary
46 .IP "\fB\-o \fIoffset\fP"
47 the data start is moved \fIoffset\fP bytes into the specified file or
51 returns 0 on success, nonzero on failure. When
53 displays the status of a loop device, it returns 1 if the device
54 is not configured and 2 if an error occurred which prevented
56 from determining the status of the device.
60 /dev/loop0,/dev/loop1,... loop devices (major=7)
63 If you are using the loadable module you must have the module loaded
64 first with the command
68 The following commands can be used as an example of using the loop device.
71 dd if=/dev/zero of=/file bs=1k count=100
72 losetup -e des /dev/loop0 /file
74 Init (up to 16 hex digits):
75 mkfs -t ext2 /dev/loop0 100
76 mount -t ext2 /dev/loop0 /mnt
82 If you are using the loadable module you may remove the module with
89 DES encryption is painfully slow. On the other hand, XOR is terribly weak.
92 Original version: Theodore Ts'o <tytso@athena.mit.edu>
93 Original DES by: Eric Young <eay@psych.psy.uq.oz.au>