Added wipefs as option for fast FS removal in section 2.1

This commit is contained in:
Arno Wagner
2012-12-29 12:44:40 +01:00
committed by wagner
parent 7eccb7ff50
commit 0451e1c23a

20
FAQ
View File

@@ -227,23 +227,27 @@ A. Contributors
loop-file. loop-file.
03) If the target was in use previously, it is a good idea to 03) If the target was in use previously, it is a good idea to
wipe it before creating the LUKS container, in order to remove any wipe it before creating the LUKS container in order to remove any
trace of old file systems, etc. For example, some users have trace of old file systems and data. For example, some users have
managed to run e2fsck on a partition containing a LUKS container, managed to run e2fsck on a partition containing a LUKS container,
possibly because of residual ext2 superblocks from an earlier use. possibly because of residual ext2 superblocks from an earlier use.
This can do arbitrary damage up to complete and permanent loss of This can do arbitrary damage up to complete and permanent loss of
all data in the LUKS container. all data in the LUKS container.
To wipe, use something like To just quickly wipe file systems (old data may remain), use
cat /dev/zero > target wipefs -a <target device>
To wipe file system and data, use something like
cat /dev/zero > <target device>
This can take a while. To get a progress indicator, you can use This can take a while. To get a progress indicator, you can use
the tool dd_rescue (->google) instead or use my stream meter "wcs" the tool dd_rescue (->google) instead or use my stream meter "wcs"
(source here: http://www.tansi.org/tools/index.html) in the (source here: http://www.tansi.org/tools/index.html) in the
following fashion: following fashion:
cat /dev/zero | wcs > target cat /dev/zero | wcs > <target device>
Be very sure you have the right target, all data will be lost! Be very sure you have the right target, all data will be lost!
@@ -251,14 +255,14 @@ A. Contributors
at some time in the future this will become unnecessary. at some time in the future this will become unnecessary.
04) Create the LUKS container: 04) Create the LUKS container:
cryptsetup luksFormat target cryptsetup luksFormat <target device>
Just follow the on-screen instructions. Just follow the on-screen instructions.
05) Map the container. Here it will be mapped to /dev/mapper/c1: 05) Map the container. Here it will be mapped to /dev/mapper/c1:
cryptsetup luksOpen target c1 cryptsetup luksOpen <target device> c1
06) (Optionally) wipe the container 06) (Optionally) wipe the container (make sure you have the right target!):
cat /dev/zero > /dev/mapper/c1 cat /dev/zero > /dev/mapper/c1
Note that this creates a small information leak, as an attacker can Note that this creates a small information leak, as an attacker can