LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 03-01-2011, 04:30 AM   #1
navneethr
Member
 
Registered: Jan 2010
Posts: 69
Blog Entries: 1

Rep: Reputation: 16
Unable to mount an encrypted partition /dev/sda6


Hello,
I am having difficult mounting an encrypted partition on my machine....OS is fedora 14
After reading some posts and documentation online I realized that I have to use the cryptsetup command and then mount. But I am getting an error

mount: unknown filesystem type 'LVM2_member'
.

I would very much appreciate if someone can give me a suggestion to resolve this issue as that would give me access to the 15GB encrypted partition.


mount /dev/sda6 /win

mount: unknown filesystem type 'crypto_LUKS'

cryptsetup luksOpen /dev/sda6 enc2

Enter passphrase for /dev/sda6:


mount /dev/mapper/enc2 /win

mount: unknown filesystem type 'LVM2_member'


FYI
First few lines of fdisk -l

Device Boot Start End Blocks Id System

/dev/sda1 * 63 34812854 17406396 7 HPFS/NTFS

/dev/sda2 34812855 78140159 21663652+ 5 Extended

/dev/sda5 46077952 47101951 512000 83 Linux

/dev/sda6 47104000 78139391 15517696 83 Linux

/dev/sda7 34816000 35839999 512000 83 Linux

/dev/sda8 35842048 46073855 5115904 83 Linux
 
Old 03-01-2011, 09:45 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 162Reputation: 162
Have you tried specifying a file system type? For example, if it's a windows partition formatted as fat32:
Code:
cryptsetup luksOpen /dev/sda6 enc2
mount -t vfat /dev/mapper/enc2 /win
 
Old 03-01-2011, 10:39 PM   #3
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
It looks like the bottom layer is encryption. On top of this is an LVM volume. You mount the logical partitions inside the LVM volume, not the LVM itself. First determine if the system has detected the logical volumes. Probably not. If not try the "vgmknodes" command as root to create the device nodes for the logical volumes.

IMHO, it would be better to encrypt the filesystems on the logical volumes instead of the hard disks. At least the kernel would be able to detect the LVM volume, which can extend more than one hard drive.

Last edited by jschiwal; 03-01-2011 at 10:42 PM.
 
Old 03-02-2011, 08:14 AM   #4
navneethr
Member
 
Registered: Jan 2010
Posts: 69
Blog Entries: 1

Original Poster
Rep: Reputation: 16
THanks for your suggestions...
I am not clear exactly what I should do with the second suggestion. ...It seems to me that the second one is the right approach but I did not quite get it.. For e.g.
First determine if the system has detected the logical volumes....How do I do this?

Probably not. If not try the "vgmknodes" .....How do I try this command? I looked up the "man" of this command and I am concerned it might rename something to something if I dont do it right...Can you let me know exactly what is the command with the arguments that I will have to run...


FYI ...here is some other output which might throw some more light ...

[root@localhost /]# cd /dev/VolGroup
[root@localhost VolGroup]# ls
lv_root lv_swap


I am having problems when mounting the encrypted linux system. When I mount the windows system there is no issue.
eg mount /dev/sda1 /win it works fine and I can see all my window files under win.

However when I try mounting another linux system in this case the /dev/sda6 (15GB partition) I have this issue.
mount /dev/sda6 /win
The installation process itself encrypted both the Linux systems...I just chose the option "encrypt the system" during the installation process.
Please let me know how I can mount /dev/sda6 or for that matter /dev/... so that I can see the home dirs in /dev/sda6.
Hope someone can give me a suggestion to resolve this.

FYI
First few lines of fdisk -l

Device Boot Start End Blocks Id System

/dev/sda1 * 63 34812854 17406396 7 HPFS/NTFS

/dev/sda2 34812855 78140159 21663652+ 5 Extended

/dev/sda5 46077952 47101951 512000 83 Linux

/dev/sda6 47104000 78139391 15517696 83 Linux

/dev/sda7 34816000 35839999 512000 83 Linux

/dev/sda8 35842048 46073855 5115904 83 Linux
 
Old 03-02-2011, 08:37 AM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Run "sudo file -s /dev/mapper/enc2" to double check if it is a pv member.

Run "sudo lvdisplay" to list any volume groups. "sudo pvscan" to list any physical volumes.

Check "lsmod | grep crypt"
Code:
lsmod | grep crypt
cryptd                  9531  0 
dm_crypt               15079  2 
dm_mod                 86873  5 dm_crypt
Without these modules, you may be losing things that might happen for your automatically when you boot.

I looked in my system for things luks and vg related and found this in an initrd script that prompts for the luks password during the boot process:
Code:
# XXX: activate and wait for volume groups if the resume volume is
# on lvm. This is a layering violation but with current mkinitrd
# design we have no other choice if we want to resume from a vg
# inside luks.
if [ -n "$vg_resume" ]; then
        for vgr in $vg_root $vg_resume $vg_roots; do
                vgchange -a y $vgr
        done
        wait_for_events
fi
When you installed Fedora, did you choose the default LVM configuration or manually create partitions? What is on /dev/sda6? You are mounting it on /win, which doesn't sound like a linux installation. The fdisk -l doesn't indicate that the partition is an LVM member. Could the partition be corrupted?

Please print out your /etc/fstab file for some clues. Is /dev/sda6 listed? If this file is inside the sda6 volume, then check the /boot/grub/menu.lst file.

----
I found this article on Fedora / LVM / Luks encrypted volumes:
http://www.techrepublic.com/blog/ope...me-manager/528

Last edited by jschiwal; 03-02-2011 at 08:42 AM.
 
Old 03-04-2011, 12:37 AM   #6
navneethr
Member
 
Registered: Jan 2010
Posts: 69
Blog Entries: 1

Original Poster
Rep: Reputation: 16
Hello,

thanks for your inputs....
Pl see the output of the commands---
---------------------------
lsmod | grep crypt
dm_crypt 9775 3 //the other entries you indicated dont appear here. Was my installation incomplete ...Pl note I am running these commands as root (su)
-------------------------------------------

Your question ---When you installed Fedora, did you choose the default LVM configuration or manually create partitions? What is on /dev/sda6?

When I installed Fedora I just ticked on the "encrypt system" and I had left about 5.5GB unallocated after using g-parted. I just chose the option ..install fedora in free available space...It did everything automatically ...I did not mamually change the partition information.

On /sda1 I have the windows os ...I have a blank /win folder on the unix 5GB partiton
If as root I say mount /dev/sda1 /win it works well.. Under /win I can now see all my win folders.

On /sda5 (/boot) and /sda6 I have fc14 installed on approx 15 GB of disk space fc14 is installed as a webserver
on /sda7 (/boot) and /sda8 I have fc14 again installed on approx 5 GB of disk space. fc14 is installed as a graphical desktop.

I have now created an empty /fc14-15gb folder (sorry if the /win name misleaded you)

--------------------------------
cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Sat Feb 26 16:18:01 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/VolGroup00-lv_root / ext4 defaults 1 1
UUID=a0d15058-d08e-4b22-b4ab-f8dbba3225ef /boot ext4 defaults 1 2
/dev/mapper/VolGroup-lv_swap swap swap defaults 0 0
/dev/mapper/VolGroup00-lv_swap swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0

-----------------------------------

cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,6)
# kernel /vmlinuz-version ro root=/dev/mapper/VolGroup00-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=1
timeout=500
splashimage=(hd0,6)/grub/splash.xpm.gz
hiddenmenu
password --md5 XXXXXXXXXXXXXXXXXXXXXXXX
title Fedora (2.6.35.6-45.fc14.i686)
root (hd0,6)
kernel /vmlinuz-2.6.35.6-45.fc14.i686 ro root=/dev/mapper/VolGroup00-lv_root rd_LVM_LV=VolGroup00/lv_root rd_LUKS_UUID=luks-f8608dfe-b698-4be4-aea0-50bb55a08287 rd_LVM_LV=VolGroup/lv_swap rd_LUKS_UUID=luks-7b1d4160-69d3-44a6-bd06-d39d9ad7a7d6 rd_LVM_LV=VolGroup00/lv_swap rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.35.6-45.fc14.i686.img
title Other
rootnoverify (hd0,0)
chainloader +1


-------------------------
file -s /dev/mapper/enc2
/dev/mapper/enc2: symbolic link to `../dm-6'

sudo file -s /dev/mapper/enc2
/dev/mapper/enc2: symbolic link to `../dm-6'

--------------------------------------
sudo lvdisplay
Found duplicate PV G0QZHCWXmpsbVZOqpF0zAfvHdz2FQBhW: using /dev/mapper/enc2 not /dev/mapper/luks-7b1d4160-69d3-44a6-bd06-d39d9ad7a7d6
--- Logical volume ---
LV Name /dev/VolGroup/lv_root
VG Name VolGroup
LV UUID W3ztHa-v9tL-T6Mj-rBTi-iK6r-VsAo-3hYyQW
LV Write Access read/write
LV Status available
# open 0
LV Size 13.91 GiB
Current LE 445
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:5

--- Logical volume ---
LV Name /dev/VolGroup/lv_swap
VG Name VolGroup
LV UUID 7CNb0R-8tMA-u23Z-FuSU-Rq9u-3qJs-TkJJVL
LV Write Access read/write
LV Status available
# open 1
LV Size 896.00 MiB
Current LE 28
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:4

--- Logical volume ---
LV Name /dev/VolGroup00/lv_root
VG Name VolGroup00
LV UUID L8RxOK-H84F-xxAI-xlSF-WOO3-nkM7-mifpzo
LV Write Access read/write
LV Status available
# open 1
LV Size 4.00 GiB
Current LE 128
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

--- Logical volume ---
LV Name /dev/VolGroup00/lv_swap
VG Name VolGroup00
LV UUID TEXskQ-80re-kXjT-B6oF-aGVv-BbAX-01JHve
LV Write Access read/write
LV Status available
# open 1
LV Size 896.00 MiB
Current LE 28
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3

------------------------------------
 
  


Reply

Tags
mountpartitions


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
encrypted partition locked...dev/mapper does not exist goswamiyashwant Linux - Newbie 4 03-01-2009 12:06 AM
knoppix 5.1-- how to mount an encrypted partition? bezdomny Linux - Software 2 07-12-2008 11:19 PM
Suse : Dual Boot : : error setting partition /dev/sda6 to type 82 jmp559 Linux - General 2 05-18-2008 01:08 AM
swapon: /dev/sda6: not enough memory Liquidx Linux - General 2 02-15-2007 05:28 AM
Encrypted partition does not mount on boot applewax Suse/Novell 2 01-06-2005 11:31 AM


All times are GMT -5. The time now is 06:23 PM.

Main Menu
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