LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-26-2016, 06:57 PM   #1
sellerie
LQ Newbie
 
Registered: Nov 2016
Location: Aachen / Germany
Distribution: Arch Linux / pfSense
Posts: 4

Rep: Reputation: Disabled
luks encrypted, unlocked partition does not appear in /dev/, despite fdisk seeing it


Hello dear community.

I've been using Linux for quite a while now (1 year in daily home- and work use now),
And I'm using Arch Linux as daily for a few months now. (Currently running kernel version 4.8.10-1-ARCH)
and I've started using luks/dm-crypt to encrypt some partitions of some harddrive.
I'm pretty new to using it, and I've recently tried to create a luks encrypted container on my external harddrive,
which I created a mbr(dos) table in and created an ext4 partition in,
but I'm not able to mount the partition in this table anymore,
since the partition doesnt appear anymore after unlocking the container.

Interestingly, fdisk still sees the partition in this container and gets recognized as:
Code:
Festplatte /dev/mapper/test: 512 GiB, 549753716736 Bytes, 1073737728 Sektoren
Einheiten: Sektoren von 1 * 512 = 512 Bytes
Sektorgröße (logisch/physikalisch): 512 Bytes / 512 Bytes
E/A-Größe (minimal/optimal): 512 Bytes / 512 Bytes
Festplattenbezeichnungstyp: dos
Festplattenbezeichner: 0x2714606d

Gerät                  Boot Anfang       Ende   Sektoren Größe Kn Typ
/dev/mapper/test-part1        2048 1073737727 1073735680  512G 83 Linux
But that device neither exists in /dev/mapper (I tried *-part, *p1 and also *-p1),
nor does it appear in /dev/disk/by-name/ or /dev/disk/by-uuid or anywhere else.
I was once able to mount the partition,
but now its not possible anymore
Anyone having a clue why?

Last edited by sellerie; 11-26-2016 at 07:00 PM. Reason: Adding additional infos
 
Old 11-26-2016, 07:59 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,555

Rep: Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088Reputation: 2088
Having a partitioned device inside a LUKS container is pretty unusual. Probing for partitions inside that container is not going to be automatic. You need to tell the kernel to do it:
Code:
kpartx -av /dev/mapper/test
Use "kpartx -dv /dev/mapper/test" to remove the mappings. You will need to do that before you can close the LUKS container.
 
1 members found this post helpful.
Old 11-26-2016, 09:29 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,787

Rep: Reputation: 3574Reputation: 3574Reputation: 3574Reputation: 3574Reputation: 3574Reputation: 3574Reputation: 3574Reputation: 3574Reputation: 3574Reputation: 3574Reputation: 3574
Also, no point having the block device at all if only one partition - normal practice would be to mkfs on the (unlocked) container itself.
 
1 members found this post helpful.
Old 11-27-2016, 04:35 AM   #4
sellerie
LQ Newbie
 
Registered: Nov 2016
Location: Aachen / Germany
Distribution: Arch Linux / pfSense
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks for the swift answers!
Partprobing on /dev/*lukscontainer* actually solved it for me.
Funny that I didnt have the idea partprobing after unlocking manually myself makes me wonder lol.

@syg00 Realized that now too, already had this once, but I wondered that dolphin is a bit weirdly behaving when partitioning in some container directly, but its behaving more weirdly vice versa...
 
  


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
Error while making LUKS Encrypted partition Buvaneshkumar Linux - Newbie 1 01-04-2016 08:06 AM
[SOLVED] 14.1: Problems with luks encrypted / partition l0rddarkf0rce Slackware 4 11-17-2013 04:15 AM
changing a LUKS encrypted partition's key Cultist Slackware 1 03-20-2012 12:13 PM
Recover encrypted LUKS partition itinlopez Linux - General 3 11-30-2008 02:20 AM
mount luks encrypted partition with kdm mattydee Slackware 2 01-28-2008 12:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:35 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