LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-30-2010, 09:57 AM   #1
bigbooty
LQ Newbie
 
Registered: Nov 2010
Posts: 5

Rep: Reputation: 0
Partition Help


So after creating the partitions needed: /dev/sda1 and /dev/sda2.
This is all under fdisk /dev/sda. Im trying to encrypt /dev/sda2 with cryptsetup but after executing "cryptsetup luksOpen /dev/sda2 acerluks i get the response "/dev/sda2 is not a valid LUKS device."

I am using the correct 'types' which are /dev/sda1 Linux
and Linux LVM for /dev/sda2


Now i have tried creating them separately e.g. fdisk /dev/sda1 and then /dev/sda2 and then tried again but i get the same response.

sorry for the lack of information. Any help would be greatly appreciated
 
Old 12-01-2010, 10:56 AM   #2
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by bigbooty View Post
So after creating the partitions needed: /dev/sda1 and /dev/sda2.
This is all under fdisk /dev/sda. Im trying to encrypt /dev/sda2 with cryptsetup but after executing "cryptsetup luksOpen /dev/sda2 acerluks i get the response "/dev/sda2 is not a valid LUKS device."
Hi,

first of all, it is recommended to fill the device with random data before you encrypt it
Code:
dd if=/dev/urandom of=/dev/sda2 bs=1M
Then you need something like,
Code:
cryptsetup luksFormat /dev/sda2 --cipher aes-cbc-essiv:sha256 --key-size 256 --verify-passphrase# THIS WILL ERASE ALL DATA ON /dev/sda2
Afterwards you can open the device with your command and then mount it. The manpage has more useful info on that matter:
Code:
man cryptsetup
It is also recommended to encrypt the swap partition. There are plenty of tutorials on how to do that.
Just google for 'cryptsetup swap tutorial'.
 
Old 12-01-2010, 11:08 AM   #3
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
Originally Posted by bigbooty View Post
Now i have tried creating them separately e.g. fdisk /dev/sda1 and then /dev/sda2 and then tried again but
Actually there are people who say that fdisk is buggy and that you should use cfdisk to create partitions.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HowTo convert Primary Partition to Logical (ie move it inside the Extended Partition) Tom6 Linux - Software 3 11-29-2010 03:40 PM
tricky backup of Linux system to NTFS partition to increase partition size Pandarsson Linux - General 5 07-09-2008 02:35 PM
Hard Drive Partition Management - Mandriva Double Partition with Swap File partition moshebagelfresser Linux - Hardware 2 05-23-2008 10:46 AM
Total partition size - User partition size is not equals to Free partition size navaneethanj Linux - General 5 06-14-2004 12:55 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 08:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration