Mailinglist Archive: opensuse-security (32 mails)

< Previous Next >
[opensuse-security] encrypted swap device not created @ boot ?
  • From: PGNet <pgnet.trash+ossec@xxxxxxxxx>
  • Date: Wed, 28 Jan 2009 12:45:41 -0800
  • Message-id: <dbd51810901281245y25c7f0a3j4f2be196101bcb90@xxxxxxxxxxxxxx>
I've got a LV for 'swap'

--- Logical volume ---
LV Name /dev/VG03/swap
VG Name VG03
LV UUID dyJZld-HpsM-cRih-QyoK-Ti6u-zAe2-7mlWcP
LV Write Access read/write
LV Status available
# open 0
LV Size 508.00 MB
Current LE 127
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

on a raid-1 partition,

--- Physical volume ---
PV Name /dev/md1
VG Name VG03
PV Size 509.86 MB / not usable 1.86 MB
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 127
Free PE 0
Allocated PE 127
PV UUID DGq68J-DiiF-co40-FCei-Try9-iMnF-qkpXhN

i'm setting up for Encrypted Swap,

swapoff -a
dd if=/dev/urandom of=/dev/VG03/swap
cat /etc/crypttab
cr_swap /dev/VG03/swap /dev/urandom
grep -i swap /etc/fstab
/dev/mapper/cr_swap swap swap defaults
0 0
cryptsetup -d /dev/urandom create cr_swap /dev/VG03/swap
mkswap -L SWAP /dev/mapper/cr_swap
Setting up swapspace version 1, size = 520188 KiB
LABEL=SWAP, UUID=51c783ce-4380-44b9-bc7a-8b2d48c6ccf1
swapon -a
swapon -s
Filename Type Size Used Priority
/dev/mapper/cr_swap partition 522092 0 -1
file -s /dev/md1
/dev/md1: data
file -s /dev/mapper/cr_swap
/dev/mapper/cr_swap: Linux/i386 swap file (new style) 1 (4K
size 130524 pages

but after reboot

file -s /dev/mapper/cr_swap
/dev/mapper/cr_swap: cannot open `/dev/mapper/cr_swap' (No such
or directory)
swapon -s
Filename Type Size Used Priority

how do i make this encrypted swap device 'stick' through boot? have i
missed a step?

To unsubscribe, e-mail: opensuse-security+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-security+help@xxxxxxxxxxxx

< Previous Next >
This Thread
Follow Ups