Can't make encrypted swap stick after reboot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi list,


I'm kinda new to this so please bear with me if the answers to my issue seem
obvious.

I followed the instructions for encrypting swap from:
http://www.saout.de/tikiwiki/tiki-index.php?page=EncryptedSwap
Here's what works for me on a Slackware 10.2 box running kernel 2.6.17.9 by
adding these to /etc/rc.S: 

#Enable swapping
/sbin/cryptsetup.sh -c blowfish -s 56 -d /dev/urandom create swap0 /dev/hda2
mkswap /dev/mapper/swap0
swapon /dev/mapper/swap0
/sbin/swapon -a


# cat /proc/swaps
Filename                        Type            Size    Used    Priority
/dev/hda5                       partition       2097136 1564    -1


So it seems to be working fine.
Trouble is, when I reboot, I don't see the swap partition and syslog sends a
message "Unable to find swap-space signature".
I couldn't find anything helpful from Googling that message.


The only other instance of swapon in /etc/rc.S is here:
# Scan for new volume groups:
  /sbin/vgscan 2> /dev/null
  if [ $? = 0 ]; then
    # This needs a moment to register.
    sleep 10
    # Make volume groups available to the kernel.
    # This should also make logical volumes available.
    /sbin/vgchange -ay
    # Enable swapping again in case any LVs are used for swap.  Ignore
previous error.  :-)
    /sbin/swapon -a



This is my fstab, I have even experimented by changing the mount point of
swap from "none" to "swap":

# cat /etc/fstab
/dev/mapper/swap0 none              swap        sw               0   0
/dev/hda1         /                 reiserfs    defaults         1   1
/dev/cdrom        /mnt/cdrom        auto        noauto,owner,ro  0   0
/dev/fd0          /mnt/floppy       auto        noauto,owner     0   0
devpts            /dev/pts          devpts      gid=5,mode=620   0   0
proc              /proc             proc        defaults         0   0




What am I doing wrong or missing to have it stick on reboot?




Regards,
Avinash

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux