Encrypted swap partition

Installer Issues via Installer -- Not for global upgrades or upgrading individual packages -- ONLY ISSUES WITH INSTALLATION OF THE OS -- Can't get Sabayon installed, than post here, otherwise use correct forums

Moderator: Moderators

Post Reply
ashley194
Technological Hen
Posts: 321
Joined: Mon Feb 19, 2007 21:54
Location: Manchester, UK.

Encrypted swap partition

Post by ashley194 » Sat Jun 16, 2012 14:21

Hi all,

Just installed SL9 KDE 64bit & encrypted my swap partition, now wish I hadn't.

Is there any way to undo this (short of re-installing?).

Thanks!

wolfden
Sharecropper
Posts: 9051
Joined: Sat Jan 14, 2006 0:55
Location: Midwest USA
Contact:

Re: Encrypted swap partition

Post by wolfden » Thu Jun 21, 2012 11:37

Can't you simply delete the swap partition and reformat it and than just edit the grub lines to point to the new swap partition? I don't mess with encrypted partitions, but generally swap is a separate thing and some don't even use a swap. As long as your pointing to a swap partition it should be fine.

catinthebox
Baby Hen
Posts: 18
Joined: Tue Jul 10, 2007 10:13

Re: Encrypted swap partition

Post by catinthebox » Fri Nov 09, 2012 12:57

I THINK this will work, but dont get mad at me if you b0rk ur install, run --help after every command or ask someone if you arent absolutelysure than your using mkswap on the right partition OR YOU WILL ATTEMPT TO KILL YOUR OTHER DISK

Code: Select all

swapoff -a
mkswap /dev/swappartition
swapon -a
 
in etc/conf.d/dmcrypt you can put in

Code: Select all

swap=crypt-swap
source='/dev/swappartition'
 
make sure to replace sda1 with whatever your swap partition is
and itll random encrypt your swap at bootup no password from you required

then edit /etc/fstab and find if theres a swap line and change it to this (if you did the dmcrypot stuff

Code: Select all

/dev/mapper/crypt-swap        swap                    swap    defaults        0 0
 
[Edit] by micia - post was edited to remove vulgarity, please don't use bad language in your posts.

Post Reply