LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 08-10-2012, 04:04 PM   #1
musiqdefunk
LQ Newbie
 
Registered: Mar 2011
Posts: 22

Rep: Reputation: 0
LUKS on LVM


RHEL 6

I am trying to encrypt an LV with LUKS but everytime I boot it says superblock could not be read... I've tried many commands and it still does not work, it doesn't even ask for a password.

Code:
lvcreate -L500MB -n "lvname" "vgname"
shred -n1 -v "/dev/mapper/vgname_lvname"
cryptsetup luksFormat "/dev/mapper/vgname_lvname"
cryptsetup luksOpen "/dev/vgname/vgname_lvname" "name"
mkfs.ext4 "/dev/mapper/name"

vi /etc/fstab
/dev/mapper/name dir ext4 defaults 1 2

vi /etc/crypttab
dir /dev/mapper/name none
When I go into rescue mode however it does ask me for a password.

Last edited by musiqdefunk; 08-10-2012 at 04:18 PM.
 
Old 08-10-2012, 07:50 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,699
Blog Entries: 54

Rep: Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962
Quote:
Originally Posted by musiqdefunk View Post
everytime I boot it says superblock could not be read... (..)
When I go into rescue mode however it does ask me for a password.
Right SELinux context on dir?
Anything in dmesg / syslog?
 
Old 08-10-2012, 11:16 PM   #3
musiqdefunk
LQ Newbie
 
Registered: Mar 2011
Posts: 22

Original Poster
Rep: Reputation: 0
well i guess in /etc/crypttab it should be :

Code:
dir /dev/mapper/vgname_lvname none
instead of
Code:
dir /dev/mapper/name
that seemed to have work but I also did it at home on my vm... i'll try it again at work on monday
 
Old 08-11-2012, 06:07 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,699
Blog Entries: 54

Rep: Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962Reputation: 2962
OK. BTW if you read the documentation carefully you'll find the RHEL 6 Security Guide uses /dev/VGname/LVname for crypttab but the RHEL 6 Installation Guide uses UUIDs...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Reinstall On Luks and LVM BashTin Slackware 3 05-05-2012 10:27 AM
[SOLVED] LVM and LUKS Question ferdog Linux - General 2 04-13-2012 02:31 PM
[SOLVED] LUKS and LVM on two separate drives jjthomas Slackware - Installation 3 07-01-2010 11:39 AM
Luks/Lvm after dd duplication brodo Slackware 10 03-12-2009 04:56 PM
New kernel and existing Luks/Lvm ? brodo Slackware 3 09-14-2008 10:44 AM


All times are GMT -5. The time now is 09:02 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration