diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-04 12:20:44 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-11-04 12:20:44 +0100 |
commit | 4edf0d6d3c725b0a5a9709b1f827870ce8b73c44 (patch) | |
tree | 9f72f64d91cdfe0727513e0daf61b158f7a9ebda /unofficial/modules/dieter/procedures | |
parent | 7a7492830119e022148c2b8ce4220dc1f26f7de7 (diff) |
more cleaner disk stuff
Diffstat (limited to 'unofficial/modules/dieter/procedures')
-rw-r--r-- | unofficial/modules/dieter/procedures/automatic | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unofficial/modules/dieter/procedures/automatic b/unofficial/modules/dieter/procedures/automatic index 09269b5..2ccec68 100644 --- a/unofficial/modules/dieter/procedures/automatic +++ b/unofficial/modules/dieter/procedures/automatic @@ -39,6 +39,9 @@ worker_prepare_disks () modprobe -q aes-x86-64 || modprobe aes-i586 || die_error "Cannot modprobe aes-x86-64 or aes-i586" # Cleanup whatever state the disk is in (that includes previous, failed runs of this script) + umount /dev/mapper/cryptpool-* 2>/dev/null + vgremove -f cryptpool 2>/dev/null + pvremove /dev/mapper/sda2_crypt 2>/dev/null cryptsetup luksClose sda2_crypt 2>/dev/null dd if=/dev/urandom of=/dev/sda bs=512 count=1 @@ -47,6 +50,7 @@ worker_prepare_disks () ,10,L,* ,,L EOF + #TODO: when sfdisk is done, i still have an invalid partition table? cryptsetup --batch-mode -c aes-xts-plain -y -s 512 luksFormat /dev/sda2 cryptsetup luksOpen /dev/sda2 sda2_crypt pvcreate /dev/mapper/sda2_crypt |